[PATCH v3 6/8] d3dcompiler: implement d3d10 reflection GetDesc method.
Connor McAdams
conmanx360 at gmail.com
Fri Oct 25 21:27:32 CDT 2019
Implements the GetDesc method for D3D10 reflection interface.
Signed-off-by: Connor McAdams <conmanx360 at gmail.com>
---
dlls/d3dcompiler_43/reflection.c | 42 +++++++++++++++++++++++++++++---
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 43a2ca7f64..670d08bd2e 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -359,9 +359,46 @@ static ULONG STDMETHODCALLTYPE d3d10_shader_reflection_Release(ID3D10ShaderRefle
static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetDesc(ID3D10ShaderReflection *iface, D3D10_SHADER_DESC *desc)
{
- FIXME("iface %p, desc %p stub!\n", iface, desc);
+ struct d3dcompiler_shader_reflection *This = impl_from_ID3D10ShaderReflection(iface);
- return E_NOTIMPL;
+ FIXME("iface %p, desc %p partial stub!\n", iface, desc);
+
+ if (!desc)
+ {
+ WARN("Invalid argument specified\n");
+ return E_FAIL;
+ }
+
+ desc->Version = This->version;
+ desc->Creator = This->creator;
+ desc->Flags = This->flags;
+ desc->ConstantBuffers = This->constant_buffer_count;
+ desc->BoundResources = This->bound_resource_count;
+ desc->InputParameters = This->isgn ? This->isgn->element_count : 0;
+ desc->OutputParameters = This->osgn ? This->osgn->element_count : 0;
+ desc->InstructionCount = This->instruction_count;
+ desc->TempRegisterCount = This->temp_register_count;
+ desc->TempArrayCount = This->temp_array_count;
+ desc->DefCount = 0;
+ desc->DclCount = This->dcl_count;
+ desc->TextureNormalInstructions = This->texture_normal_instructions;
+ desc->TextureLoadInstructions = This->texture_load_instructions;
+ desc->TextureCompInstructions = This->texture_comp_instructions;
+ desc->TextureBiasInstructions = This->texture_bias_instructions;
+ desc->TextureGradientInstructions = This->texture_gradient_instructions;
+ desc->FloatInstructionCount = This->float_instruction_count;
+ desc->IntInstructionCount = This->int_instruction_count;
+ desc->UintInstructionCount = This->uint_instruction_count;
+ desc->StaticFlowControlCount = This->static_flow_control_count;
+ desc->DynamicFlowControlCount = This->dynamic_flow_control_count;
+ desc->MacroInstructionCount = 0;
+ desc->ArrayInstructionCount = This->array_instruction_count;
+ desc->CutInstructionCount = This->cut_instruction_count;
+ desc->EmitInstructionCount = This->emit_instruction_count;
+ desc->GSOutputTopology = This->gs_output_topology;
+ desc->GSMaxOutputVertexCount = This->gs_max_output_vertex_count;
+
+ return S_OK;
}
static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_shader_reflection_GetConstantBufferByIndex(
@@ -1812,7 +1849,6 @@ static HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_refl
HRESULT hr;
unsigned int i;
-
wine_rb_init(&reflection->types, d3dcompiler_shader_reflection_type_compare);
hr = dxbc_parse(data, data_size, &src_dxbc);
--
2.20.1
More information about the wine-devel
mailing list