summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_format.c4
-rw-r--r--src/gallium/drivers/svga/svga_format.h1
-rw-r--r--src/gallium/drivers/svga/svga_pipe_clear.c1
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c3
4 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c
index c9adee11afb..0b202600c20 100644
--- a/src/gallium/drivers/svga/svga_format.c
+++ b/src/gallium/drivers/svga/svga_format.c
@@ -2082,6 +2082,7 @@ svga_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned bindings)
{
struct svga_screen *ss = svga_screen(screen);
@@ -2091,6 +2092,9 @@ svga_is_format_supported(struct pipe_screen *screen,
assert(bindings);
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
if (sample_count > 1) {
/* In ms_samples, if bit N is set it means that we support
* multisample with N+1 samples per pixel.
diff --git a/src/gallium/drivers/svga/svga_format.h b/src/gallium/drivers/svga/svga_format.h
index c063589cafe..11e7e41e506 100644
--- a/src/gallium/drivers/svga/svga_format.h
+++ b/src/gallium/drivers/svga/svga_format.h
@@ -127,6 +127,7 @@ svga_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned bindings);
diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c
index e234ef58715..d1287178c56 100644
--- a/src/gallium/drivers/svga/svga_pipe_clear.c
+++ b/src/gallium/drivers/svga/svga_pipe_clear.c
@@ -422,6 +422,7 @@ svga_clear_texture(struct pipe_context *pipe,
pipe->screen->is_format_supported(pipe->screen, rtv->format,
rtv->texture->target,
rtv->texture->nr_samples,
+ rtv->texture->nr_storage_samples,
PIPE_BIND_RENDER_TARGET)) {
/* clear with quad drawing */
util_blitter_save_framebuffer(svga->blitter,
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index 71b8ebe7d42..068862bb780 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -1040,6 +1040,7 @@ svga_texture_create(struct pipe_screen *screen,
if (screen->is_format_supported(screen, template->format,
template->target,
template->nr_samples,
+ template->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW)) {
bindings |= PIPE_BIND_SAMPLER_VIEW;
}
@@ -1054,6 +1055,7 @@ svga_texture_create(struct pipe_screen *screen,
if (screen->is_format_supported(screen, template->format,
template->target,
template->nr_samples,
+ template->nr_storage_samples,
PIPE_BIND_RENDER_TARGET)) {
bindings |= PIPE_BIND_RENDER_TARGET;
}
@@ -1064,6 +1066,7 @@ svga_texture_create(struct pipe_screen *screen,
if (screen->is_format_supported(screen, template->format,
template->target,
template->nr_samples,
+ template->nr_storage_samples,
PIPE_BIND_DEPTH_STENCIL)) {
bindings |= PIPE_BIND_DEPTH_STENCIL;
}