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: 2b3fc26da8 ("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 780949c62b)
This commit is contained in:
Emma Anholt 2022-02-05 20:11:25 -08:00 committed by Eric Engestrom
parent f3cfbbd457
commit 49f5acdc22
2 changed files with 2 additions and 3 deletions

View file

@ -2398,7 +2398,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"
},

View file

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