Skip to content
Snippets Groups Projects
Commit a9b07870 authored by Stéphane Marchesin's avatar Stéphane Marchesin
Browse files

i915g: Don't write constants past I915_MAX_CONSTANT


This happens with glsl-convolution-1, where we have 64 constants. This
doesn't make the test pass (we don't have 64 constants anyway, only
32) but this prevents it from crashing.

Signed-off-by: default avatarStéphane Marchesin <marcheu@chromium.org>
parent 5f61744a
No related branches found
No related tags found
No related merge requests found
......@@ -1128,7 +1128,7 @@ static void i915_translate_token(struct i915_fp_compile *p,
== TGSI_FILE_CONSTANT) {
uint i;
for (i = token->FullDeclaration.Range.First;
i <= token->FullDeclaration.Range.Last;
i <= MIN2(token->FullDeclaration.Range.Last, I915_MAX_CONSTANT - 1);
i++) {
assert(ifs->constant_flags[i] == 0x0);
ifs->constant_flags[i] = I915_CONSTFLAG_USER;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment