Mesa (master): r600g: don't advertise integer textures without GLSL 1.3

Marek Olšák mareko at kemper.freedesktop.org
Tue Feb 14 06:07:21 PST 2012


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Tue Feb 14 15:04:51 2012 +0100

r600g: don't advertise integer textures without GLSL 1.3

---

 src/gallium/drivers/r600/evergreen_state.c |    4 ++++
 src/gallium/drivers/r600/r600_state.c      |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index b882516..42d2e87 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -708,6 +708,10 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,
 	if (!util_format_is_supported(format, usage))
 		return FALSE;
 
+	if (util_format_is_pure_integer(format) &&
+	    screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL) < 130)
+		return FALSE;
+
 	/* Multisample */
 	if (sample_count > 1)
 		return FALSE;
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 0d83fa6..4955c82 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -660,6 +660,10 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
 	if (!util_format_is_supported(format, usage))
 		return FALSE;
 
+	if (util_format_is_pure_integer(format) &&
+	    screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL) < 130)
+		return FALSE;
+
 	/* Multisample */
 	if (sample_count > 1)
 		return FALSE;



More information about the mesa-commit mailing list