Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2022
- 87 participants
- 3239 messages
Re: [PATCH 07/27] dlls/gdiplus/tests: enable compilation with long types
by Esme Povirk (she/they)
Signed-off-by: Esme Povirk <esme(a)codeweavers.com>
Feb. 28, 2022
Re: [PATCH 06/27] dlls/gdiplus/tests: introduce helper functions (expect*) to handle integral conversions
by Esme Povirk (she/they)
Signed-off-by: Esme Povirk <esme(a)codeweavers.com>
Feb. 28, 2022
[PATCH v2 4/4] d3d10: Do not define D3DReflect().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/d3dcompiler_43/reflection.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index f15cdfa0467..91cc20cdded 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -1918,8 +1918,7 @@ HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10Shad
return S_OK;
}
-#endif
-
+#else
HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void **reflector)
{
struct d3dcompiler_shader_reflection *object;
@@ -1978,3 +1977,4 @@ HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void
return S_OK;
}
+#endif
--
2.35.1
Feb. 28, 2022
[PATCH v2 3/4] d3dcompiler: Use a single definition for both d3d10 and d3d11 reflection interfaces.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/d3dcompiler_43/reflection.c | 508 +++----------------------------
1 file changed, 40 insertions(+), 468 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 5708d3d878f..f15cdfa0467 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -22,6 +22,24 @@
#include "d3dcompiler_private.h"
#include "d3d10.h"
+#if !D3D_COMPILER_VERSION
+#define ID3D11ShaderReflection ID3D10ShaderReflection
+#define ID3D11ShaderReflectionVtbl ID3D10ShaderReflectionVtbl
+#define ID3D11ShaderReflectionConstantBuffer ID3D10ShaderReflectionConstantBuffer
+#define ID3D11ShaderReflectionConstantBufferVtbl ID3D10ShaderReflectionConstantBufferVtbl
+#define ID3D11ShaderReflectionType ID3D10ShaderReflectionType
+#define ID3D11ShaderReflectionTypeVtbl ID3D10ShaderReflectionTypeVtbl
+#define ID3D11ShaderReflectionVariable ID3D10ShaderReflectionVariable
+#define ID3D11ShaderReflectionVariableVtbl ID3D10ShaderReflectionVariableVtbl
+#define IID_ID3D11ShaderReflection IID_ID3D10ShaderReflection
+#define D3D11_SHADER_BUFFER_DESC D3D10_SHADER_BUFFER_DESC
+#define D3D11_SHADER_DESC D3D10_SHADER_DESC
+#define D3D11_SHADER_INPUT_BIND_DESC D3D10_SHADER_INPUT_BIND_DESC
+#define D3D11_SHADER_TYPE_DESC D3D10_SHADER_TYPE_DESC
+#define D3D11_SHADER_VARIABLE_DESC D3D10_SHADER_VARIABLE_DESC
+#define D3D11_SIGNATURE_PARAMETER_DESC D3D10_SIGNATURE_PARAMETER_DESC
+#endif
+
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);
enum D3DCOMPILER_SIGNATURE_ELEMENT_SIZE
@@ -43,7 +61,6 @@ struct d3dcompiler_shader_signature
struct d3dcompiler_shader_reflection_type
{
ID3D11ShaderReflectionType ID3D11ShaderReflectionType_iface;
- ID3D10ShaderReflectionType ID3D10ShaderReflectionType_iface;
uint32_t id;
struct wine_rb_entry entry;
@@ -65,7 +82,6 @@ struct d3dcompiler_shader_reflection_type_member
struct d3dcompiler_shader_reflection_variable
{
ID3D11ShaderReflectionVariable ID3D11ShaderReflectionVariable_iface;
- ID3D10ShaderReflectionVariable ID3D10ShaderReflectionVariable_iface;
struct d3dcompiler_shader_reflection_constant_buffer *constant_buffer;
struct d3dcompiler_shader_reflection_type *type;
@@ -80,7 +96,6 @@ struct d3dcompiler_shader_reflection_variable
struct d3dcompiler_shader_reflection_constant_buffer
{
ID3D11ShaderReflectionConstantBuffer ID3D11ShaderReflectionConstantBuffer_iface;
- ID3D10ShaderReflectionConstantBuffer ID3D10ShaderReflectionConstantBuffer_iface;
struct d3dcompiler_shader_reflection *reflection;
@@ -104,7 +119,6 @@ enum D3DCOMPILER_REFLECTION_VERSION
struct d3dcompiler_shader_reflection
{
ID3D11ShaderReflection ID3D11ShaderReflection_iface;
- ID3D10ShaderReflection ID3D10ShaderReflection_iface;
LONG refcount;
enum D3DCOMPILER_REFLECTION_VERSION interface_version;
@@ -160,25 +174,18 @@ static const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_
static const struct ID3D11ShaderReflectionVariableVtbl d3dcompiler_shader_reflection_variable_vtbl;
static const struct ID3D11ShaderReflectionTypeVtbl d3dcompiler_shader_reflection_type_vtbl;
-static const struct ID3D10ShaderReflectionConstantBufferVtbl d3d10_shader_reflection_constant_buffer_vtbl;
-static const struct ID3D10ShaderReflectionVariableVtbl d3d10_shader_reflection_variable_vtbl;
-static const struct ID3D10ShaderReflectionTypeVtbl d3d10_shader_reflection_type_vtbl;
-
/* null objects - needed for invalid calls */
static struct d3dcompiler_shader_reflection_constant_buffer null_constant_buffer =
{
{&d3dcompiler_shader_reflection_constant_buffer_vtbl},
- {&d3d10_shader_reflection_constant_buffer_vtbl}
};
static struct d3dcompiler_shader_reflection_type null_type =
{
{&d3dcompiler_shader_reflection_type_vtbl},
- {&d3d10_shader_reflection_type_vtbl}
};
static struct d3dcompiler_shader_reflection_variable null_variable =
{
{&d3dcompiler_shader_reflection_variable_vtbl},
- {&d3d10_shader_reflection_variable_vtbl},
&null_constant_buffer,
&null_type
};
@@ -425,6 +432,7 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetDesc(ID3D11Sha
desc->EmitInstructionCount = reflection->emit_instruction_count;
desc->GSOutputTopology = reflection->gs_output_topology;
desc->GSMaxOutputVertexCount = reflection->gs_max_output_vertex_count;
+#if D3D_COMPILER_VERSION
desc->InputPrimitive = reflection->input_primitive;
desc->PatchConstantParameters = reflection->pcsg ? reflection->pcsg->element_count : 0;
desc->cGSInstanceCount = 0;
@@ -435,6 +443,7 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetDesc(ID3D11Sha
desc->cBarrierInstructions = 0;
desc->cInterlockedInstructions = 0;
desc->cTextureStoreInstructions = 0;
+#endif
return S_OK;
}
@@ -541,6 +550,7 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetOutputParamete
return S_OK;
}
+#if D3D_COMPILER_VERSION
static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetPatchConstantParameterDesc(
ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc)
{
@@ -709,6 +719,7 @@ static UINT64 STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetRequiresFlags(
return 0;
}
+#endif
static const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtbl =
{
@@ -723,6 +734,7 @@ static const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtb
d3dcompiler_shader_reflection_GetResourceBindingDesc,
d3dcompiler_shader_reflection_GetInputParameterDesc,
d3dcompiler_shader_reflection_GetOutputParameterDesc,
+#if D3D_COMPILER_VERSION
d3dcompiler_shader_reflection_GetPatchConstantParameterDesc,
d3dcompiler_shader_reflection_GetVariableByName,
d3dcompiler_shader_reflection_GetResourceBindingDescByName,
@@ -736,6 +748,7 @@ static const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtb
d3dcompiler_shader_reflection_GetMinFeatureLevel,
d3dcompiler_shader_reflection_GetThreadGroupSize,
d3dcompiler_shader_reflection_GetRequiresFlags,
+#endif
};
/* ID3D11ShaderReflectionConstantBuffer methods */
@@ -859,11 +872,13 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetDesc(
desc->uFlags = This->flags;
desc->DefaultValue = This->default_value;
+#if D3D_COMPILER_VERSION
/* TODO test and set proper values for texture. */
desc->StartTexture = 0xffffffff;
desc->TextureSize = 0;
desc->StartSampler = 0xffffffff;
desc->SamplerSize = 0;
+#endif
return S_OK;
}
@@ -878,6 +893,7 @@ static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflect
return &This->type->ID3D11ShaderReflectionType_iface;
}
+#if D3D_COMPILER_VERSION
static ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetBuffer(
ID3D11ShaderReflectionVariable *iface)
{
@@ -895,14 +911,17 @@ static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetInterfac
return 0;
}
+#endif
static const struct ID3D11ShaderReflectionVariableVtbl d3dcompiler_shader_reflection_variable_vtbl =
{
/* ID3D11ShaderReflectionVariable methods */
d3dcompiler_shader_reflection_variable_GetDesc,
d3dcompiler_shader_reflection_variable_GetType,
+#if D3D_COMPILER_VERSION
d3dcompiler_shader_reflection_variable_GetBuffer,
d3dcompiler_shader_reflection_variable_GetInterfaceSlot,
+#endif
};
/* ID3D11ShaderReflectionType methods */
@@ -1004,6 +1023,7 @@ static const char * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemb
return This->members[index].name;
}
+#if D3D_COMPILER_VERSION
static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_IsEqual(
ID3D11ShaderReflectionType *iface, ID3D11ShaderReflectionType *type)
{
@@ -1070,6 +1090,7 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_ImplementsIn
return E_NOTIMPL;
}
+#endif
static const struct ID3D11ShaderReflectionTypeVtbl d3dcompiler_shader_reflection_type_vtbl =
{
@@ -1078,6 +1099,7 @@ static const struct ID3D11ShaderReflectionTypeVtbl d3dcompiler_shader_reflection
d3dcompiler_shader_reflection_type_GetMemberTypeByIndex,
d3dcompiler_shader_reflection_type_GetMemberTypeByName,
d3dcompiler_shader_reflection_type_GetMemberTypeName,
+#if D3D_COMPILER_VERSION
d3dcompiler_shader_reflection_type_IsEqual,
d3dcompiler_shader_reflection_type_GetSubType,
d3dcompiler_shader_reflection_type_GetBaseClass,
@@ -1085,6 +1107,7 @@ static const struct ID3D11ShaderReflectionTypeVtbl d3dcompiler_shader_reflection
d3dcompiler_shader_reflection_type_GetInterfaceByIndex,
d3dcompiler_shader_reflection_type_IsOfType,
d3dcompiler_shader_reflection_type_ImplementsInterface,
+#endif
};
static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, const char *data, size_t data_size)
@@ -1290,6 +1313,7 @@ static HRESULT d3dcompiler_parse_type(struct d3dcompiler_shader_reflection_type
}
}
+#if D3D_COMPILER_VERSION
if ((type->reflection->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK) >= 0x500)
{
offset = read_u32(&ptr);
@@ -1302,6 +1326,7 @@ static HRESULT d3dcompiler_parse_type(struct d3dcompiler_shader_reflection_type
desc->Name = type->name;
TRACE("Type name: %s.\n", debugstr_a(type->name));
}
+#endif
type->members = members;
@@ -1334,7 +1359,6 @@ static struct d3dcompiler_shader_reflection_type *get_reflection_type(struct d3d
return NULL;
type->ID3D11ShaderReflectionType_iface.lpVtbl = &d3dcompiler_shader_reflection_type_vtbl;
- type->ID3D10ShaderReflectionType_iface.lpVtbl = &d3d10_shader_reflection_type_vtbl;
type->id = offset;
type->reflection = reflection;
@@ -1376,7 +1400,6 @@ static HRESULT d3dcompiler_parse_variables(struct d3dcompiler_shader_reflection_
uint32_t offset;
v->ID3D11ShaderReflectionVariable_iface.lpVtbl = &d3dcompiler_shader_reflection_variable_vtbl;
- v->ID3D10ShaderReflectionVariable_iface.lpVtbl = &d3d10_shader_reflection_variable_vtbl;
v->constant_buffer = cb;
offset = read_u32(&ptr);
@@ -1575,7 +1598,6 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c
struct d3dcompiler_shader_reflection_constant_buffer *cb = &constant_buffers[i];
cb->ID3D11ShaderReflectionConstantBuffer_iface.lpVtbl = &d3dcompiler_shader_reflection_constant_buffer_vtbl;
- cb->ID3D10ShaderReflectionConstantBuffer_iface.lpVtbl = &d3d10_shader_reflection_constant_buffer_vtbl;
cb->reflection = r;
offset = read_u32(&ptr);
@@ -1692,6 +1714,7 @@ static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature *
/* FIXME */
d[i].MinPrecision = D3D_MIN_PRECISION_DEFAULT;
#endif
+#if D3D_COMPILER_VERSION
if (element_size == D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7)
{
d[i].Stream = read_u32(&ptr);
@@ -1700,6 +1723,7 @@ static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature *
{
d[i].Stream = 0;
}
+#endif
name_offset = read_u32(&ptr);
d[i].SemanticName = string_data + (name_offset - string_data_offset);
@@ -1721,11 +1745,6 @@ static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature *
d[i].SystemValueType = D3D_NAME_DEPTH_LESS_EQUAL;
else if (!stricmp(d[i].SemanticName, "sv_target"))
d[i].SystemValueType = D3D_NAME_TARGET;
-
- TRACE("semantic: %s, semantic idx: %u, sysval_semantic %#x, "
- "type %u, register idx: %u, use_mask %#x, input_mask %#x, stream %u\n",
- debugstr_a(d[i].SemanticName), d[i].SemanticIndex, d[i].SystemValueType,
- d[i].ComponentType, d[i].Register, d[i].Mask, d[i].ReadWriteMask, d[i].Stream);
}
s->elements = d;
@@ -1868,453 +1887,6 @@ err_out:
/* d3d10 reflection methods. */
#if !D3D_COMPILER_VERSION
-static inline struct d3dcompiler_shader_reflection *impl_from_ID3D10ShaderReflection(ID3D10ShaderReflection *iface)
-{
- return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection, ID3D10ShaderReflection_iface);
-}
-
-static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_QueryInterface(ID3D10ShaderReflection *iface,
- REFIID riid, void **object)
-{
- TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
-
- if (IsEqualGUID(riid, &IID_ID3D10ShaderReflection) || IsEqualGUID(riid, &IID_IUnknown))
- {
- IUnknown_AddRef(iface);
- *object = iface;
- return S_OK;
- }
-
- WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
-
- *object = NULL;
- return E_NOINTERFACE;
-}
-
-static ULONG STDMETHODCALLTYPE d3d10_shader_reflection_AddRef(ID3D10ShaderReflection *iface)
-{
- struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
- ULONG refcount = InterlockedIncrement(&reflection->refcount);
-
- TRACE("%p increasing refcount to %lu.\n", reflection, refcount);
-
- return refcount;
-}
-
-static ULONG STDMETHODCALLTYPE d3d10_shader_reflection_Release(ID3D10ShaderReflection *iface)
-{
- struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
- ULONG refcount = InterlockedDecrement(&reflection->refcount);
-
- TRACE("%p decreasing refcount to %lu.\n", reflection, refcount);
-
- if (!refcount)
- heap_free(reflection);
-
- return refcount;
-}
-
-static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetDesc(ID3D10ShaderReflection *iface,
- D3D10_SHADER_DESC *desc)
-{
- struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
-
- TRACE("iface %p, desc %p.\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 = reflection->def_count;
- 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 = reflection->macro_instruction_count;
- 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(
- ID3D10ShaderReflection *iface, UINT index)
-{
- struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
-
- TRACE("iface %p, index %u.\n", iface, index);
-
- if (index >= reflection->constant_buffer_count)
- {
- WARN("Invalid argument specified.\n");
- return &null_constant_buffer.ID3D10ShaderReflectionConstantBuffer_iface;
- }
-
- return &reflection->constant_buffers[index].ID3D10ShaderReflectionConstantBuffer_iface;
-}
-
-static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_shader_reflection_GetConstantBufferByName(
- ID3D10ShaderReflection *iface, const char *name)
-{
- struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
- unsigned int i;
-
- TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
-
- if (!name)
- {
- WARN("Invalid argument specified.\n");
- return &null_constant_buffer.ID3D10ShaderReflectionConstantBuffer_iface;
- }
-
- for (i = 0; i < reflection->constant_buffer_count; ++i)
- {
- struct d3dcompiler_shader_reflection_constant_buffer *d = &reflection->constant_buffers[i];
-
- if (!strcmp(d->name, name))
- {
- TRACE("Returning ID3D10ShaderReflectionConstantBuffer %p.\n", d);
- return &d->ID3D10ShaderReflectionConstantBuffer_iface;
- }
- }
-
- WARN("Invalid name specified.\n");
-
- return &null_constant_buffer.ID3D10ShaderReflectionConstantBuffer_iface;
-}
-
-static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetResourceBindingDesc(ID3D10ShaderReflection *iface,
- UINT index, D3D10_SHADER_INPUT_BIND_DESC *desc)
-{
- struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
-
- TRACE("iface %p, index %u, desc %p.\n", iface, index, desc);
-
- if (!desc || index >= reflection->bound_resource_count)
- {
- WARN("Invalid argument specified.\n");
- return E_INVALIDARG;
- }
-
- memcpy(desc, &reflection->bound_resources[index], sizeof(*desc));
-
- return S_OK;
-}
-
-static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetInputParameterDesc(ID3D10ShaderReflection *iface,
- UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc)
-{
- struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
-
- TRACE("iface %p, index %u, desc %p.\n", iface, index, desc);
-
- if (!desc || !reflection->isgn || index >= reflection->isgn->element_count)
- {
- WARN("Invalid argument specified.\n");
- return E_INVALIDARG;
- }
-
- memcpy(desc, &reflection->isgn->elements[index], sizeof(*desc));
-
- return S_OK;
-}
-
-static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetOutputParameterDesc(ID3D10ShaderReflection *iface,
- UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc)
-{
- struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface);
-
- TRACE("iface %p, index %u, desc %p.\n", iface, index, desc);
-
- if (!desc || !reflection->osgn || index >= reflection->osgn->element_count)
- {
- WARN("Invalid argument specified.\n");
- return E_INVALIDARG;
- }
-
- memcpy(desc, &reflection->osgn->elements[index], sizeof(*desc));
-
- return S_OK;
-}
-
-static const struct ID3D10ShaderReflectionVtbl d3d10_shader_reflection_vtbl =
-{
- d3d10_shader_reflection_QueryInterface,
- d3d10_shader_reflection_AddRef,
- d3d10_shader_reflection_Release,
- d3d10_shader_reflection_GetDesc,
- d3d10_shader_reflection_GetConstantBufferByIndex,
- d3d10_shader_reflection_GetConstantBufferByName,
- d3d10_shader_reflection_GetResourceBindingDesc,
- d3d10_shader_reflection_GetInputParameterDesc,
- d3d10_shader_reflection_GetOutputParameterDesc,
-};
-
-static inline struct d3dcompiler_shader_reflection_constant_buffer *impl_from_ID3D10ShaderReflectionConstantBuffer(
- ID3D10ShaderReflectionConstantBuffer *iface)
-{
- return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_constant_buffer,
- ID3D10ShaderReflectionConstantBuffer_iface);
-}
-
-static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_constant_buffer_GetDesc(
- ID3D10ShaderReflectionConstantBuffer *iface, D3D10_SHADER_BUFFER_DESC *desc)
-{
- struct d3dcompiler_shader_reflection_constant_buffer *cb = impl_from_ID3D10ShaderReflectionConstantBuffer(iface);
-
- TRACE("iface %p, desc %p.\n", iface, desc);
-
- if (cb == &null_constant_buffer)
- {
- WARN("Null constant buffer specified.\n");
- return E_FAIL;
- }
-
- if (!desc)
- {
- WARN("Invalid argument specified.\n");
- return E_FAIL;
- }
-
- desc->Name = cb->name;
- desc->Type = cb->type;
- desc->Variables = cb->variable_count;
- desc->Size = cb->size;
- desc->uFlags = cb->flags;
-
- return S_OK;
-}
-
-static ID3D10ShaderReflectionVariable * STDMETHODCALLTYPE d3d10_shader_reflection_constant_buffer_GetVariableByIndex(
- ID3D10ShaderReflectionConstantBuffer *iface, UINT index)
-{
- struct d3dcompiler_shader_reflection_constant_buffer *cb = impl_from_ID3D10ShaderReflectionConstantBuffer(iface);
-
- TRACE("iface %p, index %u.\n", iface, index);
-
- if (index >= cb->variable_count)
- {
- WARN("Invalid index specified.\n");
- return &null_variable.ID3D10ShaderReflectionVariable_iface;
- }
-
- return &cb->variables[index].ID3D10ShaderReflectionVariable_iface;
-}
-
-static ID3D10ShaderReflectionVariable * STDMETHODCALLTYPE d3d10_shader_reflection_constant_buffer_GetVariableByName(
- ID3D10ShaderReflectionConstantBuffer *iface, const char *name)
-{
- struct d3dcompiler_shader_reflection_constant_buffer *cb = impl_from_ID3D10ShaderReflectionConstantBuffer(iface);
- unsigned int i;
-
- TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
-
- if (!name)
- {
- WARN("Invalid argument specified.\n");
- return &null_variable.ID3D10ShaderReflectionVariable_iface;
- }
-
- for (i = 0; i < cb->variable_count; ++i)
- {
- struct d3dcompiler_shader_reflection_variable *v = &cb->variables[i];
-
- if (!strcmp(v->name, name))
- {
- TRACE("Returning ID3D10ShaderReflectionVariable %p.\n", v);
- return &v->ID3D10ShaderReflectionVariable_iface;
- }
- }
-
- WARN("Invalid name specified.\n");
-
- return &null_variable.ID3D10ShaderReflectionVariable_iface;
-}
-
-static const struct ID3D10ShaderReflectionConstantBufferVtbl d3d10_shader_reflection_constant_buffer_vtbl =
-{
- d3d10_shader_reflection_constant_buffer_GetDesc,
- d3d10_shader_reflection_constant_buffer_GetVariableByIndex,
- d3d10_shader_reflection_constant_buffer_GetVariableByName,
-};
-
-static inline struct d3dcompiler_shader_reflection_variable *impl_from_ID3D10ShaderReflectionVariable(ID3D10ShaderReflectionVariable *iface)
-{
- return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_variable, ID3D10ShaderReflectionVariable_iface);
-}
-
-static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_variable_GetDesc(ID3D10ShaderReflectionVariable *iface,
- D3D10_SHADER_VARIABLE_DESC *desc)
-{
- struct d3dcompiler_shader_reflection_variable *var = impl_from_ID3D10ShaderReflectionVariable(iface);
-
- TRACE("iface %p, desc %p.\n", iface, desc);
-
- if (var == &null_variable)
- {
- WARN("Null variable specified.\n");
- return E_FAIL;
- }
-
- if (!desc)
- {
- WARN("Invalid argument specified.\n");
- return E_FAIL;
- }
-
- desc->Name = var->name;
- desc->StartOffset = var->start_offset;
- desc->Size = var->size;
- desc->uFlags = var->flags;
- desc->DefaultValue = var->default_value;
-
- return S_OK;
-}
-
-static ID3D10ShaderReflectionType * STDMETHODCALLTYPE d3d10_shader_reflection_variable_GetType(
- ID3D10ShaderReflectionVariable *iface)
-{
- struct d3dcompiler_shader_reflection_variable *var = impl_from_ID3D10ShaderReflectionVariable(iface);
-
- TRACE("iface %p.\n", iface);
-
- return &var->type->ID3D10ShaderReflectionType_iface;
-}
-
-static const struct ID3D10ShaderReflectionVariableVtbl d3d10_shader_reflection_variable_vtbl =
-{
- d3d10_shader_reflection_variable_GetDesc,
- d3d10_shader_reflection_variable_GetType,
-};
-
-static inline struct d3dcompiler_shader_reflection_type *impl_from_ID3D10ShaderReflectionType(
- ID3D10ShaderReflectionType *iface)
-{
- return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_type, ID3D10ShaderReflectionType_iface);
-}
-
-static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_type_GetDesc(ID3D10ShaderReflectionType *iface,
- D3D10_SHADER_TYPE_DESC *desc)
-{
- struct d3dcompiler_shader_reflection_type *type = impl_from_ID3D10ShaderReflectionType(iface);
-
- TRACE("iface %p, desc %p.\n", iface, desc);
-
- if (type == &null_type)
- {
- WARN("Null type specified.\n");
- return E_FAIL;
- }
-
- if (!desc)
- {
- WARN("Invalid argument specified.\n");
- return E_FAIL;
- }
-
- memcpy(desc, &type->desc, sizeof(*desc));
-
- return S_OK;
-}
-
-static ID3D10ShaderReflectionType * STDMETHODCALLTYPE d3d10_shader_reflection_type_GetMemberTypeByIndex(
- ID3D10ShaderReflectionType *iface, UINT index)
-{
- struct d3dcompiler_shader_reflection_type *type = impl_from_ID3D10ShaderReflectionType(iface);
-
- TRACE("iface %p, index %u.\n", iface, index);
-
- if (index >= type->desc.Members)
- {
- WARN("Invalid index specified.\n");
- return &null_type.ID3D10ShaderReflectionType_iface;
- }
-
- return &type->members[index].type->ID3D10ShaderReflectionType_iface;
-}
-
-static ID3D10ShaderReflectionType * STDMETHODCALLTYPE d3d10_shader_reflection_type_GetMemberTypeByName(
- ID3D10ShaderReflectionType *iface, const char *name)
-{
- struct d3dcompiler_shader_reflection_type *type = impl_from_ID3D10ShaderReflectionType(iface);
- unsigned int i;
-
- TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
-
- if (!name)
- {
- WARN("Invalid argument specified.\n");
- return &null_type.ID3D10ShaderReflectionType_iface;
- }
-
- for (i = 0; i < type->desc.Members; ++i)
- {
- struct d3dcompiler_shader_reflection_type_member *member = &type->members[i];
-
- if (!strcmp(member->name, name))
- {
- TRACE("Returning ID3D10ShaderReflectionType %p.\n", member->type);
- return &member->type->ID3D10ShaderReflectionType_iface;
- }
- }
-
- WARN("Invalid name specified.\n");
-
- return &null_type.ID3D10ShaderReflectionType_iface;
-}
-
-static const char * STDMETHODCALLTYPE d3d10_shader_reflection_type_GetMemberTypeName(
- ID3D10ShaderReflectionType *iface, UINT index)
-{
- struct d3dcompiler_shader_reflection_type *type = impl_from_ID3D10ShaderReflectionType(iface);
-
- TRACE("iface %p, index %u.\n", iface, index);
-
- if (type == &null_type)
- {
- WARN("Null type specified.\n");
- return "$Invalid";
- }
-
- if (index >= type->desc.Members)
- {
- WARN("Invalid index specified.\n");
- return NULL;
- }
-
- return type->members[index].name;
-}
-
-static const struct ID3D10ShaderReflectionTypeVtbl d3d10_shader_reflection_type_vtbl =
-{
- d3d10_shader_reflection_type_GetDesc,
- d3d10_shader_reflection_type_GetMemberTypeByIndex,
- d3d10_shader_reflection_type_GetMemberTypeByName,
- d3d10_shader_reflection_type_GetMemberTypeName,
-};
-
HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10ShaderReflection **reflector)
{
struct d3dcompiler_shader_reflection *object;
@@ -2328,7 +1900,7 @@ HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10Shad
return E_OUTOFMEMORY;
}
- object->ID3D10ShaderReflection_iface.lpVtbl = &d3d10_shader_reflection_vtbl;
+ object->ID3D11ShaderReflection_iface.lpVtbl = &d3dcompiler_shader_reflection_vtbl;
object->interface_version = D3DCOMPILER_REFLECTION_VERSION_D3D10;
object->refcount = 1;
@@ -2340,7 +1912,7 @@ HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10Shad
return hr;
}
- *reflector = &object->ID3D10ShaderReflection_iface;
+ *reflector = (ID3D10ShaderReflection *)&object->ID3D11ShaderReflection_iface;
TRACE("Created ID3D10ShaderReflection %p.\n", object);
--
2.35.1
Feb. 28, 2022
[PATCH v2 2/4] d3d10_1/tests: Add shader reflection tests.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/d3d10_1/tests/Makefile.in | 5 ++++-
dlls/d3d10_1/tests/d3d10_1.c | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d10_1/tests/Makefile.in b/dlls/d3d10_1/tests/Makefile.in
index 256bb407d41..9f36f4db76d 100644
--- a/dlls/d3d10_1/tests/Makefile.in
+++ b/dlls/d3d10_1/tests/Makefile.in
@@ -1,5 +1,8 @@
TESTDLL = d3d10_1.dll
IMPORTS = d3d10_1 user32
+EXTRADEFS = -DD3D_COMPILER_VERSION=0
+PARENTSRC = ../../d3dcompiler_43/tests
C_SRCS = \
- d3d10_1.c
+ d3d10_1.c \
+ reflection.c
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
index 33abd919a03..3218b21b2f0 100644
--- a/dlls/d3d10_1/tests/d3d10_1.c
+++ b/dlls/d3d10_1/tests/d3d10_1.c
@@ -18,6 +18,7 @@
*/
#define COBJMACROS
+#include "d3d10_1.h"
#include "initguid.h"
#include "d3d11_1.h"
#include "wine/test.h"
--
2.35.1
Feb. 28, 2022
[PATCH v2 1/4] d3d10/tests: Add tests for Direct3D 10 shader reflection interfaces.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/d3dcompiler_43/tests/reflection.c | 29 +++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c
index 9c8247790c5..3d969291bba 100644
--- a/dlls/d3dcompiler_43/tests/reflection.c
+++ b/dlls/d3dcompiler_43/tests/reflection.c
@@ -53,7 +53,6 @@ static DWORD shader_creator[] = {
0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00,
};
-#if D3D_COMPILER_VERSION
/*
* fxc.exe /E VS /Tvs_4_0 /Fx
*/
@@ -81,6 +80,7 @@ static DWORD test_reflection_blob[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
+#if D3D_COMPILER_VERSION
static void test_reflection_references(void)
{
ID3D11ShaderReflection *ref11, *ref11_test;
@@ -212,6 +212,31 @@ static void test_reflection_interfaces(void)
count = ref11->lpVtbl->Release(ref11);
ok(!count, "Got unexpected ref count %lu.\n", count);
}
+#else
+static void test_d3d10_interfaces(void)
+{
+ ID3D10ShaderReflection *ref10;
+ IUnknown *unk;
+ HRESULT hr;
+
+ hr = D3D10ReflectShader(test_reflection_blob, sizeof(test_reflection_blob), &ref10);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = ref10->lpVtbl->QueryInterface(ref10, &IID_ID3D10ShaderReflection, (void **)&unk);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ IUnknown_Release(unk);
+
+ hr = ref10->lpVtbl->QueryInterface(ref10, &IID_ID3D10ShaderReflection1, (void **)&unk);
+ ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
+
+ hr = ref10->lpVtbl->QueryInterface(ref10, &IID_ID3D11ShaderReflection, (void **)&unk);
+ ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
+
+ hr = ref10->lpVtbl->QueryInterface(ref10, &IID_ID3D12ShaderReflection, (void **)&unk);
+ ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
+
+ ref10->lpVtbl->Release(ref10);
+}
#endif
/*
@@ -2125,6 +2150,8 @@ START_TEST(reflection)
#if D3D_COMPILER_VERSION
test_reflection_references();
test_reflection_interfaces();
+#else
+ test_d3d10_interfaces();
#endif
test_reflection_desc_vs();
test_reflection_desc_ps();
--
2.35.1
Feb. 28, 2022
Re: [PATCH vkd3d v2 4/7] vkd3d-shader/hlsl: Parse left shift.
by Francisco Casas
February 28, 2022 1:45 PM, "Francisco Casas" <fcasas(a)codeweavers.com> wrote:
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
>
> Note to self: We have to remember to apply (ยท & x11111) to
> the 2nd operand if we add this op to constant folding.
Silly me, I meant 0x1f (5 bits).
Feb. 28, 2022
Re: [PATCH vkd3d v2 7/7] vkd3d-shader/hlsl: Fix typing rules for logical NOT.
by Francisco Casas
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
February 24, 2022 3:45 PM, "Zebediah Figura" <zfigura(a)codeweavers.com> wrote:
> From: Giovanni Mascellani <gmascellani(a)codeweavers.com>
>
> Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
> ---
> v2: Constify the "loc" parameter.
>
> libs/vkd3d-shader/hlsl.y | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
> index 328f1bbb1..92dcb3f2a 100644
> --- a/libs/vkd3d-shader/hlsl.y
> +++ b/libs/vkd3d-shader/hlsl.y
> @@ -1051,6 +1051,21 @@ static struct hlsl_ir_expr *add_unary_bitwise_expr(struct hlsl_ctx *ctx,
> struct
> return add_unary_arithmetic_expr(ctx, instrs, op, arg, loc);
> }
>
> +static struct hlsl_ir_expr *add_unary_logical_expr(struct hlsl_ctx *ctx, struct list *instrs,
> + enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg, const struct vkd3d_shader_location *loc)
> +{
> + struct hlsl_ir_node *args[HLSL_MAX_OPERANDS] = {0};
> + struct hlsl_type *bool_type;
> +
> + bool_type = hlsl_get_numeric_type(ctx, arg->data_type->type, HLSL_TYPE_BOOL,
> + arg->data_type->dimx, arg->data_type->dimy);
> +
> + if (!(args[0] = add_implicit_conversion(ctx, instrs, arg, bool_type, loc)))
> + return NULL;
> +
> + return add_expr(ctx, instrs, op, args, bool_type, loc);
> +}
> +
> static struct hlsl_ir_expr *add_binary_arithmetic_expr(struct hlsl_ctx *ctx, struct list *instrs,
> enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2,
> const struct vkd3d_shader_location *loc)
> @@ -3608,7 +3623,7 @@ unary_expr:
> }
> | '!' unary_expr
> {
> - add_unary_arithmetic_expr(ctx, $2, HLSL_OP1_LOGIC_NOT, node_from_list($2), &@1);
> + add_unary_logical_expr(ctx, $2, HLSL_OP1_LOGIC_NOT, node_from_list($2), &@1);
> $$ = $2;
> }
> /* var_modifiers is necessary to avoid shift/reduce conflicts. */
> --
> 2.35.1
Feb. 28, 2022
Re: [PATCH vkd3d v2 6/7] vkd3d-shader/hlsl: Fix typing rules for bitwise NOT.
by Francisco Casas
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
February 24, 2022 3:45 PM, "Zebediah Figura" <zfigura(a)codeweavers.com> wrote:
> From: Giovanni Mascellani <gmascellani(a)codeweavers.com>
>
> Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
> ---
> v2: Use check_integer_type(); constify the "loc" parameter.
>
> libs/vkd3d-shader/hlsl.y | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
> index c1c229a6f..328f1bbb1 100644
> --- a/libs/vkd3d-shader/hlsl.y
> +++ b/libs/vkd3d-shader/hlsl.y
> @@ -1043,6 +1043,14 @@ static struct hlsl_ir_expr *add_unary_arithmetic_expr(struct hlsl_ctx *ctx,
> stru
> return add_expr(ctx, instrs, op, args, arg->data_type, loc);
> }
>
> +static struct hlsl_ir_expr *add_unary_bitwise_expr(struct hlsl_ctx *ctx, struct list *instrs,
> + enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg, const struct vkd3d_shader_location *loc)
> +{
> + check_integer_type(ctx, arg);
> +
> + return add_unary_arithmetic_expr(ctx, instrs, op, arg, loc);
> +}
> +
> static struct hlsl_ir_expr *add_binary_arithmetic_expr(struct hlsl_ctx *ctx, struct list *instrs,
> enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2,
> const struct vkd3d_shader_location *loc)
> @@ -3595,7 +3603,7 @@ unary_expr:
> }
> | '~' unary_expr
> {
> - add_unary_arithmetic_expr(ctx, $2, HLSL_OP1_BIT_NOT, node_from_list($2), &@1);
> + add_unary_bitwise_expr(ctx, $2, HLSL_OP1_BIT_NOT, node_from_list($2), &@1);
> $$ = $2;
> }
> | '!' unary_expr
> --
> 2.35.1
Feb. 28, 2022
Re: [PATCH vkd3d v2 5/7] vkd3d-shader/hlsl: Parse right shift.
by Francisco Casas
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
February 24, 2022 3:45 PM, "Zebediah Figura" <zfigura(a)codeweavers.com> wrote:
> From: Giovanni Mascellani <gmascellani(a)codeweavers.com>
>
> Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
> ---
> v2: No changes.
>
> libs/vkd3d-shader/hlsl.y | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
> index 7c7c89efb..c1c229a6f 100644
> --- a/libs/vkd3d-shader/hlsl.y
> +++ b/libs/vkd3d-shader/hlsl.y
> @@ -3684,7 +3684,7 @@ shift_expr:
> }
> | shift_expr OP_RIGHTSHIFT add_expr
> {
> - hlsl_fixme(ctx, &@$, "Right shift.");
> + $$ = add_binary_shift_expr_merge(ctx, $1, $3, HLSL_OP2_RSHIFT, &@2);
> }
>
> relational_expr:
> --
> 2.35.1
Feb. 28, 2022