Mesa (staging/21.3): i915g: Initialize the rest of the "from_nir" temporary VS struct.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Feb 20 17:40:40 UTC 2022
Module: Mesa
Branch: staging/21.3
Commit: a7fb13971b5165e48f194fea332a4e5b8bb3687c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a7fb13971b5165e48f194fea332a4e5b8bb3687c
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>
(cherry picked from commit 780949c62bc2cd1805f99911a76fde016e430b6b)
---
.pick_status.json | 2 +-
src/gallium/drivers/i915/i915_state.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 9d53a7e3ee4..a26d803f80a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1282,7 +1282,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;
}
More information about the mesa-commit
mailing list