[Mesa-dev] [PATCH 11/22] meta/blit: Use correct offsets for MSAA-MSAA copy blits of integer data

Ian Romanick idr at freedesktop.org
Thu Feb 18 01:58:04 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94142
---
 src/mesa/drivers/common/meta_blit.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 5d80f7d..6cabae2 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -335,11 +335,15 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,
                  BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE + 5);
    STATIC_ASSERT(BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT ==
                  BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE + 10);
+   STATIC_ASSERT(BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY_INT ==
+                 BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY + 1);
+   STATIC_ASSERT(BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY_UINT ==
+                 BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY + 2);
    if (src_datatype == GL_INT) {
-      shader_index += 5;
+      shader_index += dst_is_msaa ? 1 : 5;
       vec4_prefix = "i";
    } else if (src_datatype == GL_UNSIGNED_INT) {
-      shader_index += 10;
+      shader_index += dst_is_msaa ? 2 : 10;
       vec4_prefix = "u";
    } else {
       vec4_prefix = "";
-- 
2.5.0



More information about the mesa-dev mailing list