Connor McAdams : d3dcompiler: Implement d3d10 reflection GetDesc() method.
Alexandre Julliard
julliard at winehq.org
Wed Nov 6 16:54:29 CST 2019
Module: wine
Branch: master
Commit: 5c708c857ec8ee3f7cf8823c57011f234eca5995
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5c708c857ec8ee3f7cf8823c57011f234eca5995
Author: Connor McAdams <conmanx360 at gmail.com>
Date: Wed Nov 6 10:06:34 2019 +0100
d3dcompiler: Implement d3d10 reflection GetDesc() method.
Signed-off-by: Connor McAdams <conmanx360 at gmail.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dcompiler_43/reflection.c | 41 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 39 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 6f98217385..d3d083e8d8 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -1857,9 +1857,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 *reflection = 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 = reflection->version;
+ desc->Creator = reflection->creator;
+ desc->Flags = reflection->flags;
+ desc->ConstantBuffers = reflection->constant_buffer_count;
+ desc->BoundResources = reflection->bound_resource_count;
+ desc->InputParameters = reflection->isgn ? reflection->isgn->element_count : 0;
+ desc->OutputParameters = reflection->osgn ? reflection->osgn->element_count : 0;
+ desc->InstructionCount = reflection->instruction_count;
+ desc->TempRegisterCount = reflection->temp_register_count;
+ desc->TempArrayCount = reflection->temp_array_count;
+ desc->DefCount = 0;
+ desc->DclCount = reflection->dcl_count;
+ desc->TextureNormalInstructions = reflection->texture_normal_instructions;
+ desc->TextureLoadInstructions = reflection->texture_load_instructions;
+ desc->TextureCompInstructions = reflection->texture_comp_instructions;
+ desc->TextureBiasInstructions = reflection->texture_bias_instructions;
+ desc->TextureGradientInstructions = reflection->texture_gradient_instructions;
+ desc->FloatInstructionCount = reflection->float_instruction_count;
+ desc->IntInstructionCount = reflection->int_instruction_count;
+ desc->UintInstructionCount = reflection->uint_instruction_count;
+ desc->StaticFlowControlCount = reflection->static_flow_control_count;
+ desc->DynamicFlowControlCount = reflection->dynamic_flow_control_count;
+ desc->MacroInstructionCount = 0;
+ desc->ArrayInstructionCount = reflection->array_instruction_count;
+ desc->CutInstructionCount = reflection->cut_instruction_count;
+ desc->EmitInstructionCount = reflection->emit_instruction_count;
+ desc->GSOutputTopology = reflection->gs_output_topology;
+ desc->GSMaxOutputVertexCount = reflection->gs_max_output_vertex_count;
+
+ return S_OK;
}
static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_shader_reflection_GetConstantBufferByIndex(
More information about the wine-cvs
mailing list