Mesa (master): tgsi: fix the location of sample index

Marek Olšák mareko at kemper.freedesktop.org
Thu Aug 15 00:04:39 UTC 2013


Module: Mesa
Branch: master
Commit: 0ee4bae70d188118417c50ba223fe3638a85b8ce
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ee4bae70d188118417c50ba223fe3638a85b8ce

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue Aug  6 06:21:11 2013 +0200

tgsi: fix the location of sample index

The sample index is always in W.

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

---

 src/gallium/auxiliary/tgsi/tgsi_util.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c
index 39b605b..b3bc8f2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.c
@@ -444,9 +444,11 @@ tgsi_util_get_texture_coord_dim(int tgsi_tex, int *shadow_or_sample)
       case TGSI_TEXTURE_SHADOW1D_ARRAY:
       case TGSI_TEXTURE_SHADOW2D_ARRAY:
       case TGSI_TEXTURE_SHADOWCUBE_ARRAY:
+         *shadow_or_sample = dim;
+         break;
       case TGSI_TEXTURE_2D_MSAA:
       case TGSI_TEXTURE_2D_ARRAY_MSAA:
-         *shadow_or_sample = dim;
+         *shadow_or_sample = 3;
          break;
       default:
          /* no shadow nor sample */




More information about the mesa-commit mailing list