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/auxiliary | |
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/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/driver_ddebug/dd_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/driver_noop/noop_pipe.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/driver_rbug/rbug_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/driver_trace/tr_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/hud/font.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/hud/hud_context.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_init.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_mlaa.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_program.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_blit.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 9 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_gen_mipmap.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_threaded_context.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_vbuf.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.c | 4 |
16 files changed, 33 insertions, 22 deletions
diff --git a/src/gallium/auxiliary/driver_ddebug/dd_screen.c b/src/gallium/auxiliary/driver_ddebug/dd_screen.c index 5f922d884fe..a89af8a8d62 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_screen.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_screen.c @@ -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 diff --git a/src/gallium/auxiliary/driver_noop/noop_pipe.c b/src/gallium/auxiliary/driver_noop/noop_pipe.c index 9e39e65b4d0..7de3e882398 100644 --- a/src/gallium/auxiliary/driver_noop/noop_pipe.c +++ b/src/gallium/auxiliary/driver_noop/noop_pipe.c @@ -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) diff --git a/src/gallium/auxiliary/driver_rbug/rbug_screen.c b/src/gallium/auxiliary/driver_rbug/rbug_screen.c index a1a77add734..693e7fab912 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_screen.c +++ b/src/gallium/auxiliary/driver_rbug/rbug_screen.c @@ -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); } diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.c b/src/gallium/auxiliary/driver_trace/tr_screen.c index 704b2a3c72d..b5bd3e11c46 100644 --- a/src/gallium/auxiliary/driver_trace/tr_screen.c +++ b/src/gallium/auxiliary/driver_trace/tr_screen.c @@ -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); diff --git a/src/gallium/auxiliary/hud/font.c b/src/gallium/auxiliary/hud/font.c index 9fb9d7e055b..88b0349fda2 100644 --- a/src/gallium/auxiliary/hud/font.c +++ b/src/gallium/auxiliary/hud/font.c @@ -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; diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 233202453ee..3dd7c102edb 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -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 */ diff --git a/src/gallium/auxiliary/postprocess/pp_init.c b/src/gallium/auxiliary/postprocess/pp_init.c index b9eff78bf4f..2c830e81bd7 100644 --- a/src/gallium/auxiliary/postprocess/pp_init.c +++ b/src/gallium/auxiliary/postprocess/pp_init.c @@ -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"); } diff --git a/src/gallium/auxiliary/postprocess/pp_mlaa.c b/src/gallium/auxiliary/postprocess/pp_mlaa.c index f003ee75fd5..fd5a55dde0a 100644 --- a/src/gallium/auxiliary/postprocess/pp_mlaa.c +++ b/src/gallium/auxiliary/postprocess/pp_mlaa.c @@ -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); diff --git a/src/gallium/auxiliary/postprocess/pp_program.c b/src/gallium/auxiliary/postprocess/pp_program.c index 811f1fb0773..cb06c8d81f3 100644 --- a/src/gallium/auxiliary/postprocess/pp_program.c +++ b/src/gallium/auxiliary/postprocess/pp_program.c @@ -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"); diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index 9a43c2f6556..ca3d221ed36 100644 --- a/src/gallium/auxiliary/util/u_blit.c +++ b/src/gallium/auxiliary/util/u_blit.c @@ -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) */ diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index eadb76a109f..a9df71108b4 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -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; } diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index 3c55d9f385c..06737c58fe8 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -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))) { diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 28d0f77ebaa..fc7eb138835 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -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 = diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 39aeb87003b..746ff1085ce 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -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; diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index 8a2dae34e35..9589b1e89e0 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c @@ -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]; diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 3b97ac81af9..5b54ee1dd68 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -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; } |