Mesa (master): svga: add missing switch cases for shadow textures

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 29 17:31:13 UTC 2018


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

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Aug 23 20:48:04 2018 -0600

svga: add missing switch cases for shadow textures

This doesn't seem to make any difference in testing, but it fixes a
failed assertion when dumping sm3 shaders.

Reviewed-by: Charmaine Lee <charmainel at vmware.com>

---

 src/gallium/drivers/svga/svga_tgsi_decl_sm30.c       | 2 ++
 src/gallium/drivers/svga/svgadump/svga_shader_dump.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
index 766e439188..2296861f6f 100644
--- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
+++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
@@ -525,6 +525,8 @@ svga_tgsi_sampler_type(const struct svga_shader_emitter *emit, int idx)
    case TGSI_TEXTURE_2D:
    case TGSI_TEXTURE_RECT:
       return SVGA3DSAMP_2D;
+   case TGSI_TEXTURE_SHADOW2D:
+      return SVGA3DSAMP_2D_SHADOW;
    case TGSI_TEXTURE_3D:
       return SVGA3DSAMP_VOLUME;
    case TGSI_TEXTURE_CUBE:
diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
index 46126a5460..55bcdb8e25 100644
--- a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
+++ b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
@@ -287,6 +287,9 @@ dump_sampleinfo(struct sh_sampleinfo sampleinfo)
    case SVGA3DSAMP_2D:
       _debug_printf( "_2d" );
       break;
+   case SVGA3DSAMP_2D_SHADOW:
+      _debug_printf( "_2dshadow" );
+      break;
    case SVGA3DSAMP_CUBE:
       _debug_printf( "_cube" );
       break;




More information about the mesa-commit mailing list