2 * Copyright 2009 Henri Verbeet for CodeWeavers
3 * Copyright 2010 Rico Schüller
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
24 #include "d3dcompiler_private.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);
28 enum D3DCOMPILER_SIGNATURE_ELEMENT_SIZE
30 D3DCOMPILER_SIGNATURE_ELEMENT_SIZE6 = 6,
31 D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7 = 7,
34 static BOOL copy_name(const char *ptr, char **name)
38 if (!ptr) return TRUE;
40 name_len = strlen(ptr) + 1;
46 *name = HeapAlloc(GetProcessHeap(), 0, name_len);
49 ERR("Failed to allocate name memory.\n");
53 memcpy(*name, ptr, name_len);
58 static void free_signature(struct d3dcompiler_shader_signature *sig)
60 TRACE("Free signature %p\n", sig);
62 HeapFree(GetProcessHeap(), 0, sig->elements);
63 HeapFree(GetProcessHeap(), 0, sig->string_data);
66 static void reflection_cleanup(struct d3dcompiler_shader_reflection *ref)
68 TRACE("Cleanup %p\n", ref);
72 free_signature(ref->isgn);
73 HeapFree(GetProcessHeap(), 0, ref->isgn);
78 free_signature(ref->osgn);
79 HeapFree(GetProcessHeap(), 0, ref->osgn);
84 free_signature(ref->pcsg);
85 HeapFree(GetProcessHeap(), 0, ref->pcsg);
88 HeapFree(GetProcessHeap(), 0, ref->creator);
91 static inline struct d3dcompiler_shader_reflection *impl_from_ID3D11ShaderReflection(ID3D11ShaderReflection *iface)
93 return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection, ID3D11ShaderReflection_iface);
96 /* IUnknown methods */
98 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_QueryInterface(ID3D11ShaderReflection *iface, REFIID riid, void **object)
100 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
102 if (IsEqualGUID(riid, &IID_ID3D11ShaderReflection)
103 || IsEqualGUID(riid, &IID_IUnknown))
105 IUnknown_AddRef(iface);
110 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
113 return E_NOINTERFACE;
116 static ULONG STDMETHODCALLTYPE d3dcompiler_shader_reflection_AddRef(ID3D11ShaderReflection *iface)
118 struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
119 ULONG refcount = InterlockedIncrement(&This->refcount);
121 TRACE("%p increasing refcount to %u\n", This, refcount);
126 static ULONG STDMETHODCALLTYPE d3dcompiler_shader_reflection_Release(ID3D11ShaderReflection *iface)
128 struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
129 ULONG refcount = InterlockedDecrement(&This->refcount);
131 TRACE("%p decreasing refcount to %u\n", This, refcount);
135 reflection_cleanup(This);
136 HeapFree(GetProcessHeap(), 0, This);
142 /* ID3D11ShaderReflection methods */
144 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetDesc(ID3D11ShaderReflection *iface, D3D11_SHADER_DESC *desc)
146 struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
148 FIXME("iface %p, desc %p partial stub!\n", iface, desc);
152 WARN("Invalid argument specified\n");
156 desc->Version = This->version;
157 desc->Creator = This->creator;
158 desc->Flags = This->flags;
159 desc->ConstantBuffers = This->constant_buffer_count;
160 desc->BoundResources = This->bound_resource_count;
161 desc->InputParameters = This->isgn ? This->isgn->element_count : 0;
162 desc->OutputParameters = This->osgn ? This->osgn->element_count : 0;
163 desc->InstructionCount = This->instruction_count;
164 desc->TempRegisterCount = This->temp_register_count;
165 desc->TempArrayCount = This->temp_array_count;
167 desc->DclCount = This->dcl_count;
168 desc->TextureNormalInstructions = This->texture_normal_instructions;
169 desc->TextureLoadInstructions = This->texture_load_instructions;
170 desc->TextureCompInstructions = This->texture_comp_instructions;
171 desc->TextureBiasInstructions = This->texture_bias_instructions;
172 desc->TextureGradientInstructions = This->texture_gradient_instructions;
173 desc->FloatInstructionCount = This->float_instruction_count;
174 desc->IntInstructionCount = This->int_instruction_count;
175 desc->UintInstructionCount = This->uint_instruction_count;
176 desc->StaticFlowControlCount = This->static_flow_control_count;
177 desc->DynamicFlowControlCount = This->dynamic_flow_control_count;
178 desc->MacroInstructionCount = 0;
179 desc->ArrayInstructionCount = This->array_instruction_count;
180 desc->CutInstructionCount = This->cut_instruction_count;
181 desc->EmitInstructionCount = This->emit_instruction_count;
182 desc->GSOutputTopology = This->gs_output_topology;
183 desc->GSMaxOutputVertexCount = This->gs_max_output_vertex_count;
184 desc->InputPrimitive = This->input_primitive;
185 desc->PatchConstantParameters = This->pcsg ? This->pcsg->element_count : 0;
186 desc->cGSInstanceCount = 0;
187 desc->cControlPoints = This->c_control_points;
188 desc->HSOutputPrimitive = This->hs_output_primitive;
189 desc->HSPartitioning = This->hs_prtitioning;
190 desc->TessellatorDomain = This->tessellator_domain;
191 desc->cBarrierInstructions = 0;
192 desc->cInterlockedInstructions = 0;
193 desc->cTextureStoreInstructions = 0;
198 static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByIndex(
199 ID3D11ShaderReflection *iface, UINT index)
201 FIXME("iface %p, index %u stub!\n", iface, index);
206 static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByName(
207 ID3D11ShaderReflection *iface, LPCSTR name)
209 FIXME("iface %p, name \"%s\" stub!\n", iface, name);
214 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDesc(
215 ID3D11ShaderReflection *iface, UINT index, D3D11_SHADER_INPUT_BIND_DESC *desc)
217 FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
222 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetInputParameterDesc(
223 ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
225 struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
227 TRACE("iface %p, index %u, desc %p\n", iface, index, desc);
229 if (!desc || !This->isgn || index >= This->isgn->element_count)
231 WARN("Invalid argument specified\n");
235 *desc = This->isgn->elements[index];
240 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetOutputParameterDesc(
241 ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
243 struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
245 TRACE("iface %p, index %u, desc %p\n", iface, index, desc);
247 if (!desc || !This->osgn || index >= This->osgn->element_count)
249 WARN("Invalid argument specified\n");
253 *desc = This->osgn->elements[index];
258 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetPatchConstantParameterDesc(
259 ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
261 struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
263 TRACE("iface %p, index %u, desc %p\n", iface, index, desc);
265 if (!desc || !This->pcsg || index >= This->pcsg->element_count)
267 WARN("Invalid argument specified\n");
271 *desc = This->pcsg->elements[index];
276 static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetVariableByName(
277 ID3D11ShaderReflection *iface, LPCSTR name)
279 FIXME("iface %p, name %s stub!\n", iface, name);
284 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDescByName(
285 ID3D11ShaderReflection *iface, LPCSTR name, D3D11_SHADER_INPUT_BIND_DESC *desc)
287 FIXME("iface %p, name %s, desc %p stub!\n", iface, name, desc);
292 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMovInstructionCount(
293 ID3D11ShaderReflection *iface)
295 struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
297 TRACE("iface %p\n", iface);
299 return This->mov_instruction_count;
302 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMovcInstructionCount(
303 ID3D11ShaderReflection *iface)
305 FIXME("iface %p stub!\n", iface);
310 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConversionInstructionCount(
311 ID3D11ShaderReflection *iface)
313 struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
315 TRACE("iface %p\n", iface);
317 return This->conversion_instruction_count;
320 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetBitwiseInstructionCount(
321 ID3D11ShaderReflection *iface)
323 FIXME("iface %p stub!\n", iface);
328 static D3D_PRIMITIVE STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetGSInputPrimitive(
329 ID3D11ShaderReflection *iface)
331 FIXME("iface %p stub!\n", iface);
336 static BOOL STDMETHODCALLTYPE d3dcompiler_shader_reflection_IsSampleFrequencyShader(
337 ID3D11ShaderReflection *iface)
339 FIXME("iface %p stub!\n", iface);
344 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetNumInterfaceSlots(
345 ID3D11ShaderReflection *iface)
347 FIXME("iface %p stub!\n", iface);
352 static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMinFeatureLevel(
353 ID3D11ShaderReflection *iface, D3D_FEATURE_LEVEL *level)
355 FIXME("iface %p, level %p stub!\n", iface, level);
360 static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetThreadGroupSize(
361 ID3D11ShaderReflection *iface, UINT *sizex, UINT *sizey, UINT *sizez)
363 FIXME("iface %p, sizex %p, sizey %p, sizez %p stub!\n", iface, sizex, sizey, sizez);
368 const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtbl =
370 /* IUnknown methods */
371 d3dcompiler_shader_reflection_QueryInterface,
372 d3dcompiler_shader_reflection_AddRef,
373 d3dcompiler_shader_reflection_Release,
374 /* ID3D11ShaderReflection methods */
375 d3dcompiler_shader_reflection_GetDesc,
376 d3dcompiler_shader_reflection_GetConstantBufferByIndex,
377 d3dcompiler_shader_reflection_GetConstantBufferByName,
378 d3dcompiler_shader_reflection_GetResourceBindingDesc,
379 d3dcompiler_shader_reflection_GetInputParameterDesc,
380 d3dcompiler_shader_reflection_GetOutputParameterDesc,
381 d3dcompiler_shader_reflection_GetPatchConstantParameterDesc,
382 d3dcompiler_shader_reflection_GetVariableByName,
383 d3dcompiler_shader_reflection_GetResourceBindingDescByName,
384 d3dcompiler_shader_reflection_GetMovInstructionCount,
385 d3dcompiler_shader_reflection_GetMovcInstructionCount,
386 d3dcompiler_shader_reflection_GetConversionInstructionCount,
387 d3dcompiler_shader_reflection_GetBitwiseInstructionCount,
388 d3dcompiler_shader_reflection_GetGSInputPrimitive,
389 d3dcompiler_shader_reflection_IsSampleFrequencyShader,
390 d3dcompiler_shader_reflection_GetNumInterfaceSlots,
391 d3dcompiler_shader_reflection_GetMinFeatureLevel,
392 d3dcompiler_shader_reflection_GetThreadGroupSize,
395 static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size)
397 const char *ptr = data;
398 DWORD size = data_size >> 2;
400 TRACE("Size %u\n", size);
402 read_dword(&ptr, &r->instruction_count);
403 TRACE("InstructionCount: %u\n", r->instruction_count);
405 read_dword(&ptr, &r->temp_register_count);
406 TRACE("TempRegisterCount: %u\n", r->temp_register_count);
408 skip_dword_unknown(&ptr, 1);
410 read_dword(&ptr, &r->dcl_count);
411 TRACE("DclCount: %u\n", r->dcl_count);
413 read_dword(&ptr, &r->float_instruction_count);
414 TRACE("FloatInstructionCount: %u\n", r->float_instruction_count);
416 read_dword(&ptr, &r->int_instruction_count);
417 TRACE("IntInstructionCount: %u\n", r->int_instruction_count);
419 read_dword(&ptr, &r->uint_instruction_count);
420 TRACE("UintInstructionCount: %u\n", r->uint_instruction_count);
422 read_dword(&ptr, &r->static_flow_control_count);
423 TRACE("StaticFlowControlCount: %u\n", r->static_flow_control_count);
425 read_dword(&ptr, &r->dynamic_flow_control_count);
426 TRACE("DynamicFlowControlCount: %u\n", r->dynamic_flow_control_count);
428 skip_dword_unknown(&ptr, 1);
430 read_dword(&ptr, &r->temp_array_count);
431 TRACE("TempArrayCount: %u\n", r->temp_array_count);
433 read_dword(&ptr, &r->array_instruction_count);
434 TRACE("ArrayInstructionCount: %u\n", r->array_instruction_count);
436 read_dword(&ptr, &r->cut_instruction_count);
437 TRACE("CutInstructionCount: %u\n", r->cut_instruction_count);
439 read_dword(&ptr, &r->emit_instruction_count);
440 TRACE("EmitInstructionCount: %u\n", r->emit_instruction_count);
442 read_dword(&ptr, &r->texture_normal_instructions);
443 TRACE("TextureNormalInstructions: %u\n", r->texture_normal_instructions);
445 read_dword(&ptr, &r->texture_load_instructions);
446 TRACE("TextureLoadInstructions: %u\n", r->texture_load_instructions);
448 read_dword(&ptr, &r->texture_comp_instructions);
449 TRACE("TextureCompInstructions: %u\n", r->texture_comp_instructions);
451 read_dword(&ptr, &r->texture_bias_instructions);
452 TRACE("TextureBiasInstructions: %u\n", r->texture_bias_instructions);
454 read_dword(&ptr, &r->texture_gradient_instructions);
455 TRACE("TextureGradientInstructions: %u\n", r->texture_gradient_instructions);
457 read_dword(&ptr, &r->mov_instruction_count);
458 TRACE("MovInstructionCount: %u\n", r->mov_instruction_count);
460 skip_dword_unknown(&ptr, 1);
462 read_dword(&ptr, &r->conversion_instruction_count);
463 TRACE("ConversionInstructionCount: %u\n", r->conversion_instruction_count);
465 skip_dword_unknown(&ptr, 1);
467 read_dword(&ptr, &r->input_primitive);
468 TRACE("InputPrimitive: %x\n", r->input_primitive);
470 read_dword(&ptr, &r->gs_output_topology);
471 TRACE("GSOutputTopology: %x\n", r->gs_output_topology);
473 read_dword(&ptr, &r->gs_max_output_vertex_count);
474 TRACE("GSMaxOutputVertexCount: %u\n", r->gs_max_output_vertex_count);
476 skip_dword_unknown(&ptr, 3);
479 if (size == 29) return S_OK;
481 skip_dword_unknown(&ptr, 1);
483 read_dword(&ptr, &r->c_control_points);
484 TRACE("cControlPoints: %u\n", r->c_control_points);
486 read_dword(&ptr, &r->hs_output_primitive);
487 TRACE("HSOutputPrimitive: %x\n", r->hs_output_primitive);
489 read_dword(&ptr, &r->hs_prtitioning);
490 TRACE("HSPartitioning: %x\n", r->hs_prtitioning);
492 read_dword(&ptr, &r->tessellator_domain);
493 TRACE("TessellatorDomain: %x\n", r->tessellator_domain);
495 skip_dword_unknown(&ptr, 3);
498 if (size == 37) return S_OK;
500 FIXME("Unhandled size %u\n", size);
505 static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size)
507 const char *ptr = data;
508 DWORD size = data_size >> 2;
511 TRACE("Size %u\n", size);
513 read_dword(&ptr, &r->constant_buffer_count);
514 TRACE("Constant buffer count: %u\n", r->constant_buffer_count);
516 read_dword(&ptr, &offset);
517 TRACE("Constant buffer offset: %x\n", offset);
519 read_dword(&ptr, &r->bound_resource_count);
520 TRACE("Bound resource count: %u\n", r->bound_resource_count);
522 read_dword(&ptr, &offset);
523 TRACE("Bound resource offset: %x\n", offset);
525 skip_dword_unknown(&ptr, 1);
527 read_dword(&ptr, &r->flags);
528 TRACE("Flags: %u\n", r->flags);
530 read_dword(&ptr, &offset);
531 TRACE("Creator at offset %#x.\n", offset);
533 if (!copy_name(data + offset, &r->creator))
535 ERR("Failed to copy name.\n");
536 return E_OUTOFMEMORY;
538 TRACE("Creator: %s.\n", debugstr_a(r->creator));
540 /* todo: Parse D3D11_SHADER_INPUT_BIND_DESC Structure */
542 /* todo: Parse Constant buffers */
547 HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature *s, struct dxbc_section *section)
549 D3D11_SIGNATURE_PARAMETER_DESC *d;
550 unsigned int string_data_offset;
551 unsigned int string_data_size;
552 const char *ptr = section->data;
556 enum D3DCOMPILER_SIGNATURE_ELEMENT_SIZE element_size;
558 switch (section->tag)
561 element_size = D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7;
567 element_size = D3DCOMPILER_SIGNATURE_ELEMENT_SIZE6;
571 FIXME("Unhandled section %s!\n", debugstr_an((const char *)§ion->tag, 4));
572 element_size = D3DCOMPILER_SIGNATURE_ELEMENT_SIZE6;
576 read_dword(&ptr, &count);
577 TRACE("%u elements\n", count);
579 skip_dword_unknown(&ptr, 1);
581 d = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*d));
584 ERR("Failed to allocate signature memory.\n");
585 return E_OUTOFMEMORY;
588 /* 2 DWORDs for the header, element_size for each element. */
589 string_data_offset = 2 * sizeof(DWORD) + count * element_size * sizeof(DWORD);
590 string_data_size = section->data_size - string_data_offset;
592 string_data = HeapAlloc(GetProcessHeap(), 0, string_data_size);
595 ERR("Failed to allocate string data memory.\n");
596 HeapFree(GetProcessHeap(), 0, d);
597 return E_OUTOFMEMORY;
599 memcpy(string_data, section->data + string_data_offset, string_data_size);
601 for (i = 0; i < count; ++i)
606 if (element_size == D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7)
608 read_dword(&ptr, &d[i].Stream);
615 read_dword(&ptr, &name_offset);
616 d[i].SemanticName = string_data + (name_offset - string_data_offset);
617 read_dword(&ptr, &d[i].SemanticIndex);
618 read_dword(&ptr, &d[i].SystemValueType);
619 read_dword(&ptr, &d[i].ComponentType);
620 read_dword(&ptr, &d[i].Register);
621 read_dword(&ptr, &mask);
622 d[i].ReadWriteMask = (mask >> 8) & 0xff;
623 d[i].Mask = mask & 0xff;
625 TRACE("semantic: %s, semantic idx: %u, sysval_semantic %#x, "
626 "type %u, register idx: %u, use_mask %#x, input_mask %#x, stream %u\n",
627 debugstr_a(d[i].SemanticName), d[i].SemanticIndex, d[i].SystemValueType,
628 d[i].ComponentType, d[i].Register, d[i].Mask, d[i].ReadWriteMask, d[i].Stream);
632 s->element_count = count;
633 s->string_data = string_data;
638 static HRESULT d3dcompiler_parse_shdr(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size)
640 const char *ptr = data;
642 read_dword(&ptr, &r->version);
643 TRACE("Shader version: %u\n", r->version);
645 /* todo: Check if anything else is needed from the shdr or shex blob. */
650 HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_reflection *reflection,
651 const void *data, SIZE_T data_size)
653 struct dxbc src_dxbc;
657 reflection->ID3D11ShaderReflection_iface.lpVtbl = &d3dcompiler_shader_reflection_vtbl;
658 reflection->refcount = 1;
660 hr = dxbc_parse(data, data_size, &src_dxbc);
663 WARN("Failed to parse reflection\n");
667 for (i = 0; i < src_dxbc.count; ++i)
669 struct dxbc_section *section = &src_dxbc.sections[i];
671 switch (section->tag)
674 hr = d3dcompiler_parse_stat(reflection, section->data, section->data_size);
677 WARN("Failed to parse section STAT.\n");
684 hr = d3dcompiler_parse_shdr(reflection, section->data, section->data_size);
687 WARN("Failed to parse SHDR section.\n");
693 hr = d3dcompiler_parse_rdef(reflection, section->data, section->data_size);
696 WARN("Failed to parse RDEF section.\n");
702 reflection->isgn = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*reflection->isgn));
703 if (!reflection->isgn)
705 ERR("Failed to allocate ISGN memory.\n");
710 hr = d3dcompiler_parse_signature(reflection->isgn, section);
713 WARN("Failed to parse section ISGN.\n");
720 reflection->osgn = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*reflection->osgn));
721 if (!reflection->osgn)
723 ERR("Failed to allocate OSGN memory.\n");
728 hr = d3dcompiler_parse_signature(reflection->osgn, section);
731 WARN("Failed to parse section OSGN.\n");
737 reflection->pcsg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*reflection->pcsg));
738 if (!reflection->pcsg)
740 ERR("Failed to allocate PCSG memory.\n");
745 hr = d3dcompiler_parse_signature(reflection->pcsg, section);
748 WARN("Failed to parse section PCSG.\n");
754 FIXME("Unhandled section %s!\n", debugstr_an((const char *)§ion->tag, 4));
759 dxbc_destroy(&src_dxbc);
764 reflection_cleanup(reflection);
765 dxbc_destroy(&src_dxbc);