diff --git a/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt b/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt index fb82641f366..d0f7cebbc53 100644 --- a/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt +++ b/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt @@ -928,7 +928,7 @@ dEQP-GLES2.functional.uniform_api.random.21,Fail dEQP-GLES2.functional.uniform_api.random.24,Fail dEQP-GLES2.functional.uniform_api.random.54,Fail dEQP-GLES2.functional.uniform_api.random.71,Fail -dEQP-GLES2.functional.uniform_api.random.74,Crash +dEQP-GLES2.functional.uniform_api.random.74,Fail dEQP-GLES2.functional.uniform_api.random.80,Fail dEQP-GLES2.functional.uniform_api.random.81,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.int_ivec4_both,Fail diff --git a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt index aa7d173db18..d78d0f5db9d 100644 --- a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt +++ b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt @@ -688,14 +688,14 @@ spec@glsl-1.10@execution@fs-frontfacing-ternary-0.0-neg-1.0,Fail spec@glsl-1.10@execution@fs-frontfacing-ternary-1-neg-1,Fail spec@glsl-1.10@execution@fs-frontfacing-ternary-1.0-neg-1.0,Fail spec@glsl-1.10@execution@fs-frontfacing-ternary-neg-1.0-1.0,Fail -spec@glsl-1.10@execution@fs-loop-bounds-unrolled,Crash +spec@glsl-1.10@execution@fs-loop-bounds-unrolled,Fail spec@glsl-1.10@execution@fs-notequal-of-expression,Fail spec@glsl-1.10@execution@fs-sign-times-abs,Fail spec@glsl-1.10@execution@fs-sign-times-neg,Fail 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,Crash +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-clamp-vertex-color,Fail spec@glsl-1.10@execution@glsl-fs-convolution-1,Fail diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c index 4f4b2ea020b..6c8291f76bf 100644 --- a/src/gallium/drivers/i915/i915_fpc_translate.c +++ b/src/gallium/drivers/i915/i915_fpc_translate.c @@ -844,24 +844,29 @@ i915_translate_token(struct i915_fp_compile *p, case TGSI_TOKEN_TYPE_DECLARATION: if (token->FullDeclaration.Declaration.File == TGSI_FILE_CONSTANT) { - uint32_t i; - for (i = token->FullDeclaration.Range.First; - i <= - MIN2(token->FullDeclaration.Range.Last, I915_MAX_CONSTANT - 1); - i++) { - ifs->constant_flags[i] = I915_CONSTFLAG_USER; - ifs->num_constants = MAX2(ifs->num_constants, i + 1); + if (token->FullDeclaration.Range.Last >= I915_MAX_CONSTANT) { + i915_program_error(p, "Exceeded %d max uniforms", + I915_MAX_CONSTANT); + } else { + uint32_t i; + for (i = token->FullDeclaration.Range.First; + i <= token->FullDeclaration.Range.Last; i++) { + ifs->constant_flags[i] = I915_CONSTFLAG_USER; + ifs->num_constants = MAX2(ifs->num_constants, i + 1); + } } } else if (token->FullDeclaration.Declaration.File == TGSI_FILE_TEMPORARY) { - uint32_t i; - for (i = token->FullDeclaration.Range.First; - i <= token->FullDeclaration.Range.Last; i++) { - if (i >= I915_MAX_TEMPORARY) - debug_printf("Too many temps (%d)\n", i); - else + if (token->FullDeclaration.Range.Last >= I915_MAX_TEMPORARY) { + i915_program_error(p, "Exceeded %d max TGSI temps", + I915_MAX_TEMPORARY); + } else { + uint32_t i; + for (i = token->FullDeclaration.Range.First; + i <= token->FullDeclaration.Range.Last; i++) { /* XXX just use shader->info->file_mask[TGSI_FILE_TEMPORARY] */ p->temp_flag |= (1 << i); /* mark temp as used */ + } } } break; @@ -893,6 +898,10 @@ i915_translate_token(struct i915_fp_compile *p, break; } } + if (j == I915_MAX_CONSTANT) { + i915_program_error(p, "Exceeded %d max uniforms and immediates.", + I915_MAX_CONSTANT); + } } p->first_instruction = false;