Commit 966f1556 authored by Marek Olšák's avatar Marek Olšák

gallium: add storage_sample_count parameter into is_format_supported

Tested-by: Dieter Nützel's avatarDieter Nützel <Dieter@nuetzel-hh.de>
parent 8632626c
......@@ -147,12 +147,13 @@ dd_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned tex_usage)
{
struct pipe_screen *screen = dd_screen(_screen)->screen;
return screen->is_format_supported(screen, format, target, sample_count,
tex_usage);
storage_sample_count, tex_usage);
}
static boolean
......
......@@ -420,11 +420,13 @@ static boolean noop_is_format_supported(struct pipe_screen* pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned usage)
{
struct pipe_screen *screen = ((struct noop_pipe_screen*)pscreen)->oscreen;
return screen->is_format_supported(screen, format, target, sample_count, usage);
return screen->is_format_supported(screen, format, target, sample_count,
storage_sample_count, usage);
}
static uint64_t noop_get_timestamp(struct pipe_screen *pscreen)
......
......@@ -124,6 +124,7 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned tex_usage)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
......@@ -133,6 +134,7 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen,
format,
target,
sample_count,
storage_sample_count,
tex_usage);
}
......
......@@ -225,6 +225,7 @@ trace_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned tex_usage)
{
struct trace_screen *tr_scr = trace_screen(_screen);
......@@ -240,7 +241,7 @@ trace_screen_is_format_supported(struct pipe_screen *_screen,
trace_dump_arg(uint, tex_usage);
result = screen->is_format_supported(screen, format, target, sample_count,
tex_usage);
storage_sample_count, tex_usage);
trace_dump_ret(bool, result);
......
......@@ -390,7 +390,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe,
for (i = 0; i < ARRAY_SIZE(formats); i++) {
if (screen->is_format_supported(screen, formats[i],
PIPE_TEXTURE_RECT, 0,
PIPE_TEXTURE_RECT, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
tex_format = formats[i];
break;
......
......@@ -1842,7 +1842,7 @@ hud_create(struct cso_context *cso, struct hud_context *share)
hud->refcount = 1;
hud->has_srgb = screen->is_format_supported(screen,
PIPE_FORMAT_B8G8R8A8_SRGB,
PIPE_TEXTURE_2D, 0,
PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_RENDER_TARGET) != 0;
/* blend state */
......
......@@ -279,7 +279,7 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w,
tmp_res.bind = PIPE_BIND_RENDER_TARGET;
if (!p->screen->is_format_supported(p->screen, tmp_res.format,
tmp_res.target, 1, tmp_res.bind))
tmp_res.target, 1, 1, tmp_res.bind))
pp_debug("Temp buffers' format fail\n");
for (i = 0; i < ppq->n_tmp; i++) {
......@@ -305,12 +305,12 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w,
tmp_res.format = p->surf.format = PIPE_FORMAT_S8_UINT_Z24_UNORM;
if (!p->screen->is_format_supported(p->screen, tmp_res.format,
tmp_res.target, 1, tmp_res.bind)) {
tmp_res.target, 1, 1, tmp_res.bind)) {
tmp_res.format = p->surf.format = PIPE_FORMAT_Z24_UNORM_S8_UINT;
if (!p->screen->is_format_supported(p->screen, tmp_res.format,
tmp_res.target, 1, tmp_res.bind))
tmp_res.target, 1, 1, tmp_res.bind))
pp_debug("Temp Sbuffer format fail\n");
}
......
......@@ -243,7 +243,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n,
res.depth0 = res.array_size = res.nr_samples = res.nr_storage_samples = 1;
if (!ppq->p->screen->is_format_supported(ppq->p->screen, res.format,
res.target, 1, res.bind))
res.target, 1, 1, res.bind))
pp_debug("Areamap format not supported\n");
ppq->areamaptex = ppq->p->screen->resource_create(ppq->p->screen, &res);
......
......@@ -119,7 +119,7 @@ pp_init_prog(struct pp_queue_t *ppq, struct pipe_context *pipe,
if (!p->screen->is_format_supported(p->screen,
PIPE_FORMAT_R32G32B32A32_FLOAT,
PIPE_BUFFER, 1,
PIPE_BUFFER, 1, 1,
PIPE_BIND_VERTEX_BUFFER))
pp_debug("Vertex buf format fail\n");
......
......@@ -551,6 +551,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
assert(ctx->pipe->screen->is_format_supported(ctx->pipe->screen, dst->format,
PIPE_TEXTURE_2D,
dst->texture->nr_samples,
dst->texture->nr_storage_samples,
PIPE_BIND_RENDER_TARGET));
/* save state (restored below) */
......
......@@ -1182,7 +1182,7 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter)
/* MSAA resolve shaders. */
for (j = 2; j < 32; j++) {
if (!screen->is_format_supported(screen, PIPE_FORMAT_R32_FLOAT,
target, j,
target, j, j,
PIPE_BIND_SAMPLER_VIEW)) {
continue;
}
......@@ -1539,7 +1539,8 @@ static bool is_blit_generic_supported(struct blitter_context *blitter,
bind = PIPE_BIND_RENDER_TARGET;
if (!screen->is_format_supported(screen, dst_format, dst->target,
dst->nr_samples, bind)) {
dst->nr_samples, dst->nr_storage_samples,
bind)) {
return false;
}
}
......@@ -1550,7 +1551,8 @@ static bool is_blit_generic_supported(struct blitter_context *blitter,
}
if (!screen->is_format_supported(screen, src_format, src->target,
src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) {
src->nr_samples, src->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW)) {
return false;
}
......@@ -1564,6 +1566,7 @@ static bool is_blit_generic_supported(struct blitter_context *blitter,
if (stencil_format != src_format &&
!screen->is_format_supported(screen, stencil_format,
src->target, src->nr_samples,
src->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW)) {
return false;
}
......
......@@ -76,7 +76,7 @@ util_gen_mipmap(struct pipe_context *pipe, struct pipe_resource *pt,
return TRUE;
if (!screen->is_format_supported(screen, format, pt->target,
pt->nr_samples,
pt->nr_samples, pt->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW |
(is_zs ? PIPE_BIND_DEPTH_STENCIL :
PIPE_BIND_RENDER_TARGET))) {
......
......@@ -2205,7 +2205,8 @@ tc_generate_mipmap(struct pipe_context *_pipe,
bind = PIPE_BIND_RENDER_TARGET;
if (!screen->is_format_supported(screen, format, res->target,
res->nr_samples, bind))
res->nr_samples, res->nr_storage_samples,
bind))
return false;
struct tc_generate_mipmap *p =
......
......@@ -269,7 +269,7 @@ boolean u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps,
for (i = 0; i < ARRAY_SIZE(vbuf_format_fallbacks); i++) {
enum pipe_format format = vbuf_format_fallbacks[i].from;
if (!screen->is_format_supported(screen, format, PIPE_BUFFER, 0,
if (!screen->is_format_supported(screen, format, PIPE_BUFFER, 0, 0,
PIPE_BIND_VERTEX_BUFFER)) {
caps->format_translation[format] = vbuf_format_fallbacks[i].to;
fallback = TRUE;
......
......@@ -908,20 +908,20 @@ find_format_config(struct vl_mpeg12_decoder *dec, const struct format_config con
for (i = 0; i < num_configs; ++i) {
if (!screen->is_format_supported(screen, configs[i].zscan_source_format, PIPE_TEXTURE_2D,
1, PIPE_BIND_SAMPLER_VIEW))
1, 1, PIPE_BIND_SAMPLER_VIEW))
continue;
if (configs[i].idct_source_format != PIPE_FORMAT_NONE) {
if (!screen->is_format_supported(screen, configs[i].idct_source_format, PIPE_TEXTURE_2D,
1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
1, 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
continue;
if (!screen->is_format_supported(screen, configs[i].mc_source_format, PIPE_TEXTURE_3D,
1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
1, 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
continue;
} else {
if (!screen->is_format_supported(screen, configs[i].mc_source_format, PIPE_TEXTURE_2D,
1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
1, 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
continue;
}
return &configs[i];
......
......@@ -192,11 +192,11 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen,
continue;
/* we at least need to sample from it */
if (!screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW))
if (!screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW))
return false;
format = vl_video_buffer_surface_format(format);
if (!screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET))
if (!screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_RENDER_TARGET))
return false;
}
......
......@@ -746,6 +746,9 @@ Determine if a resource in the given format can be used in a specific manner.
**sample_count** the number of samples. 0 and 1 mean no multisampling,
the maximum allowed legal value is 32.
**storage_sample_count** the number of storage samples. This must be <=
sample_count. See the documentation of ``pipe_resource::nr_storage_samples``.
**bindings** is a bitmask of :ref:`PIPE_BIND` flags.
Returns TRUE if all usages can be satisfied.
......
......@@ -534,7 +534,9 @@ static boolean
etna_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count, unsigned usage)
unsigned sample_count,
unsigned storage_sample_count,
unsigned usage)
{
struct etna_screen *screen = etna_screen(pscreen);
unsigned allowed = 0;
......@@ -547,6 +549,9 @@ etna_screen_is_format_supported(struct pipe_screen *pscreen,
target != PIPE_TEXTURE_RECT)
return FALSE;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if (usage & PIPE_BIND_RENDER_TARGET) {
/* if render target, must be RS-supported format */
if (translate_rs_format(format) != ETNA_NO_MATCH) {
......
......@@ -38,6 +38,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned usage)
{
unsigned retval = 0;
......@@ -49,6 +50,9 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
return FALSE;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
/* TODO figure out how to render to other formats.. */
if ((usage & PIPE_BIND_RENDER_TARGET) &&
((format != PIPE_FORMAT_B5G6R5_UNORM) &&
......
......@@ -39,6 +39,7 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned usage)
{
unsigned retval = 0;
......@@ -50,6 +51,9 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
return FALSE;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
(fd3_pipe2vtx(format) != (enum a3xx_vtx_fmt)~0)) {
retval |= PIPE_BIND_VERTEX_BUFFER;
......
......@@ -39,6 +39,7 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned usage)
{
unsigned retval = 0;
......@@ -50,6 +51,9 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
return FALSE;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
(fd4_pipe2vtx(format) != (enum a4xx_vtx_fmt)~0)) {
retval |= PIPE_BIND_VERTEX_BUFFER;
......
......@@ -54,6 +54,7 @@ fd5_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned usage)
{
unsigned retval = 0;
......@@ -65,6 +66,9 @@ fd5_screen_is_format_supported(struct pipe_screen *pscreen,
return FALSE;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
(fd5_pipe2vtx(format) != (enum a5xx_vtx_fmt)~0)) {
retval |= PIPE_BIND_VERTEX_BUFFER;
......
......@@ -148,6 +148,7 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
*/
if (!pctx->screen->is_format_supported(pctx->screen,
prsc->format, prsc->target, prsc->nr_samples,
prsc->nr_storage_samples,
PIPE_BIND_RENDER_TARGET))
fallback = true;
......
......@@ -462,6 +462,7 @@ i915_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned tex_usage)
{
static const enum pipe_format tex_supported[] = {
......@@ -517,6 +518,9 @@ i915_is_format_supported(struct pipe_screen *screen,
if (sample_count > 1)
return FALSE;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if(tex_usage & PIPE_BIND_DEPTH_STENCIL)
list = depth_supported;
else if (tex_usage & PIPE_BIND_RENDER_TARGET)
......
......@@ -70,6 +70,7 @@ i915_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned tex_usage);
#endif /* I915_SCREEN_H */
......@@ -455,6 +455,7 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned bind)
{
struct llvmpipe_screen *screen = llvmpipe_screen(_screen);
......@@ -478,6 +479,9 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
if (sample_count > 1)
return FALSE;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if (bind & PIPE_BIND_RENDER_TARGET) {
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
/* this is a lie actually other formats COULD exist where we would fail */
......
......@@ -415,6 +415,7 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned bindings)
{
if (sample_count > nv30_screen(pscreen)->max_sample_count)
......@@ -423,6 +424,9 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
if (!(0x00000017 & (1 << sample_count)))
return false;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
/* shared is always supported */
bindings &= ~PIPE_BIND_SHARED;
......
......@@ -46,6 +46,7 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned bindings)
{
if (sample_count > 8)
......@@ -55,6 +56,9 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
if (sample_count == 8 && util_format_get_blocksizebits(format) >= 128)
return false;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
switch (format) {
case PIPE_FORMAT_Z16_UNORM:
if (nv50_screen(pscreen)->tesla->oclass < NVA0_3D_CLASS)
......
......@@ -185,6 +185,7 @@ nv50_fragprog_validate(struct nv50_context *nv50)
fb->cbufs[0]->format,
fb->cbufs[0]->texture->target,
fb->cbufs[0]->texture->nr_samples,
fb->cbufs[0]->texture->nr_storage_samples,
PIPE_BIND_BLENDABLE);
/* If we already have alphatest code, we have to keep updating
* it. However we only have to have different code if the current RT0 is
......
......@@ -42,6 +42,7 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned bindings)
{
const struct util_format_description *desc = util_format_description(format);
......@@ -51,6 +52,9 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
if (!(0x117 & (1 << sample_count))) /* 0, 1, 2, 4 or 8 */
return false;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
/* Short-circuit the rest of the logic -- this is used by the state tracker
* to determine valid MS levels in a no-attachments scenario.
*/
......
......@@ -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,
......
......@@ -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:
......
......@@ -243,6 +243,7 @@ boolean evergreen_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 r600_screen *rscreen = (struct r600_screen*)screen;
......@@ -253,6 +254,9 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,
return FALSE;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if (sample_count > 1) {
if (!rscreen->has_msaa)
return FALSE;
......
......@@ -706,6 +706,7 @@ boolean evergreen_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);
void evergreen_init_color_surface(struct r600_context *rctx,
struct r600_surface *surf);
......@@ -762,6 +763,7 @@ boolean r600_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);
void r600_update_db_shader_control(struct r600_context * rctx);
void r600_setup_scratch_buffers(struct r600_context *rctx);
......
......@@ -162,6 +162,7 @@ boolean r600_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 r600_screen *rscreen = (struct r600_screen*)screen;
......@@ -172,6 +173,9 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
return FALSE;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if (sample_count > 1) {
if (!rscreen->has_msaa)
return FALSE;
......
......@@ -1636,7 +1636,7 @@ static void r600_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)) {
pipe->clear_render_target(pipe, sf, &color,
box->x, box->y,
......
......@@ -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,
......
......@@ -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