Mesa (main): i915g: Initialize the rest of the "from_nir" temporary VS struct.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 15 18:42:51 UTC 2022


Module: Mesa
Branch: main
Commit: 780949c62bc2cd1805f99911a76fde016e430b6b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=780949c62bc2cd1805f99911a76fde016e430b6b

Author: Emma Anholt <emma at anholt.net>
Date:   Sat Feb  5 20:11:25 2022 -0800

i915g: Initialize the rest of the "from_nir" temporary VS struct.

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 <zboszor at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14896>

---

 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;
    }



More information about the mesa-commit mailing list