diff --git a/src/gallium/drivers/r300/ci/r300-r480-fails.txt b/src/gallium/drivers/r300/ci/r300-r480-fails.txt index e891ed5ebe4..3f8b4d4fdf9 100644 --- a/src/gallium/drivers/r300/ci/r300-r480-fails.txt +++ b/src/gallium/drivers/r300/ci/r300-r480-fails.txt @@ -618,10 +618,6 @@ dEQP-GLES2.functional.shaders.loops.while_uniform_iterations.unconditional_conti dEQP-GLES2.functional.shaders.loops.while_uniform_iterations.unconditional_continue_vertex,Fail dEQP-GLES2.functional.shaders.loops.while_uniform_iterations.vector_counter_fragment,Fail dEQP-GLES2.functional.shaders.loops.while_uniform_iterations.vector_counter_vertex,Fail -dEQP-GLES2.functional.shaders.operator.angle_and_trigonometry.asin.highp_vec2_fragment,Fail -dEQP-GLES2.functional.shaders.operator.angle_and_trigonometry.asin.mediump_vec2_fragment,Fail -dEQP-GLES2.functional.shaders.operator.angle_and_trigonometry.atan.highp_vec2_fragment,Fail -dEQP-GLES2.functional.shaders.operator.angle_and_trigonometry.atan.mediump_vec2_fragment,Fail dEQP-GLES2.functional.shaders.random.all_features.fragment.1,Fail dEQP-GLES2.functional.shaders.random.all_features.fragment.5,Fail dEQP-GLES2.functional.shaders.random.all_features.fragment.6,Fail diff --git a/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c b/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c index 4e8fdf5442b..d5e37e37851 100644 --- a/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c +++ b/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c @@ -64,6 +64,9 @@ static const struct swizzle_data native_swizzles[] = { }; static const int num_native_swizzles = ARRAY_SIZE(native_swizzles); +/* Only swizzles with srcp_stride != 0 can be used for presub, so + * just the first five from the list. */ +static const int num_presub_swizzles = 5; /** * Find a native RGB swizzle that matches the given swizzle. @@ -158,7 +161,9 @@ static void r300_swizzle_split( unsigned int best_matchmask = 0; int i, comp; - for(i = 0; i < num_native_swizzles; ++i) { + unsigned num_swizzles = src.File == RC_FILE_PRESUB ? num_presub_swizzles : num_native_swizzles; + + for(i = 0; i < num_swizzles; ++i) { const struct swizzle_data *sd = &native_swizzles[i]; unsigned int matchcount = 0; unsigned int matchmask = 0;