i915g: Fix off-by-one in constant count assertion.

You can have up to C[31].

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
This commit is contained in:
Emma Anholt 2021-06-27 20:30:27 -07:00
parent ccc9418b27
commit 71617c3328
2 changed files with 2 additions and 2 deletions

View File

@ -696,7 +696,7 @@ spec@glsl-1.10@execution@fs-sign-times-neg-abs,Fail
spec@glsl-1.10@execution@fs-sign-times-sign,Fail
spec@glsl-1.10@execution@gl_lightsource_indirect,Fail
spec@glsl-1.10@execution@glsl-1.10-built-in-matrix-state,Fail
spec@glsl-1.10@execution@glsl-1.10-built-in-uniform-state,Crash
spec@glsl-1.10@execution@glsl-1.10-built-in-uniform-state,Fail
spec@glsl-1.10@execution@glsl-clamp-vertex-color,Fail
spec@glsl-1.10@execution@glsl-fs-convolution-1,Fail
spec@glsl-1.10@execution@glsl-fs-convolution-2,Fail

View File

@ -331,7 +331,7 @@ emit_constants(struct i915_context *i915)
*/
const uint32_t nr = i915->fs->num_constants;
assert(nr < I915_MAX_CONSTANT);
assert(nr <= I915_MAX_CONSTANT);
if (nr) {
uint32_t i;