summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-05-23 18:46:19 -0400
committerMarek Olšák <[email protected]>2018-07-31 18:28:41 -0400
commit966f155623e5a626f1d788af7e0f602cdcee6993 (patch)
treec3ae4f7021a386abcf2c04cba7ca7ac9cca582bc /src/gallium/drivers/r300
parent8632626c81a09315276d7defa63092247d7fd308 (diff)
gallium: add storage_sample_count parameter into is_format_supported
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c6
-rw-r--r--src/gallium/drivers/r300/r300_screen.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index bc497757a93..01fccfbe7ed 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -574,10 +574,10 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
/* Handle non-renderable plain formats. */
if (layout == UTIL_FORMAT_LAYOUT_PLAIN &&
(!screen->is_format_supported(screen, src_templ.format, src->target,
- src->nr_samples,
+ src->nr_samples, src->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW) ||
!screen->is_format_supported(screen, dst_templ.format, dst->target,
- dst->nr_samples,
+ dst->nr_samples, dst->nr_storage_samples,
PIPE_BIND_RENDER_TARGET))) {
switch (util_format_get_blocksize(dst_templ.format)) {
case 1:
@@ -644,9 +644,11 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
/* Fallback for textures. */
if (!screen->is_format_supported(screen, dst_templ.format,
dst->target, dst->nr_samples,
+ dst->nr_storage_samples,
PIPE_BIND_RENDER_TARGET) ||
!screen->is_format_supported(screen, src_templ.format,
src->target, src->nr_samples,
+ src->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW)) {
assert(0 && "this shouldn't happen, update r300_is_blit_supported");
util_resource_copy_region(pipe, dst, dst_level, dstx, dsty, dstz,
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 06168090829..046d68c0b59 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -591,6 +591,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
uint32_t retval = 0;
@@ -616,6 +617,9 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
format == PIPE_FORMAT_R16G16B16X16_FLOAT;
const struct util_format_description *desc;
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
/* Check multisampling support. */
switch (sample_count) {
case 0: