Mesa (main): i915g: Use the color swizzle to reshuffle the blend const color.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 22 18:38:53 UTC 2021


Module: Mesa
Branch: main
Commit: 4ef8eebdc7cf244a999e754c070471cfc3e8425a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ef8eebdc7cf244a999e754c070471cfc3e8425a

Author: Emma Anholt <emma at anholt.net>
Date:   Mon Jun 21 09:28:59 2021 -0700

i915g: Use the color swizzle to reshuffle the blend const color.

If we're remapping RGBA from the shader into dst channels, we also need to
remap the blend constant color.  The previous static mapping only worked
for ARGB cbufs, but we get ABGR in surfaceless deqp.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11512>

---

 .../drivers/i915/ci/deqp-i915-g33-fails.txt        | 218 ---------------------
 .../drivers/i915/ci/piglit-i915-g33-fails.txt      |   1 -
 src/gallium/drivers/i915/i915_context.c            |   2 +
 src/gallium/drivers/i915/i915_context.h            |   3 +
 src/gallium/drivers/i915/i915_state.c              |  14 +-
 src/gallium/drivers/i915/i915_state_dynamic.c      |  10 +-
 src/gallium/drivers/i915/i915_state_fpc.c          |   2 +-
 src/gallium/drivers/i915/i915_state_static.c       |   8 -
 8 files changed, 23 insertions(+), 235 deletions(-)

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 761da0e003d..3b48f69a08c 100644
--- a/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt
+++ b/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt
@@ -21,222 +21,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_z_clip_viewport_corner,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_neg_y_neg_z_and_neg_x_neg_y_pos_z,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z,Fail
 dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb10_a2,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_constant_color_zero,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_dst_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_dst_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_dst_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_dst_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_constant_color_zero,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_dst_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_dst_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_dst_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_dst_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_src_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_src_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_src_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_minus_src_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_one_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_src_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_src_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_src_alpha_saturate_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_src_alpha_saturate_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_src_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_src_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_zero_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.add_zero_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_dst_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_dst_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_dst_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_dst_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_dst_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_dst_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_dst_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_dst_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_src_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_src_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_src_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_minus_src_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_one_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_src_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_src_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_src_alpha_saturate_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_src_alpha_saturate_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_src_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_src_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_zero_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.reverse_subtract_zero_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_constant_color_zero,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_dst_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_dst_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_dst_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_dst_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_constant_color_zero,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_dst_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_dst_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_dst_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_dst_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_src_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_src_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_src_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_minus_src_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_one_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_src_alpha_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_src_alpha_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_src_alpha_saturate_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_src_alpha_saturate_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_src_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.equation_src_func_dst_func.subtract_src_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.constant_color_zero,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.dst.one_minus_constant_color_zero,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_src_alpha_saturate,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.constant_color_zero,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_one,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_one_minus_constant_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_one_minus_constant_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_one_minus_dst_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_one_minus_dst_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_one_minus_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_one_minus_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_src_alpha,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_src_alpha_saturate,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_src_color,Fail
-dEQP-GLES2.functional.fragment_ops.blend.rgb_func_alpha_func.src.one_minus_constant_color_zero,Fail
 dEQP-GLES2.functional.fragment_ops.depth_stencil.random.0,Fail
 dEQP-GLES2.functional.fragment_ops.depth_stencil.random.1,Fail
 dEQP-GLES2.functional.fragment_ops.depth_stencil.random.10,Fail
@@ -384,7 +168,6 @@ dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.5,Fail
 dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.50,Fail
 dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.51,Fail
 dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.52,Fail
-dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.53,Fail
 dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.54,Fail
 dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.55,Fail
 dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.56,Fail
@@ -495,7 +278,6 @@ dEQP-GLES2.functional.fragment_ops.random.61,Fail
 dEQP-GLES2.functional.fragment_ops.random.62,Fail
 dEQP-GLES2.functional.fragment_ops.random.63,Fail
 dEQP-GLES2.functional.fragment_ops.random.64,Fail
-dEQP-GLES2.functional.fragment_ops.random.65,Fail
 dEQP-GLES2.functional.fragment_ops.random.66,Fail
 dEQP-GLES2.functional.fragment_ops.random.67,Fail
 dEQP-GLES2.functional.fragment_ops.random.68,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 2951cc517a9..557c6b191b4 100644
--- a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt
+++ b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt
@@ -521,7 +521,6 @@ spec at ext_framebuffer_object@fbo-blending-formats at GL_LUMINANCE4,Fail
 spec at ext_framebuffer_object@fbo-blending-formats at GL_LUMINANCE8,Fail
 spec at ext_framebuffer_object@fbo-blending-formats at GL_RGB,Fail
 spec at ext_framebuffer_object@fbo-blending-formats at GL_RGB10,Fail
-spec at ext_framebuffer_object@fbo-blending-formats at GL_RGB10_A2,Fail
 spec at ext_framebuffer_object@fbo-blending-formats at GL_RGB12,Fail
 spec at ext_framebuffer_object@fbo-blending-formats at GL_RGB16,Fail
 spec at ext_framebuffer_object@fbo-blending-formats at GL_RGB4,Fail
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index 98851841fc3..04c80f75920 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -239,5 +239,7 @@ i915_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
    i915->static_dirty = ~0;
    i915->flush_dirty = 0;
 
+   i915->current.fixup_swizzle = ~0;
+
    return &i915->base;
 }
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index a5f893bbd63..b0bfdba4dc4 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -173,6 +173,8 @@ struct i915_state
 
    /* Reswizzle for OC writes in PIXEL_SHADER_PROGRAM, or 0 if unnecessary. */
    uint32_t fixup_swizzle;
