Mesa (master): r600g, radeonsi: properly expose texture buffer formats
Marek Olšák
mareko at kemper.freedesktop.org
Mon Nov 4 18:11:06 UTC 2013
Module: Mesa
Branch: master
Commit: 6a250877eaea932e2bddd35ba694e4dc38cc57cc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6a250877eaea932e2bddd35ba694e4dc38cc57cc
Author: Marek Olšák <marek.olsak at amd.com>
Date: Thu Oct 31 15:32:30 2013 +0100
r600g,radeonsi: properly expose texture buffer formats
This exposes GL_ARB_texture_buffer_object_rgb32.
---
src/gallium/drivers/r600/evergreen_state.c | 11 ++++++++---
src/gallium/drivers/r600/r600_state.c | 11 ++++++++---
src/gallium/drivers/radeonsi/si_state.c | 11 ++++++++---
3 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 4535d21..a4a4e3e 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -711,9 +711,14 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,
}
}
- if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
- r600_is_sampler_format_supported(screen, format)) {
- retval |= PIPE_BIND_SAMPLER_VIEW;
+ if (usage & PIPE_BIND_SAMPLER_VIEW) {
+ if (target == PIPE_BUFFER) {
+ if (r600_is_vertex_format_supported(format))
+ retval |= PIPE_BIND_SAMPLER_VIEW;
+ } else {
+ if (r600_is_sampler_format_supported(screen, format))
+ retval |= PIPE_BIND_SAMPLER_VIEW;
+ }
}
if ((usage & (PIPE_BIND_RENDER_TARGET |
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index f148052..41e9c5d 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -649,9 +649,14 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
}
}
- if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
- r600_is_sampler_format_supported(screen, format)) {
- retval |= PIPE_BIND_SAMPLER_VIEW;
+ if (usage & PIPE_BIND_SAMPLER_VIEW) {
+ if (target == PIPE_BUFFER) {
+ if (r600_is_vertex_format_supported(format))
+ retval |= PIPE_BIND_SAMPLER_VIEW;
+ } else {
+ if (r600_is_sampler_format_supported(screen, format))
+ retval |= PIPE_BIND_SAMPLER_VIEW;
+ }
}
if ((usage & (PIPE_BIND_RENDER_TARGET |
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 36aff00..0d74344 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1497,9 +1497,14 @@ boolean si_is_format_supported(struct pipe_screen *screen,
}
}
- if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
- si_is_sampler_format_supported(screen, format)) {
- retval |= PIPE_BIND_SAMPLER_VIEW;
+ if (usage & PIPE_BIND_SAMPLER_VIEW) {
+ if (target == PIPE_BUFFER) {
+ if (si_is_vertex_format_supported(screen, format))
+ retval |= PIPE_BIND_SAMPLER_VIEW;
+ } else {
+ if (si_is_sampler_format_supported(screen, format))
+ retval |= PIPE_BIND_SAMPLER_VIEW;
+ }
}
if ((usage & (PIPE_BIND_RENDER_TARGET |
More information about the mesa-commit
mailing list