diff options
author | Marek Olšák <[email protected]> | 2018-05-23 18:46:19 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-07-31 18:28:41 -0400 |
commit | 966f155623e5a626f1d788af7e0f602cdcee6993 (patch) | |
tree | c3ae4f7021a386abcf2c04cba7ca7ac9cca582bc /src/gallium/drivers/radeonsi | |
parent | 8632626c81a09315276d7defa63092247d7fd308 (diff) |
gallium: add storage_sample_count parameter into is_format_supported
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_clear.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c index 23c9962408c..e614ab52423 100644 --- a/src/gallium/drivers/radeonsi/si_clear.c +++ b/src/gallium/drivers/radeonsi/si_clear.c @@ -736,7 +736,7 @@ static void si_clear_texture(struct pipe_context *pipe, desc->unpack_rgba_float(color.f, 0, data, 0, 1, 1); if (screen->is_format_supported(screen, tex->format, - tex->target, 0, + tex->target, 0, 0, PIPE_BIND_RENDER_TARGET)) { si_clear_render_target(pipe, sf, &color, box->x, box->y, diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 7bbb1f63280..fc5d63f02d3 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2132,6 +2132,7 @@ static boolean si_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) { struct si_screen *sscreen = (struct si_screen *)screen; @@ -2149,6 +2150,9 @@ static boolean si_is_format_supported(struct pipe_screen *screen, if (usage & PIPE_BIND_SHADER_IMAGE) return false; + if (sample_count != storage_sample_count) + return false; + switch (sample_count) { case 2: case 4: |