mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/ir: Run validation after normalising combined samplers.
This commit is contained in:
parent
c2fd1e42fd
commit
4b06729be8
Notes:
Henri Verbeet
2024-09-11 15:34:39 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1058
@ -2055,7 +2055,7 @@ static enum vkd3d_result vsir_program_remove_dead_code(struct vsir_program *prog
|
|||||||
}
|
}
|
||||||
|
|
||||||
static enum vkd3d_result vsir_program_normalise_combined_samplers(struct vsir_program *program,
|
static enum vkd3d_result vsir_program_normalise_combined_samplers(struct vsir_program *program,
|
||||||
struct vkd3d_shader_message_context *message_context)
|
struct vsir_normalisation_context *ctx)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
@ -2140,7 +2140,8 @@ static enum vkd3d_result vsir_program_normalise_combined_samplers(struct vsir_pr
|
|||||||
case VKD3DSIH_TEXREG2AR:
|
case VKD3DSIH_TEXREG2AR:
|
||||||
case VKD3DSIH_TEXREG2GB:
|
case VKD3DSIH_TEXREG2GB:
|
||||||
case VKD3DSIH_TEXREG2RGB:
|
case VKD3DSIH_TEXREG2RGB:
|
||||||
vkd3d_shader_error(message_context, &ins->location, VKD3D_SHADER_ERROR_VSIR_NOT_IMPLEMENTED,
|
vkd3d_shader_error(ctx->message_context, &ins->location,
|
||||||
|
VKD3D_SHADER_ERROR_VSIR_NOT_IMPLEMENTED,
|
||||||
"Aborting due to not yet implemented feature: "
|
"Aborting due to not yet implemented feature: "
|
||||||
"Combined sampler instruction %#x.", ins->opcode);
|
"Combined sampler instruction %#x.", ins->opcode);
|
||||||
return VKD3D_ERROR_NOT_IMPLEMENTED;
|
return VKD3D_ERROR_NOT_IMPLEMENTED;
|
||||||
@ -6685,13 +6686,11 @@ enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t
|
|||||||
vsir_transform(&ctx, vsir_program_normalise_io_registers);
|
vsir_transform(&ctx, vsir_program_normalise_io_registers);
|
||||||
vsir_transform(&ctx, vsir_program_normalise_flat_constants);
|
vsir_transform(&ctx, vsir_program_normalise_flat_constants);
|
||||||
vsir_transform(&ctx, vsir_program_remove_dead_code);
|
vsir_transform(&ctx, vsir_program_remove_dead_code);
|
||||||
|
vsir_transform(&ctx, vsir_program_normalise_combined_samplers);
|
||||||
|
|
||||||
if (ctx.result < 0)
|
if (ctx.result < 0)
|
||||||
return ctx.result;
|
return ctx.result;
|
||||||
|
|
||||||
if ((result = vsir_program_normalise_combined_samplers(program, message_context)) < 0)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
if (compile_info->target_type != VKD3D_SHADER_TARGET_GLSL
|
if (compile_info->target_type != VKD3D_SHADER_TARGET_GLSL
|
||||||
&& (result = vsir_program_flatten_control_flow_constructs(program, &ctx)) < 0)
|
&& (result = vsir_program_flatten_control_flow_constructs(program, &ctx)) < 0)
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user