+   /* Mapping from color buffer dst channels in HW to gallium API src channels. */
+   uint8_t color_swizzle[4];
 
    unsigned id;			/* track lost context events */
 };
@@ -314,6 +316,7 @@ struct i915_context {
 #define I915_NEW_GS_CONSTANTS  0x4000
 #define I915_NEW_VBO           0x8000
 #define I915_NEW_VS            0x10000
+#define I915_NEW_COLOR_SWIZZLE 0x20000
 
 
 /* Driver's internally generated state flags:
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index 8eccc71367b..1e85d7c4846 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -730,8 +730,18 @@ static void i915_set_framebuffer_state(struct pipe_context *pipe,
    i915->framebuffer.width = fb->width;
    i915->framebuffer.height = fb->height;
    i915->framebuffer.nr_cbufs = fb->nr_cbufs;
-   pipe_surface_reference(&i915->framebuffer.cbufs[0],
-                          fb->nr_cbufs ? fb->cbufs[0] : NULL);
+   if (fb->nr_cbufs) {
+      pipe_surface_reference(&i915->framebuffer.cbufs[0], fb->cbufs[0]);
+
+      struct i915_surface *surf = i915_surface(i915->framebuffer.cbufs[0]);
+      if (i915->current.fixup_swizzle != surf->oc_swizzle) {
+         i915->current.fixup_swizzle = surf->oc_swizzle;
+         memcpy(i915->current.color_swizzle, surf->color_swizzle, sizeof(surf->color_swizzle));
+         i915->dirty |= I915_NEW_COLOR_SWIZZLE;
+      }
+   } else {
+      pipe_surface_reference(&i915->framebuffer.cbufs[0],  NULL);
+   }
    pipe_surface_reference(&i915->framebuffer.zsbuf, fb->zsbuf);
 
    i915->dirty |= I915_NEW_FRAMEBUFFER;
diff --git a/src/gallium/drivers/i915/i915_state_dynamic.c b/src/gallium/drivers/i915/i915_state_dynamic.c
index 434b09d4e0e..9193df07ff1 100644
--- a/src/gallium/drivers/i915/i915_state_dynamic.c
+++ b/src/gallium/drivers/i915/i915_state_dynamic.c
@@ -143,10 +143,10 @@ static void upload_BLENDCOLOR(struct i915_context *i915)
       const float *color = i915->blend_color.color;
 
       bc[0] = _3DSTATE_CONST_BLEND_COLOR_CMD;
-      bc[1] = pack_ui32_float4(color[0],
-                               color[1],
-                               color[2],
-                               color[3]);
+      bc[1] = pack_ui32_float4(color[i915->current.color_swizzle[2]],
+                               color[i915->current.color_swizzle[1]],
+                               color[i915->current.color_swizzle[0]],
+                               color[i915->current.color_swizzle[3]]);
    }
 
    set_dynamic_array(i915, I915_DYNAMIC_BC_0, bc, 2);
@@ -155,7 +155,7 @@ static void upload_BLENDCOLOR(struct i915_context *i915)
 const struct i915_tracked_state i915_upload_BLENDCOLOR = {
    "BLENDCOLOR",
    upload_BLENDCOLOR,
-   I915_NEW_BLEND
+   I915_NEW_BLEND | I915_NEW_COLOR_SWIZZLE
 };
 
 
diff --git a/src/gallium/drivers/i915/i915_state_fpc.c b/src/gallium/drivers/i915/i915_state_fpc.c
index 1959a24691d..d9bfb850701 100644
--- a/src/gallium/drivers/i915/i915_state_fpc.c
+++ b/src/gallium/drivers/i915/i915_state_fpc.c
@@ -55,5 +55,5 @@ static void update_fs(struct i915_context *i915)
 struct i915_tracked_state i915_hw_fs = {
    "fs",
    update_fs,
-   I915_NEW_FS
+   I915_NEW_FS | I915_NEW_COLOR_SWIZZLE
 };
diff --git a/src/gallium/drivers/i915/i915_state_static.c b/src/gallium/drivers/i915/i915_state_static.c
index 2d0a7416072..97a0d2dbda2 100644
--- a/src/gallium/drivers/i915/i915_state_static.c
+++ b/src/gallium/drivers/i915/i915_state_static.c
@@ -82,7 +82,6 @@ static void update_framebuffer(struct i915_context *i915)
    unsigned x, y;
    int layer;
    uint32_t draw_offset, draw_size;
-   uint32_t oc_swizzle = 0;
 
    if (cbuf_surface) {
       struct i915_surface *surf = i915_surface(cbuf_surface);
@@ -96,8 +95,6 @@ static void update_framebuffer(struct i915_context *i915)
 
       x = tex->image_offset[cbuf_surface->u.tex.level][layer].nblocksx;
       y = tex->image_offset[cbuf_surface->u.tex.level][layer].nblocksy;
-
-      oc_swizzle = surf->oc_swizzle;
    } else {
       i915->current.cbuf_bo = NULL;
       x = y = 0;
@@ -137,11 +134,6 @@ static void update_framebuffer(struct i915_context *i915)
 
    i915->hardware_dirty |= I915_HW_STATIC;
 
-   if (i915->current.fixup_swizzle != oc_swizzle) {
-      i915->current.fixup_swizzle = oc_swizzle;
-      i915->hardware_dirty |= I915_HW_PROGRAM;
-   }
-
    /* flush the cache in case we sample from the old renderbuffers */
    i915_set_flush_dirty(i915, I915_FLUSH_CACHE);
 }



More information about the mesa-commit mailing list