aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-03-20 10:00:21 -0700
committerEric Anholt <[email protected]>2018-03-21 10:04:21 -0700
commitba87d85b043bf4beecae1afda22ea42b217df2b8 (patch)
tree76d4798c124baf12a57b3ac293c1b76aab3ed85d /src/gallium
parent3dd92184d598e2dc9c7b0934796842f5c3745337 (diff)
broadcom/vc5: Clamp the instance divisor to 16 bits.
Fixes debug assert on GTF-GLES3.gtf.GL3Tests.instanced_arrays.instanced_arrays_divisor Signed-off-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/vc5/vc5_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c
index 65dd9a2c42b..75cd948e4a3 100644
--- a/src/gallium/drivers/vc5/vc5_state.c
+++ b/src/gallium/drivers/vc5/vc5_state.c
@@ -319,7 +319,8 @@ vc5_vertex_state_create(struct pipe_context *pctx, unsigned num_elements,
attr.normalized_int_type = desc->channel[0].normalized;
attr.read_as_int_uint = desc->channel[0].pure_integer;
- attr.instance_divisor = elem->instance_divisor;
+ attr.instance_divisor = MIN2(elem->instance_divisor,
+ 0xffff);
switch (desc->channel[0].type) {
case UTIL_FORMAT_TYPE_FLOAT: