aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
authorNeha Bhende <[email protected]>2020-05-27 20:45:29 +0530
committerMarge Bot <[email protected]>2020-05-28 23:27:53 +0000
commit838666a41dcbbf566bff57e7a7b841e50bf2bdce (patch)
tree54f733a305a748fd037d82ea956870c2ac9cff47 /src/gallium/auxiliary/tgsi
parent034329128b703f8c2e8ad1980ddb131df372ce48 (diff)
util: Initialize pipe_shader_state for passthrough and transform shaders
mesa/st is initializing pipe_shader_state for user define shaders. This patch intialized pipe_shader_state for all passthough and transform shaders. This fixes crashes for several opengl apps. Issue is found in vmware internal testing Fixes: f01c0565bb9 ("draw: free the NIR IR.") Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5240>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 55ed7fc62b4..f3c58761e18 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -2133,7 +2133,7 @@ void *ureg_create_shader( struct ureg_program *ureg,
struct pipe_context *pipe,
const struct pipe_stream_output_info *so )
{
- struct pipe_shader_state state;
+ struct pipe_shader_state state = {0};
pipe_shader_state_from_tgsi(&state, ureg_finalize(ureg));
if(!state.tokens)