vkd3d-shader/fx: Correct empty pass check.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-07-09 15:11:47 +02:00 committed by Henri Verbeet
parent 958117df2f
commit dcf4ce753b
Notes: Henri Verbeet 2024-07-23 15:42:44 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/937
2 changed files with 4 additions and 4 deletions

View File

@ -189,8 +189,8 @@ static uint32_t write_string(const char *string, struct fx_write_context *fx)
static void write_pass(struct hlsl_ir_var *var, struct fx_write_context *fx) static void write_pass(struct hlsl_ir_var *var, struct fx_write_context *fx)
{ {
if (var->state_block_count) if (var->state_block_count && var->state_blocks[0]->count)
hlsl_fixme(fx->ctx, &var->loc, "Write state block assignments."); hlsl_fixme(fx->ctx, &var->loc, "Write pass assignments.");
fx->ops->write_pass(var, fx); fx->ops->write_pass(var, fx);
} }

View File

@ -7,14 +7,14 @@ shader model < 6.0
technique10 t1 < int a = 1; > {} technique10 t1 < int a = 1; > {}
technique10 t2 < int a = 2; int t1 = 3; int t2 = 4; > {} technique10 t2 < int a = 2; int t1 = 3; int t2 = 4; > {}
[effect todo] [effect]
// Annotations on passes // Annotations on passes
technique10 t1 < int a = 1; > technique10 t1 < int a = 1; >
{ {
pass < int t1 = 2; > {} pass < int t1 = 2; > {}
} }
[effect todo] [effect]
// Using names from the global scope // Using names from the global scope
float a; float a;