summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmma Anholt <emma@anholt.net>2022-02-05 20:11:25 -0800
committerDylan Baker <dylan.c.baker@intel.com>2022-02-24 14:56:51 -0800
commit53f532bac20b7bd40d8c60225095e98a235cae9a (patch)
tree62999aac90a5b77dfaca854993f75b04511b5889
parent7885a3d1b11961f48242f51879fe8b990e2f6cfb (diff)
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@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14896> (cherry picked from commit 780949c62bc2cd1805f99911a76fde016e430b6b)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/i915/i915_state.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json
index d2df687ed2b..c307f3770f7 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -229,7 +229,7 @@
"description": "i915g: Initialize the rest of the \"from_nir\" temporary VS struct.",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "2b3fc26da8bed1f70f6631a3fc6c6cd43fe2acc2"
},
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index c0c5ce5e648..e473f50a3a5 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -608,7 +608,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;
@@ -619,7 +619,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;
}