Module: wine Branch: master Commit: f7571743c9fb63a3b27a8cee39997ab61070c82e URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7571743c9fb63a3b27a8cee39...
Author: Rico Schüller kgbricola@web.de Date: Mon Feb 28 19:47:37 2011 +0100
d3dcompiler: Use defines for shader target masks.
---
dlls/d3dcompiler_43/reflection.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 130c1e4..e97512f 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -31,6 +31,9 @@ enum D3DCOMPILER_SIGNATURE_ELEMENT_SIZE D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7 = 7, };
+#define D3DCOMPILER_SHADER_TARGET_VERSION_MASK 0xffff +#define D3DCOMPILER_SHADER_TARGET_SHADERTYPE_MASK 0xffff0000 + static struct d3dcompiler_shader_reflection_type *get_reflection_type(struct d3dcompiler_shader_reflection *reflection, const char *data, DWORD offset);
const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_reflection_constant_buffer_vtbl; @@ -1108,7 +1111,7 @@ static HRESULT d3dcompiler_parse_type(struct d3dcompiler_shader_reflection_type read_dword(&ptr, &member_offset); TRACE("Member Offset %u\n", member_offset);
- if ((type->reflection->target & 0xffff) >= 0x500) + if ((type->reflection->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK) >= 0x500) skip_dword_unknown(&ptr, 4);
if (desc->Members) @@ -1247,7 +1250,7 @@ static HRESULT d3dcompiler_parse_variables(struct d3dcompiler_shader_reflection_ goto err_out; }
- if ((cb->reflection->target & 0xffff) >= 0x500) + if ((cb->reflection->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK) >= 0x500) skip_dword_unknown(&ptr, 4); }
@@ -1306,7 +1309,7 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c TRACE("Creator: %s.\n", debugstr_a(creator));
/* todo: Parse RD11 */ - if ((r->target & 0x0000ffff) >= 0x500) + if ((r->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK) >= 0x500) { skip_dword_unknown(&ptr, 8); } @@ -1516,7 +1519,7 @@ static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature * d[i].Mask = mask & 0xff;
/* pixel shaders have a special handling for SystemValueType in the output signature */ - if (((target & 0xffff0000) == 0xffff0000) && (section->tag == TAG_OSG5 || section->tag == TAG_OSGN)) + if (((target & D3DCOMPILER_SHADER_TARGET_SHADERTYPE_MASK) == 0xffff0000) && (section->tag == TAG_OSG5 || section->tag == TAG_OSGN)) { TRACE("Pixelshader output signature fixup.\n");