summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-09-04 01:24:39 +0100
committerDave Airlie <[email protected]>2015-09-11 03:05:42 +0100
commitb46cbc36072ae050f648f9baa974c4180d9bb8a3 (patch)
treea1241eb156b453e0cd2da24e639cde6dde912744
parent34cff76fc2da1ce9abad6e2b1856fec6a950d19c (diff)
st/mesa: set the vbuffer to NULL if we are skipping it
If we skip a vbuffer we need to make sure we NULL out the contents, otherwise when it gets passed to the driver it will get confused. This was hit by: GL41-CTS.gpu_shader_fp64.varyings Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_atom_array.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c
index 56b8019a36f..0847184d74d 100644
--- a/src/mesa/state_tracker/st_atom_array.c
+++ b/src/mesa/state_tracker/st_atom_array.c
@@ -567,8 +567,12 @@ setup_non_interleaved_attribs(struct st_context *st,
unsigned src_format;
array = get_client_array(vp, arrays, attr);
- if (!array)
+ if (!array) {
+ vbuffer[attr].buffer = NULL;
+ vbuffer[attr].user_buffer = NULL;
+ vbuffer[attr].buffer_offset = 0;
continue;
+ }
stride = array->StrideB;
bufobj = array->BufferObj;