Mesa (glsl-continue-return): gallium: added PIPE_CAP_TGSI_CONT_SUPPORTED query

Brian Paul brianp at kemper.freedesktop.org
Tue Jun 23 20:29:31 UTC 2009


Module: Mesa
Branch: glsl-continue-return
Commit: 637fca75aaa2d616e5e0d3da3636dac8e4a1517d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=637fca75aaa2d616e5e0d3da3636dac8e4a1517d

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Jun 23 14:27:43 2009 -0600

gallium: added PIPE_CAP_TGSI_CONT_SUPPORTED query

Does the driver support TGSI_OPCODE_CONT?  If not, the GLSL compiler will
generate code such that 'continue' statements are converted into 'breaks'.

---

 src/gallium/drivers/cell/ppu/cell_screen.c  |    2 ++
 src/gallium/drivers/i965simple/brw_screen.c |    2 ++
 src/gallium/drivers/softpipe/sp_screen.c    |    2 ++
 src/gallium/include/pipe/p_defines.h        |    1 +
 4 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index 512d85d..bd48ce7 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -86,6 +86,8 @@ cell_get_param(struct pipe_screen *screen, int param)
       return 1; /* XXX not really true */
    case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
       return 0; /* XXX to do */
+   case PIPE_CAP_TGSI_CONT_SUPPORTED:
+      return 1;
    default:
       return 0;
    }
diff --git a/src/gallium/drivers/i965simple/brw_screen.c b/src/gallium/drivers/i965simple/brw_screen.c
index b22e105..7fc1bf4 100644
--- a/src/gallium/drivers/i965simple/brw_screen.c
+++ b/src/gallium/drivers/i965simple/brw_screen.c
@@ -103,6 +103,8 @@ brw_get_param(struct pipe_screen *screen, int param)
       return 8;  /* max 128x128x128 */
    case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
       return 11; /* max 1024x1024 */
+   case PIPE_CAP_TGSI_CONT_SUPPORTED:
+      return 1;
    default:
       return 0;
    }
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 692deeb..be76f1d 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -87,6 +87,8 @@ softpipe_get_param(struct pipe_screen *screen, int param)
       return 8;  /* max 128x128x128 */
    case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
       return 13; /* max 4Kx4K */
+   case PIPE_CAP_TGSI_CONT_SUPPORTED:
+      return 1;
    default:
       return 0;
    }
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 9924046..96030e7 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -302,6 +302,7 @@ enum pipe_transfer_usage {
 #define PIPE_CAP_TEXTURE_MIRROR_CLAMP    24
 #define PIPE_CAP_TEXTURE_MIRROR_REPEAT   25
 #define PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS 26
+#define PIPE_CAP_TGSI_CONT_SUPPORTED     27
 
 
 /**




More information about the mesa-commit mailing list