[PATCH 7/7] d3dx9: Support skip_constants parameter for effect.
Paul Gofman
gofmanp at gmail.com
Thu Jul 6 06:15:11 CDT 2017
For bug #42918.
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
dlls/d3dx9_36/d3dx9_private.h | 3 +-
dlls/d3dx9_36/effect.c | 153 ++++++++++++++++++++++++++++++++++++------
dlls/d3dx9_36/preshader.c | 77 ++++++++++++++-------
dlls/d3dx9_36/tests/effect.c | 12 +---
4 files changed, 191 insertions(+), 54 deletions(-)
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
index bfb3909..087ef88 100644
--- a/dlls/d3dx9_36/d3dx9_private.h
+++ b/dlls/d3dx9_36/d3dx9_private.h
@@ -347,7 +347,8 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte_code,
unsigned int byte_code_size, D3DXPARAMETER_TYPE type,
- struct d3dx_param_eval **peval, ULONG64 *version_counter) DECLSPEC_HIDDEN;
+ struct d3dx_param_eval **peval, ULONG64 *version_counter,
+ const char **skip_constants_names, unsigned int skip_constant_name_count) DECLSPEC_HIDDEN;
void d3dx_free_param_eval(struct d3dx_param_eval *peval) DECLSPEC_HIDDEN;
HRESULT d3dx_evaluate_parameter(struct d3dx_param_eval *peval,
const struct d3dx_parameter *param, void *param_value) DECLSPEC_HIDDEN;
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index a5314a5..529eff2 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -5942,7 +5942,8 @@ static HRESULT d3dx9_create_object(struct d3dx9_base_effect *base, struct d3dx_o
return D3D_OK;
}
-static HRESULT d3dx9_parse_array_selector(struct d3dx9_base_effect *base, struct d3dx_parameter *param)
+static HRESULT d3dx9_parse_array_selector(struct d3dx9_base_effect *base, struct d3dx_parameter *param,
+ const char **skip_constants_names, unsigned int skip_constants_name_count)
{
DWORD string_size;
struct d3dx_object *object = &base->objects[param->object_id];
@@ -5967,7 +5968,7 @@ static HRESULT d3dx9_parse_array_selector(struct d3dx9_base_effect *base, struct
if (string_size % sizeof(DWORD))
FIXME("Unaligned string_size %u.\n", string_size);
d3dx_create_param_eval(base, (DWORD *)(ptr + string_size) + 1, object->size - (string_size + sizeof(DWORD)),
- D3DXPT_INT, ¶m->param_eval, get_version_counter_ptr(base));
+ D3DXPT_INT, ¶m->param_eval, get_version_counter_ptr(base), NULL, 0);
ret = D3D_OK;
param = param->u.referenced_param;
if (param->type == D3DXPT_VERTEXSHADER || param->type == D3DXPT_PIXELSHADER)
@@ -5986,7 +5987,8 @@ static HRESULT d3dx9_parse_array_selector(struct d3dx9_base_effect *base, struct
TRACE("Creating preshader for object %u.\n", param->members[i].object_id);
object = &base->objects[param->members[i].object_id];
if (FAILED(ret = d3dx_create_param_eval(base, object->data, object->size, param->type,
- ¶m->members[i].param_eval, get_version_counter_ptr(base))))
+ ¶m->members[i].param_eval, get_version_counter_ptr(base),
+ skip_constants_names, skip_constants_name_count)))
break;
}
}
@@ -5994,7 +5996,8 @@ static HRESULT d3dx9_parse_array_selector(struct d3dx9_base_effect *base, struct
return ret;
}
-static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *data, const char **ptr)
+static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *data, const char **ptr,
+ const char **skip_constants_names, unsigned int skip_constants_name_count)
{
DWORD technique_index;
DWORD index, state_index, usage, element_index;
@@ -6101,7 +6104,8 @@ static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *
if (FAILED(hr = d3dx9_create_object(base, object)))
return hr;
if (FAILED(hr = d3dx_create_param_eval(base, object->data, object->size, param->type,
- ¶m->param_eval, get_version_counter_ptr(base))))
+ ¶m->param_eval, get_version_counter_ptr(base),
+ skip_constants_names, skip_constants_name_count)))
return hr;
}
break;
@@ -6114,7 +6118,7 @@ static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *
if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr)))
return hr;
d3dx_create_param_eval(base, object->data, object->size, param->type,
- ¶m->param_eval, get_version_counter_ptr(base));
+ ¶m->param_eval, get_version_counter_ptr(base), NULL, 0);
break;
default:
@@ -6142,7 +6146,8 @@ static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *
if (!refpar->param_eval)
{
if (FAILED(hr = d3dx_create_param_eval(base, refobj->data, refobj->size,
- refpar->type, &refpar->param_eval, get_version_counter_ptr(base))))
+ refpar->type, &refpar->param_eval, get_version_counter_ptr(base),
+ skip_constants_names, skip_constants_name_count)))
return hr;
}
}
@@ -6158,7 +6163,7 @@ static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *
state->type = ST_ARRAY_SELECTOR;
if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr)))
return hr;
- hr = d3dx9_parse_array_selector(base, param);
+ hr = d3dx9_parse_array_selector(base, param, skip_constants_names, skip_constants_name_count);
break;
default:
@@ -6175,7 +6180,8 @@ static BOOL param_set_top_level_param(void *top_level_param, struct d3dx_paramet
return FALSE;
}
-static HRESULT d3dx9_parse_effect(struct d3dx9_base_effect *base, const char *data, UINT data_size, DWORD start)
+static HRESULT d3dx9_parse_effect(struct d3dx9_base_effect *base, const char *data, UINT data_size,
+ DWORD start, const char **skip_constants_names, unsigned int skip_constants_name_count)
{
const char *ptr = data + start;
UINT stringcount, resourcecount;
@@ -6274,7 +6280,7 @@ static HRESULT d3dx9_parse_effect(struct d3dx9_base_effect *base, const char *da
{
TRACE("parse resource %u\n", i);
- hr = d3dx9_parse_resource(base, data, &ptr);
+ hr = d3dx9_parse_resource(base, data, &ptr, skip_constants_names, skip_constants_name_count);
if (hr != D3D_OK)
{
WARN("Failed to parse resource %u\n", i);
@@ -6328,16 +6334,73 @@ err_out:
return hr;
}
+#define INITIAL_CONST_NAMES_SIZE 4
+
+static char *next_valid_constant_name(char **string)
+{
+ char *ret = *string;
+ char *next;
+
+ while (*ret && !isalpha(*ret) && *ret != '_')
+ ++ret;
+ if (!*ret)
+ return NULL;
+
+ next = ret + 1;
+ while (isalpha(*next) || isdigit(*next) || *next == '_')
+ ++next;
+ if (*next)
+ *next++ = 0;
+ *string = next;
+ return ret;
+}
+
+static HRESULT parse_skip_constants_string(char *skip_constants, const char ***names,
+ unsigned int *name_count)
+{
+ const char *name;
+ char *s;
+ unsigned int size = INITIAL_CONST_NAMES_SIZE;
+
+ *names = HeapAlloc(GetProcessHeap(), 0, sizeof(*names) * size);
+ if (!*names)
+ return E_OUTOFMEMORY;
+
+ *name_count = 0;
+ s = skip_constants;
+ while ((name = next_valid_constant_name(&s)))
+ {
+ if (*name_count == size)
+ {
+ size *= 2;
+ *names = HeapReAlloc(GetProcessHeap(), 0, *names, sizeof(*names) * size);
+ if (!*names)
+ return E_OUTOFMEMORY;
+ }
+ (*names)[(*name_count)++] = name;
+ }
+ *names = HeapReAlloc(GetProcessHeap(), 0, *names, *name_count * sizeof(*names));
+ if (!*names)
+ return E_OUTOFMEMORY;
+ return D3D_OK;
+}
+
static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base,
const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include,
- UINT eflags, ID3DBlob **errors, struct ID3DXEffectImpl *effect, struct d3dx_effect_pool *pool)
+ UINT eflags, ID3DBlob **errors, struct ID3DXEffectImpl *effect, struct d3dx_effect_pool *pool,
+ const char *skip_constants)
{
DWORD tag, offset;
const char *ptr = data;
HRESULT hr;
ID3DBlob *bytecode = NULL, *temp_errors = NULL;
+ char *skip_constants_buffer = NULL;
+ const char **skip_constants_names = NULL;
+ unsigned int skip_constants_name_count = 0;
+ unsigned int i, j;
- TRACE("base %p, data %p, data_size %lu, effect %p, pool %p.\n", base, data, data_size, effect, pool);
+ TRACE("base %p, data %p, data_size %lu, effect %p, pool %p, skip_constants %s.\n",
+ base, data, data_size, effect, pool, debugstr_a(skip_constants));
base->effect = effect;
base->pool = pool;
@@ -6394,24 +6457,77 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base,
TRACE("Tag: %x\n", tag);
}
+ if (skip_constants)
+ {
+ skip_constants_buffer = HeapAlloc(GetProcessHeap(), 0,
+ sizeof(*skip_constants_buffer) * (strlen(skip_constants) + 1));
+ if (!skip_constants_buffer)
+ {
+ if (bytecode)
+ ID3D10Blob_Release(bytecode);
+ return E_OUTOFMEMORY;
+ }
+ strcpy(skip_constants_buffer, skip_constants);
+
+ if (FAILED(hr = parse_skip_constants_string(skip_constants_buffer,
+ &skip_constants_names, &skip_constants_name_count)))
+ {
+ HeapFree(GetProcessHeap(), 0, skip_constants_buffer);
+ if (bytecode)
+ ID3D10Blob_Release(bytecode);
+ return hr;
+ }
+ }
read_dword(&ptr, &offset);
TRACE("Offset: %x\n", offset);
- hr = d3dx9_parse_effect(base, ptr, data_size, offset);
+ hr = d3dx9_parse_effect(base, ptr, data_size, offset, skip_constants_names, skip_constants_name_count);
if (bytecode)
ID3D10Blob_Release(bytecode);
if (hr != D3D_OK)
{
FIXME("Failed to parse effect.\n");
+ HeapFree(GetProcessHeap(), 0, skip_constants_buffer);
+ HeapFree(GetProcessHeap(), 0, skip_constants_names);
return hr;
}
+ for (i = 0; i < skip_constants_name_count; ++i)
+ {
+ struct d3dx_parameter *param;
+
+ param = get_parameter_by_name(base, NULL, skip_constants_names[i]);
+ if (param)
+ {
+ for (j = 0; j < base->technique_count; ++j)
+ {
+ if (is_parameter_used(param, &base->techniques[j]))
+ {
+ WARN("Parameter %s found in skip_constants is used in technique %u.\n",
+ debugstr_a(skip_constants_names[i]), j);
+ HeapFree(GetProcessHeap(), 0, skip_constants_buffer);
+ HeapFree(GetProcessHeap(), 0, skip_constants_names);
+ d3dx9_base_effect_cleanup(base);
+ return D3DERR_INVALIDCALL;
+ }
+ }
+ }
+ else
+ {
+ TRACE("Parameter %s found in skip_constants not found.\n",
+ debugstr_a(skip_constants_names[i]));
+ }
+ }
+
+ HeapFree(GetProcessHeap(), 0, skip_constants_buffer);
+ HeapFree(GetProcessHeap(), 0, skip_constants_names);
+
return D3D_OK;
}
static HRESULT d3dx9_effect_init(struct ID3DXEffectImpl *effect, struct IDirect3DDevice9 *device,
const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include,
- UINT eflags, ID3DBlob **error_messages, struct ID3DXEffectPool *pool)
+ UINT eflags, ID3DBlob **error_messages, struct ID3DXEffectPool *pool, const char *skip_constants)
{
HRESULT hr;
struct d3dx_effect_pool *pool_impl = NULL;
@@ -6432,7 +6548,7 @@ static HRESULT d3dx9_effect_init(struct ID3DXEffectImpl *effect, struct IDirect3
effect->device = device;
if (FAILED(hr = d3dx9_base_effect_init(&effect->base_effect, data, data_size, defines, include,
- eflags, error_messages, effect, pool_impl)))
+ eflags, error_messages, effect, pool_impl, skip_constants)))
{
FIXME("Failed to parse effect, hr %#x.\n", hr);
free_effect(effect);
@@ -6474,15 +6590,12 @@ HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *s
if (!effect)
return D3D_OK;
- if (skip_constants)
- FIXME("skip_constants is not NULL, not supported yet.\n");
-
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
return E_OUTOFMEMORY;
hr = d3dx9_effect_init(object, device, srcdata, srcdatalen, (const D3D_SHADER_MACRO *)defines,
- (ID3DInclude *)include, flags, (ID3DBlob **)compilation_errors, pool);
+ (ID3DInclude *)include, flags, (ID3DBlob **)compilation_errors, pool, skip_constants);
if (FAILED(hr))
{
WARN("Failed to create effect object.\n");
@@ -6519,7 +6632,7 @@ static HRESULT d3dx9_effect_compiler_init(struct ID3DXEffectCompilerImpl *compil
compiler->ref = 1;
if (FAILED(hr = d3dx9_base_effect_init(&compiler->base_effect, data, data_size, defines,
- include, eflags, error_messages, NULL, NULL)))
+ include, eflags, error_messages, NULL, NULL, NULL)))
{
FIXME("Failed to parse effect, hr %#x.\n", hr);
free_effect_compiler(compiler);
diff --git a/dlls/d3dx9_36/preshader.c b/dlls/d3dx9_36/preshader.c
index 34fed07..e811ac8 100644
--- a/dlls/d3dx9_36/preshader.c
+++ b/dlls/d3dx9_36/preshader.c
@@ -609,7 +609,8 @@ static HRESULT get_ctab_constant_desc(ID3DXConstantTable *ctab, D3DXHANDLE hc, D
return D3D_OK;
}
-static HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab *out, struct d3dx9_base_effect *base)
+static HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab *out,
+ struct d3dx9_base_effect *base, const char **skip_constants_names, unsigned int skip_constant_name_count)
{
ID3DXConstantTable *ctab;
D3DXCONSTANT_DESC *cdesc;
@@ -617,7 +618,7 @@ static HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab
D3DXCONSTANTTABLE_DESC desc;
HRESULT hr;
D3DXHANDLE hc;
- unsigned int i;
+ unsigned int i, j;
hr = D3DXGetShaderConstantTable(byte_code, &ctab);
if (FAILED(hr) || !ctab)
@@ -642,42 +643,71 @@ static HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab
for (i = 0; i < desc.Constants; ++i)
{
+ const D3DXSHADER_CONSTANTINFO *constant_info;
+ unsigned int index = out->input_count;
+
hc = ID3DXConstantTable_GetConstant(ctab, NULL, i);
if (!hc)
{
FIXME("Null constant handle.\n");
goto err_out;
}
- if (FAILED(hr = get_ctab_constant_desc(ctab, hc, &cdesc[i])))
+ if (FAILED(hr = get_ctab_constant_desc(ctab, hc, &cdesc[index])))
goto err_out;
- inputs_param[i] = get_parameter_by_name(base, NULL, cdesc[i].Name);
- if (!inputs_param[i])
+ inputs_param[index] = get_parameter_by_name(base, NULL, cdesc[index].Name);
+ if (!inputs_param[index])
{
- WARN("Could not find parameter %s in effect.\n", cdesc[i].Name);
+ WARN("Could not find parameter %s in effect.\n", cdesc[index].Name);
continue;
}
- if (cdesc[i].Class == D3DXPC_OBJECT)
+ if (cdesc[index].Class == D3DXPC_OBJECT)
{
- TRACE("Object %s, parameter %p.\n", cdesc[i].Name, inputs_param[i]);
- if (cdesc[i].RegisterSet != D3DXRS_SAMPLER || inputs_param[i]->class != D3DXPC_OBJECT
- || !is_param_type_sampler(inputs_param[i]->type))
+ TRACE("Object %s, parameter %p.\n", cdesc[index].Name, inputs_param[index]);
+ if (cdesc[index].RegisterSet != D3DXRS_SAMPLER || inputs_param[index]->class != D3DXPC_OBJECT
+ || !is_param_type_sampler(inputs_param[index]->type))
{
- WARN("Unexpected object type, constant %s.\n", debugstr_a(cdesc[i].Name));
+ WARN("Unexpected object type, constant %s.\n", debugstr_a(cdesc[index].Name));
hr = D3DERR_INVALIDCALL;
goto err_out;
}
- if (max(inputs_param[i]->element_count, 1) < cdesc[i].RegisterCount)
+ if (max(inputs_param[index]->element_count, 1) < cdesc[index].RegisterCount)
{
- WARN("Register count exceeds parameter size, constant %s.\n", debugstr_a(cdesc[i].Name));
+ WARN("Register count exceeds parameter size, constant %s.\n", debugstr_a(cdesc[index].Name));
hr = D3DERR_INVALIDCALL;
goto err_out;
}
- continue;
}
- if (FAILED(hr = init_set_constants_param(out, ctab, hc, inputs_param[i])))
+
+ for (j = 0; j < skip_constant_name_count; ++j)
+ {
+ if (!strcmp(cdesc[index].Name, skip_constants_names[j]))
+ {
+ constant_info = d3dx_shader_get_raw_constant_info(ctab, hc);
+ if (!constant_info)
+ {
+ FIXME("Could not get raw constant info structure.\n");
+ hr = D3DERR_INVALIDCALL;
+ goto err_out;
+ }
+ if (!constant_info->Reserved && inputs_param[index])
+ {
+ WARN("Parameter %s found in skip_constants is not register bound.\n",
+ cdesc[index].Name);
+ hr = D3DERR_INVALIDCALL;
+ goto err_out;
+ }
+ TRACE("Skipping constant %s.\n", cdesc[index].Name);
+ break;
+ }
+ }
+ if (j < skip_constant_name_count)
+ continue;
+ ++out->input_count;
+ if (inputs_param[index]->class == D3DXPC_OBJECT)
+ continue;
+ if (FAILED(hr = init_set_constants_param(out, ctab, hc, inputs_param[index])))
goto err_out;
}
- out->input_count = desc.Constants;
if (out->const_set_count)
{
out->const_set = HeapReAlloc(GetProcessHeap(), 0, out->const_set,
@@ -866,7 +896,7 @@ static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, u
saved_word = *ptr;
*ptr = 0xfffe0000;
- hr = get_constants_desc(ptr, &pres->inputs, base);
+ hr = get_constants_desc(ptr, &pres->inputs, base, NULL, 0);
*ptr = saved_word;
if (FAILED(hr))
return hr;
@@ -920,7 +950,8 @@ static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, u
}
HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte_code, unsigned int byte_code_size,
- D3DXPARAMETER_TYPE type, struct d3dx_param_eval **peval_out, ULONG64 *version_counter)
+ D3DXPARAMETER_TYPE type, struct d3dx_param_eval **peval_out, ULONG64 *version_counter,
+ const char **skip_constants_names, unsigned int skip_constants_name_count)
{
struct d3dx_param_eval *peval;
unsigned int *ptr;
@@ -971,9 +1002,10 @@ HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte
}
TRACE("Shader version %#x.\n", *ptr & 0xffff);
- if (FAILED(ret = get_constants_desc(ptr, &peval->shader_inputs, base_effect)))
+ if (FAILED(ret = get_constants_desc(ptr, &peval->shader_inputs, base_effect,
+ skip_constants_names, skip_constants_name_count)))
{
- FIXME("Could not get shader constant table, ret %#x.\n", ret);
+ WARN("Could not get shader constant table, ret %#x.\n", ret);
goto err_out;
}
update_table_sizes_consts(peval->pres.regs.table_sizes, &peval->shader_inputs);
@@ -1014,7 +1046,7 @@ HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte
return D3D_OK;
err_out:
- FIXME("Error creating parameter evaluator.\n");
+ WARN("Error creating parameter evaluator.\n");
d3dx_free_param_eval(peval);
*peval_out = NULL;
return ret;
@@ -1596,8 +1628,7 @@ static BOOL is_const_tab_input_dirty(struct d3dx_const_tab *ctab, ULONG64 update
update_version = ctab->update_version;
for (i = 0; i < ctab->input_count; ++i)
{
- if (ctab->inputs_param[i]
- && is_param_dirty(ctab->inputs_param[i], update_version))
+ if (is_param_dirty(ctab->inputs_param[i], update_version))
return TRUE;
}
return FALSE;
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index fec61f0..9d9c671 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -6920,25 +6920,17 @@ static void test_effect_skip_constants(IDirect3DDevice9 *device)
hr = D3DXCreateEffectEx(device, test_effect_skip_constants_blob, sizeof(test_effect_skip_constants_blob),
NULL, NULL, "v3", 0, NULL, &effect, NULL);
- todo_wine
ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
- if (SUCCEEDED(hr))
- effect->lpVtbl->Release(effect);
hr = D3DXCreateEffectEx(device, test_effect_skip_constants_blob, sizeof(test_effect_skip_constants_blob),
NULL, NULL, "v4", 0, NULL, &effect, NULL);
- todo_wine
ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
- if (SUCCEEDED(hr))
- effect->lpVtbl->Release(effect);
hr = D3DXCreateEffectEx(device, test_effect_skip_constants_blob, sizeof(test_effect_skip_constants_blob),
NULL, NULL, " v1#,.+-= &\t\nv2*/!\"'v5 v6[1]", 0, NULL, &effect, NULL);
ok(hr == D3D_OK, "Got result %#x.\n", hr);
- todo_wine
ok(!effect->lpVtbl->IsParameterUsed(effect, "v1", "tech0"),
"Unexpected IsParameterUsed result.\n");
- todo_wine
ok(!effect->lpVtbl->IsParameterUsed(effect, "v2", "tech0"),
"Unexpected IsParameterUsed result.\n");
ok(effect->lpVtbl->IsParameterUsed(effect, "v3", "tech0"),
@@ -6970,11 +6962,11 @@ static void test_effect_skip_constants(IDirect3DDevice9 *device)
fvect.x = 30.0f;
test_effect_shared_parameters_compare_vconst(device, 0, &fvect, FALSE);
for (i = 1; i < 4; ++i)
- test_effect_shared_parameters_compare_vconst(device, i, &fvect_filler, i > 1);
+ test_effect_shared_parameters_compare_vconst(device, i, &fvect_filler, FALSE);
fvect.x = 31.0f;
test_effect_shared_parameters_compare_vconst(device, 4, &fvect, FALSE);
for (i = 5; i < 256; ++i)
- test_effect_shared_parameters_compare_vconst(device, i, &fvect_filler, i < 7);
+ test_effect_shared_parameters_compare_vconst(device, i, &fvect_filler, FALSE);
hr = effect->lpVtbl->EndPass(effect);
ok(hr == D3D_OK, "Got result %#x.\n", hr);
--
2.9.4
More information about the wine-patches
mailing list