d3dcompiler: Handle redefining an intrinsic function as a user-defined function.
This commit is contained in:
parent
0824771423
commit
10fcb9379e
|
@ -2479,6 +2479,22 @@ void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_fu
|
||||||
if (func_entry)
|
if (func_entry)
|
||||||
{
|
{
|
||||||
func = WINE_RB_ENTRY_VALUE(func_entry, struct hlsl_ir_function, entry);
|
func = WINE_RB_ENTRY_VALUE(func_entry, struct hlsl_ir_function, entry);
|
||||||
|
if (intrinsic != func->intrinsic)
|
||||||
|
{
|
||||||
|
if (intrinsic)
|
||||||
|
{
|
||||||
|
ERR("Redeclaring a user defined function as an intrinsic.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TRACE("Function %s redeclared as a user defined function.\n", debugstr_a(name));
|
||||||
|
func->intrinsic = intrinsic;
|
||||||
|
wine_rb_destroy(&func->overloads, free_function_decl_rb, NULL);
|
||||||
|
if (wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs) == -1)
|
||||||
|
{
|
||||||
|
ERR("Failed to initialize function rbtree.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
decl->func = func;
|
decl->func = func;
|
||||||
if ((old_entry = wine_rb_get(&func->overloads, decl->parameters)))
|
if ((old_entry = wine_rb_get(&func->overloads, decl->parameters)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue