From 780949c62bc2cd1805f99911a76fde016e430b6b Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Sat, 5 Feb 2022 20:11:25 -0800 Subject: [PATCH] i915g: Initialize the rest of the "from_nir" temporary VS struct. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit draw looked at the uninitialized XFB state, which should just be zeroed out since i915 doesn't have XFB. Fixes: 2b3fc26da8be ("i915g: Switch to using nir-to-tgsi.") Reviewed-by: Zoltán Böszörményi Part-of: --- src/gallium/drivers/i915/i915_state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 0546db5b1fe..a6da6eeca7a 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -611,7 +611,7 @@ i915_create_vs_state(struct pipe_context *pipe, { struct i915_context *i915 = i915_context(pipe); - struct pipe_shader_state from_nir; + struct pipe_shader_state from_nir = { PIPE_SHADER_IR_TGSI }; if (templ->type == PIPE_SHADER_IR_NIR) { nir_shader *s = templ->ir.nir; @@ -622,7 +622,6 @@ i915_create_vs_state(struct pipe_context *pipe, * per-stage, and i915 FS can't do native integers. So, convert to TGSI, * where the draw path *does* support non-native-integers. */ - from_nir.type = PIPE_SHADER_IR_TGSI; from_nir.tokens = nir_to_tgsi(s, pipe->screen); templ = &from_nir; }