Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/effect.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 3b3d48c50a8..9312cfec6f6 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1814,10 +1814,10 @@ static HRESULT parse_fx10_technique(const char *data, size_t data_size, return S_OK; }
-static HRESULT parse_fx10_variable(const char *data, size_t data_size, +static HRESULT parse_fx10_numeric_variable(const char *data, size_t data_size, const char **ptr, struct d3d10_effect_variable *v) { - DWORD offset; + DWORD offset, default_value_offset; unsigned int i; HRESULT hr;
@@ -1837,11 +1837,14 @@ static HRESULT parse_fx10_variable(const char *data, size_t data_size, read_dword(ptr, &v->buffer_offset); TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset);
- skip_dword_unknown("variable", ptr, 1); + read_dword(ptr, &default_value_offset);
read_dword(ptr, &v->flag); TRACE("Variable flag: %#x.\n", v->flag);
+ if (default_value_offset) + FIXME("Set default variable value.\n"); + read_dword(ptr, &v->annotation_count); TRACE("Variable has %u annotations.\n", v->annotation_count);
@@ -2230,7 +2233,7 @@ static HRESULT parse_fx10_local_buffer(const char *data, size_t data_size, v->buffer = l; v->effect = l->effect;
- if (FAILED(hr = parse_fx10_variable(data, data_size, ptr, v))) + if (FAILED(hr = parse_fx10_numeric_variable(data, data_size, ptr, v))) return hr;
/*
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/effect.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 9312cfec6f6..fe494e952d6 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2442,7 +2442,7 @@ static HRESULT parse_fx10_body(struct d3d10_effect *e, const char *data, DWORD d static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_size) { const char *ptr = data; - DWORD unknown; + DWORD unused;
if (!require_space(0, 19, sizeof(DWORD), data_size)) { @@ -2464,14 +2464,13 @@ static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_s TRACE("Object count: %u\n", e->local_variable_count);
read_dword(&ptr, &e->sharedbuffers_count); - TRACE("Sharedbuffers count: %u\n", e->sharedbuffers_count); + TRACE("Pool buffer count: %u\n", e->sharedbuffers_count);
- /* Number of variables in shared buffers? */ - read_dword(&ptr, &unknown); - FIXME("Unknown 0: %u\n", unknown); + read_dword(&ptr, &unused); + TRACE("Pool variable count: %u\n", unused);
read_dword(&ptr, &e->sharedobjects_count); - TRACE("Sharedobjects count: %u\n", e->sharedobjects_count); + TRACE("Pool objects count: %u\n", e->sharedobjects_count);
read_dword(&ptr, &e->technique_count); TRACE("Technique count: %u\n", e->technique_count); @@ -2479,8 +2478,8 @@ static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_s read_dword(&ptr, &e->index_offset); TRACE("Index offset: %#x\n", e->index_offset);
- read_dword(&ptr, &unknown); - FIXME("Unknown 1: %u\n", unknown); + read_dword(&ptr, &unused); + TRACE("String count: %u\n", unused);
read_dword(&ptr, &e->texture_count); TRACE("Texture count: %u\n", e->texture_count);
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/d3d10_private.h | 1 + dlls/d3d10/effect.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h index 751c39dc895..5e406110988 100644 --- a/dlls/d3d10/d3d10_private.h +++ b/dlls/d3d10/d3d10_private.h @@ -199,6 +199,7 @@ struct d3d10_effect_variable DWORD annotation_count; DWORD flag; DWORD data_size; + DWORD explicit_bind_point; struct d3d10_effect *effect; struct d3d10_effect_variable *elements; struct d3d10_effect_variable *members; diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index fe494e952d6..acc7199138b 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1165,6 +1165,8 @@ static HRESULT parse_fx10_variable_head(const char *data, size_t data_size, } set_variable_vtbl(v);
+ v->explicit_bind_point = ~0u; + return copy_variableinfo_from_type(v); }
@@ -1927,7 +1929,8 @@ static HRESULT parse_fx10_local_variable(const char *data, size_t data_size, } TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
- skip_dword_unknown("local variable", ptr, 1); + read_dword(ptr, &v->explicit_bind_point); + TRACE("Variable explicit bind point %#x.\n", v->explicit_bind_point);
switch (v->type->basetype) { @@ -2191,7 +2194,8 @@ static HRESULT parse_fx10_local_buffer(const char *data, size_t data_size, read_dword(ptr, &l->type->member_count); TRACE("Local buffer member count: %#x.\n", l->type->member_count);
- skip_dword_unknown("local buffer", ptr, 1); + read_dword(ptr, &l->explicit_bind_point); + TRACE("Local buffer explicit bind point: %#x.\n", l->explicit_bind_point);
read_dword(ptr, &l->annotation_count); TRACE("Local buffer has %u annotations.\n", l->annotation_count);
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
On Thu, Aug 26, 2021 at 7:32 AM Nikolay Sivov nsivov@codeweavers.com wrote:
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
dlls/d3d10/d3d10_private.h | 1 + dlls/d3d10/effect.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h index 751c39dc895..5e406110988 100644 --- a/dlls/d3d10/d3d10_private.h +++ b/dlls/d3d10/d3d10_private.h @@ -199,6 +199,7 @@ struct d3d10_effect_variable DWORD annotation_count; DWORD flag; DWORD data_size;
- DWORD explicit_bind_point; struct d3d10_effect *effect; struct d3d10_effect_variable *elements; struct d3d10_effect_variable *members;
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index fe494e952d6..acc7199138b 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1165,6 +1165,8 @@ static HRESULT parse_fx10_variable_head(const char *data, size_t data_size, } set_variable_vtbl(v);
- v->explicit_bind_point = ~0u;
- return copy_variableinfo_from_type(v);
}
@@ -1927,7 +1929,8 @@ static HRESULT parse_fx10_local_variable(const char *data, size_t data_size, } TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
- skip_dword_unknown("local variable", ptr, 1);
read_dword(ptr, &v->explicit_bind_point);
TRACE("Variable explicit bind point %#x.\n", v->explicit_bind_point);
switch (v->type->basetype) {
@@ -2191,7 +2194,8 @@ static HRESULT parse_fx10_local_buffer(const char *data, size_t data_size, read_dword(ptr, &l->type->member_count); TRACE("Local buffer member count: %#x.\n", l->type->member_count);
- skip_dword_unknown("local buffer", ptr, 1);
read_dword(ptr, &l->explicit_bind_point);
TRACE("Local buffer explicit bind point: %#x.\n", l->explicit_bind_point);
read_dword(ptr, &l->annotation_count); TRACE("Local buffer has %u annotations.\n", l->annotation_count);
Can we add a test for these explicit bind points? Modifying a couple of effects from the existing tests might be enough.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/effect.c | 25 +++++++++++++-- dlls/d3d10/tests/effect.c | 66 ++++++++++++++++++++++++++++++++++----- 2 files changed, 82 insertions(+), 9 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index acc7199138b..aa0eef8852d 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -6783,9 +6783,30 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetRawValue( static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetShaderDesc( ID3D10EffectShaderVariable *iface, UINT index, D3D10_EFFECT_SHADER_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3d10_effect_variable *v = impl_from_ID3D10EffectShaderVariable(iface); + D3D10_SHADER_DESC shader_desc; + HRESULT hr = S_OK;
- return E_NOTIMPL; + FIXME("iface %p, index %u, desc %p semi-stub.\n", iface, index, desc); + + if (v->type->element_count) + v = impl_from_ID3D10EffectVariable(iface->lpVtbl->GetElement(iface, index)); + + memset(desc, 0, sizeof(*desc)); + if (v->u.shader.input_signature) + desc->pInputSignature = ID3D10Blob_GetBufferPointer(v->u.shader.input_signature); + desc->SODecl = v->u.shader.stream_output_declaration; + if (v->u.shader.reflection) + { + if (SUCCEEDED(hr = v->u.shader.reflection->lpVtbl->GetDesc(v->u.shader.reflection, + &shader_desc))) + { + desc->NumInputSignatureEntries = shader_desc.InputParameters; + desc->NumOutputSignatureEntries = shader_desc.OutputParameters; + } + } + + return hr; }
static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetVertexShader( diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 5fcece4695b..17ebafcec37 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -3642,14 +3642,10 @@ if (0) v = effect->lpVtbl->GetVariableByName(effect, "g_so"); gs = v->lpVtbl->AsShader(v); hr = gs->lpVtbl->GetShaderDesc(gs, 0, &shaderdesc); -todo_wine ok(hr == S_OK, "Failed to get shader description, hr %#x.\n", hr); - if (hr == S_OK) - { - ok(!shaderdesc.IsInline, "Unexpected inline flag.\n"); - ok(!strcmp(shaderdesc.SODecl, "SV_POSITION.x"), "Unexpected stream output declaration %s.\n", - shaderdesc.SODecl); - } + ok(!shaderdesc.IsInline, "Unexpected inline flag.\n"); + ok(!strcmp(shaderdesc.SODecl, "SV_POSITION.x"), "Unexpected stream output declaration %s.\n", + shaderdesc.SODecl);
/* Signature description */ v = effect->lpVtbl->GetVariableByName(effect, "p"); @@ -5865,6 +5861,61 @@ static void test_effect_resource_variable(void) ok(!refcount, "Device has %u references left.\n", refcount); }
+static void test_effect_optimize(void) +{ + D3D10_EFFECT_SHADER_DESC shaderdesc; + ID3D10EffectShaderVariable *gs; + ID3D10EffectVariable *v; + ID3D10Effect* effect; + ID3D10Device *device; + ULONG refcount; + HRESULT hr; + + if (!(device = create_device())) + { + skip("Failed to create device, skipping tests.\n"); + return; + } + + hr = create_effect(fx_local_shader, 0, device, NULL, &effect); + ok(SUCCEEDED(hr), "Failed to create an effect!\n"); + + v = effect->lpVtbl->GetVariableByName(effect, "g_so"); + + gs = v->lpVtbl->AsShader(v); + hr = gs->lpVtbl->GetShaderDesc(gs, 0, &shaderdesc); + ok(hr == S_OK, "Failed to get shader description, hr %#x.\n", hr); + ok(!!shaderdesc.pInputSignature, "Expected input signature.\n"); + ok(!shaderdesc.IsInline, "Unexpected inline flag.\n"); +todo_wine { + ok(!!shaderdesc.pBytecode, "Expected bytecode.\n"); + ok(shaderdesc.BytecodeLength != 0, "Unexpected bytecode length.\n"); +} + ok(!strcmp(shaderdesc.SODecl, "SV_POSITION.x"), "Unexpected stream output declaration %s.\n", shaderdesc.SODecl); + ok(shaderdesc.NumInputSignatureEntries != 0, "Unexpected input signature count.\n"); + ok(shaderdesc.NumOutputSignatureEntries != 0, "Unexpected input signature count.\n"); + + hr = effect->lpVtbl->Optimize(effect); +todo_wine + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = gs->lpVtbl->GetShaderDesc(gs, 0, &shaderdesc); + ok(hr == S_OK, "Failed to get shader description, hr %#x.\n", hr); + ok(!!shaderdesc.pInputSignature, "Expected input signature.\n"); + ok(!shaderdesc.IsInline, "Unexpected inline flag.\n"); + ok(!shaderdesc.pBytecode, "Unexpected bytecode.\n"); + ok(shaderdesc.BytecodeLength == 0, "Unexpected bytecode length.\n"); +todo_wine { + ok(!shaderdesc.SODecl, "Unexpected stream output declaration %p.\n", shaderdesc.SODecl); + ok(shaderdesc.NumInputSignatureEntries == 0, "Unexpected input signature count.\n"); + ok(shaderdesc.NumOutputSignatureEntries == 0, "Unexpected output signature count.\n"); +} + effect->lpVtbl->Release(effect); + + refcount = ID3D10Device_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +} + START_TEST(effect) { test_effect_constant_buffer_type(); @@ -5881,4 +5932,5 @@ START_TEST(effect) test_effect_vector_variable(); test_effect_matrix_variable(); test_effect_resource_variable(); + test_effect_optimize(); }
On Thu, Aug 26, 2021 at 7:32 AM Nikolay Sivov nsivov@codeweavers.com wrote:
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
dlls/d3d10/effect.c | 25 +++++++++++++-- dlls/d3d10/tests/effect.c | 66 ++++++++++++++++++++++++++++++++++----- 2 files changed, 82 insertions(+), 9 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index acc7199138b..aa0eef8852d 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -6783,9 +6783,30 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetRawValue( static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetShaderDesc( ID3D10EffectShaderVariable *iface, UINT index, D3D10_EFFECT_SHADER_DESC *desc) {
- FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc);
- struct d3d10_effect_variable *v = impl_from_ID3D10EffectShaderVariable(iface);
- D3D10_SHADER_DESC shader_desc;
- HRESULT hr = S_OK;
- return E_NOTIMPL;
- FIXME("iface %p, index %u, desc %p semi-stub.\n", iface, index, desc);
- if (v->type->element_count)
v = impl_from_ID3D10EffectVariable(iface->lpVtbl->GetElement(iface, index));
I wonder if this isn't supposed to do the same thing with used_shaders[] like in GetOutputSignatureElementDesc().
diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 5fcece4695b..17ebafcec37 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c
@@ -5865,6 +5861,61 @@ static void test_effect_resource_variable(void) ok(!refcount, "Device has %u references left.\n", refcount); }
+static void test_effect_optimize(void) +{
- D3D10_EFFECT_SHADER_DESC shaderdesc;
- ID3D10EffectShaderVariable *gs;
- ID3D10EffectVariable *v;
- ID3D10Effect* effect;
- ID3D10Device *device;
- ULONG refcount;
- HRESULT hr;
- if (!(device = create_device()))
- {
skip("Failed to create device, skipping tests.\n");
return;
- }
- hr = create_effect(fx_local_shader, 0, device, NULL, &effect);
- ok(SUCCEEDED(hr), "Failed to create an effect!\n");
- v = effect->lpVtbl->GetVariableByName(effect, "g_so");
- gs = v->lpVtbl->AsShader(v);
- hr = gs->lpVtbl->GetShaderDesc(gs, 0, &shaderdesc);
- ok(hr == S_OK, "Failed to get shader description, hr %#x.\n", hr);
- ok(!!shaderdesc.pInputSignature, "Expected input signature.\n");
- ok(!shaderdesc.IsInline, "Unexpected inline flag.\n");
+todo_wine {
- ok(!!shaderdesc.pBytecode, "Expected bytecode.\n");
- ok(shaderdesc.BytecodeLength != 0, "Unexpected bytecode length.\n");
+}
- ok(!strcmp(shaderdesc.SODecl, "SV_POSITION.x"), "Unexpected stream output declaration %s.\n", shaderdesc.SODecl);
- ok(shaderdesc.NumInputSignatureEntries != 0, "Unexpected input signature count.\n");
- ok(shaderdesc.NumOutputSignatureEntries != 0, "Unexpected input signature count.\n");
Since I'm here anyway... Typo in the ok() message right above. Small style nit, we usually do !! (or nothing, except that's not allowed here as the ok() condition) even for numeric expressions when we want to check for non-zero.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/d3d10_private.h | 1 + dlls/d3d10/effect.c | 12 ++++++++++++ dlls/d3d10/tests/effect.c | 4 +--- 3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h index 5e406110988..64c445ec07a 100644 --- a/dlls/d3d10/d3d10_private.h +++ b/dlls/d3d10/d3d10_private.h @@ -107,6 +107,7 @@ struct d3d10_effect_shader_variable { ID3D10ShaderReflection *reflection; ID3D10Blob *input_signature; + ID3D10Blob *bytecode; union { ID3D10VertexShader *vs; diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index aa0eef8852d..4f93f24600d 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -606,6 +606,11 @@ static HRESULT parse_fx10_shader(const char *data, size_t data_size, DWORD offse
D3DGetInputSignatureBlob(ptr, dxbc_size, &v->u.shader.input_signature);
+ if (FAILED(hr = D3DCreateBlob(dxbc_size, &v->u.shader.bytecode))) + return hr; + + memcpy(ID3D10Blob_GetBufferPointer(v->u.shader.bytecode), ptr, dxbc_size); + if (FAILED(hr = get_fx10_shader_resources(v, ptr, dxbc_size))) return hr;
@@ -2589,6 +2594,8 @@ static void d3d10_effect_shader_variable_destroy(struct d3d10_effect_shader_vari s->reflection->lpVtbl->Release(s->reflection); if (s->input_signature) ID3D10Blob_Release(s->input_signature); + if (s->bytecode) + ID3D10Blob_Release(s->bytecode);
switch (type) { @@ -6795,6 +6802,11 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetShaderDesc( memset(desc, 0, sizeof(*desc)); if (v->u.shader.input_signature) desc->pInputSignature = ID3D10Blob_GetBufferPointer(v->u.shader.input_signature); + if (v->u.shader.bytecode) + { + desc->pBytecode = ID3D10Blob_GetBufferPointer(v->u.shader.bytecode); + desc->BytecodeLength = ID3D10Blob_GetBufferSize(v->u.shader.bytecode); + } desc->SODecl = v->u.shader.stream_output_declaration; if (v->u.shader.reflection) { diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 17ebafcec37..9ac3c6f314c 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -5887,10 +5887,8 @@ static void test_effect_optimize(void) ok(hr == S_OK, "Failed to get shader description, hr %#x.\n", hr); ok(!!shaderdesc.pInputSignature, "Expected input signature.\n"); ok(!shaderdesc.IsInline, "Unexpected inline flag.\n"); -todo_wine { ok(!!shaderdesc.pBytecode, "Expected bytecode.\n"); ok(shaderdesc.BytecodeLength != 0, "Unexpected bytecode length.\n"); -} ok(!strcmp(shaderdesc.SODecl, "SV_POSITION.x"), "Unexpected stream output declaration %s.\n", shaderdesc.SODecl); ok(shaderdesc.NumInputSignatureEntries != 0, "Unexpected input signature count.\n"); ok(shaderdesc.NumOutputSignatureEntries != 0, "Unexpected input signature count.\n"); @@ -5903,9 +5901,9 @@ todo_wine ok(hr == S_OK, "Failed to get shader description, hr %#x.\n", hr); ok(!!shaderdesc.pInputSignature, "Expected input signature.\n"); ok(!shaderdesc.IsInline, "Unexpected inline flag.\n"); +todo_wine { ok(!shaderdesc.pBytecode, "Unexpected bytecode.\n"); ok(shaderdesc.BytecodeLength == 0, "Unexpected bytecode length.\n"); -todo_wine { ok(!shaderdesc.SODecl, "Unexpected stream output declaration %p.\n", shaderdesc.SODecl); ok(shaderdesc.NumInputSignatureEntries == 0, "Unexpected input signature count.\n"); ok(shaderdesc.NumOutputSignatureEntries == 0, "Unexpected output signature count.\n");
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/effect.c | 26 ++++++++++++++++++++++++-- dlls/d3d10/tests/effect.c | 4 +--- 2 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 4f93f24600d..1a42b06f347 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -3225,9 +3225,31 @@ static struct ID3D10EffectTechnique * STDMETHODCALLTYPE d3d10_effect_GetTechniqu
static HRESULT STDMETHODCALLTYPE d3d10_effect_Optimize(ID3D10Effect *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d10_effect *effect = impl_from_ID3D10Effect(iface); + struct d3d10_effect_variable *v; + unsigned int i;
- return E_NOTIMPL; + FIXME("iface %p semi-stub!\n", iface); + + for (i = 0; i < effect->used_shader_count; ++i) + { + v = effect->used_shaders[i]; + + if (v->u.shader.reflection) + { + v->u.shader.reflection->lpVtbl->Release(v->u.shader.reflection); + v->u.shader.reflection = NULL; + } + if (v->u.shader.bytecode) + { + ID3D10Blob_Release(v->u.shader.bytecode); + v->u.shader.bytecode = NULL; + } + heap_free(v->u.shader.stream_output_declaration); + v->u.shader.stream_output_declaration = NULL; + } + + return S_OK; }
static BOOL STDMETHODCALLTYPE d3d10_effect_IsOptimized(ID3D10Effect *iface) diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 9ac3c6f314c..1dfe6180f0c 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -5894,20 +5894,18 @@ static void test_effect_optimize(void) ok(shaderdesc.NumOutputSignatureEntries != 0, "Unexpected input signature count.\n");
hr = effect->lpVtbl->Optimize(effect); -todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = gs->lpVtbl->GetShaderDesc(gs, 0, &shaderdesc); ok(hr == S_OK, "Failed to get shader description, hr %#x.\n", hr); ok(!!shaderdesc.pInputSignature, "Expected input signature.\n"); ok(!shaderdesc.IsInline, "Unexpected inline flag.\n"); -todo_wine { ok(!shaderdesc.pBytecode, "Unexpected bytecode.\n"); ok(shaderdesc.BytecodeLength == 0, "Unexpected bytecode length.\n"); ok(!shaderdesc.SODecl, "Unexpected stream output declaration %p.\n", shaderdesc.SODecl); ok(shaderdesc.NumInputSignatureEntries == 0, "Unexpected input signature count.\n"); ok(shaderdesc.NumOutputSignatureEntries == 0, "Unexpected output signature count.\n"); -} + effect->lpVtbl->Release(effect);
refcount = ID3D10Device_Release(device);