From a6a687b197f8355975f5b67a285ba47ecf200dfb Mon Sep 17 00:00:00 2001 From: Charmaine Lee Date: Wed, 14 Jun 2023 03:14:41 +0300 Subject: [PATCH] svga: fix shader type after ntt Set shader type to TGSI after ntt. Fixes assert in svga_create_shader. Fixes: 0ac95418048 ("gallium: Drop PIPE_SHADER_CAP_PREFERRED_IR") Reviewed-by: Neha Bhende Part-of: --- src/gallium/drivers/svga/svga_shader.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c index 6643e2ded56..cac90c8d4ab 100644 --- a/src/gallium/drivers/svga/svga_shader.c +++ b/src/gallium/drivers/svga/svga_shader.c @@ -923,19 +923,13 @@ svga_create_shader(struct pipe_context *pipe, return NULL; shader->id = svga->debug.shader_id++; - shader->type = templ->type; shader->stage = stage; shader->tokens = pipe_shader_state_to_tgsi_tokens(pipe->screen, templ); + shader->type = PIPE_SHADER_IR_TGSI; - if (shader->type == PIPE_SHADER_IR_TGSI) { - /* Collect basic info of the shader */ - svga_tgsi_scan_shader(shader); - } - else { - debug_printf("Unexpected nir shader\n"); - assert(0); - } + /* Collect basic info of the shader */ + svga_tgsi_scan_shader(shader); /* check for any stream output declarations */ if (templ->stream_output.num_outputs) {