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
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)
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);
format,
target,
sample_count,
+ storage_sample_count,
tex_usage);
}
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);
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);
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;
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 */
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++) {
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");
}
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);
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");
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) */
/* 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;
}
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;
}
}
}
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;
}
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;
}
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))) {
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 =
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;
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];
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;
}
**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.
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;
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) {
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
unsigned retval = 0;
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) &&
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
unsigned retval = 0;
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;
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
unsigned retval = 0;
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;
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
unsigned retval = 0;
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;
*/
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;
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[] = {
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)
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned tex_usage);
#endif /* I915_SCREEN_H */
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);
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 */
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)
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;
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned bindings)
{
if (sample_count > 8)
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)
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
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);
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.
*/
/* 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:
/* 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,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
uint32_t retval = 0;
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:
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;
return FALSE;
}
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
if (sample_count > 1) {
if (!rscreen->has_msaa)
return FALSE;
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);
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);
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;
return FALSE;
}
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
if (sample_count > 1) {
if (!rscreen->has_msaa)
return FALSE;
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,
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,
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;
if (usage & PIPE_BIND_SHADER_IMAGE)
return false;
+ if (sample_count != storage_sample_count)
+ return false;
+
switch (sample_count) {
case 2:
case 4:
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned bind)
{
struct sw_winsys *winsys = softpipe_screen(screen)->winsys;
target == PIPE_TEXTURE_CUBE ||
target == PIPE_TEXTURE_CUBE_ARRAY);
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
format_desc = util_format_description(format);
if (!format_desc)
return FALSE;
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);
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.
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned bindings);
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,
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;
}
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;
}
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;
}
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned bind)
{
struct swr_screen *screen = swr_screen(_screen);
|| target == PIPE_TEXTURE_CUBE
|| target == PIPE_TEXTURE_CUBE_ARRAY);
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
format_desc = util_format_description(format);
if (!format_desc)
return FALSE;
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
struct tegra_screen *screen = to_tegra_screen(pscreen);
return screen->gpu->is_format_supported(screen->gpu, format, target,
- sample_count, usage);
+ sample_count, storage_sample_count,
+ usage);
}
static boolean
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
struct v3d_screen *screen = v3d_screen(pscreen);
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
if (sample_count > 1 && sample_count != VC5_MAX_SAMPLES)
return FALSE;
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned usage)
{
struct vc4_screen *screen = vc4_screen(pscreen);
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
if (sample_count > 1 && sample_count != VC4_MAX_SAMPLES)
return FALSE;
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned bind)
{
struct virgl_screen *vscreen = virgl_screen(screen);
const struct util_format_description *format_desc;
int i;
+ if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
+ return false;
+
assert(target == PIPE_BUFFER ||
target == PIPE_TEXTURE_1D ||
target == PIPE_TEXTURE_1D_ARRAY ||
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
+ unsigned storage_sample_count,
unsigned bindings );
/**
for (auto f : formats) {
if (all_of([=](const device &dev) {
return dev.pipe->is_format_supported(
- dev.pipe, f.second, target, 1, bindings);
+ dev.pipe, f.second, target, 1, 1, bindings);
}, ctx.devices()))
s.insert(f.first);
}
fourcc_to_pipe_format(
fourcc_formats[i]),
screen->target,
- 0, bind)) {
+ 0, 0, bind)) {
if (j < max)
formats[j] = fourcc_formats[i];
j++;
const unsigned usage = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
if (pscreen->query_dmabuf_modifiers != NULL &&
- pscreen->is_format_supported(pscreen, format, screen->target, 0, usage)) {
+ pscreen->is_format_supported(pscreen, format, screen->target, 0, 0,
+ usage)) {
pscreen->query_dmabuf_modifiers(pscreen, format, max, modifiers,
external_only, count);
return true;
value[0] =
screen->base.screen->is_format_supported(screen->base.screen,
PIPE_FORMAT_B8G8R8A8_SRGB,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_RENDER_TARGET);
return 0;
case __DRI2_RENDERER_HAS_CONTEXT_PRIORITY:
? MSAA_VISUAL_MAX_SAMPLES : 1;
pf_x8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24X8_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_DEPTH_STENCIL);
pf_z24x8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_X8Z24_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_DEPTH_STENCIL);
pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24_UNORM_S8_UINT,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_DEPTH_STENCIL);
pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8_UINT_Z24_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_DEPTH_STENCIL);
pf_z16 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z16_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_DEPTH_STENCIL);
pf_z32 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z32_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_DEPTH_STENCIL);
if (pf_z16) {
continue;
if (!p_screen->is_format_supported(p_screen, pipe_formats[format],
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET))
continue;
int samples = i > 1 ? i : 0;
if (p_screen->is_format_supported(p_screen, pipe_formats[format],
- PIPE_TEXTURE_2D, samples,
+ PIPE_TEXTURE_2D, samples, samples,
PIPE_BIND_RENDER_TARGET)) {
msaa_modes[num_msaa_modes++] = samples;
}
for (i = 0; i < count; i++) {
if (xmdpy->screen->is_format_supported(xmdpy->screen, formats[i],
target, sample_count,
- tex_usage)) {
+ sample_count, tex_usage)) {
fmt = formats[i];
break;
}
if (!xmdpy->screen->is_format_supported(xmdpy->screen,
v->stvis.color_format,
PIPE_TEXTURE_2D, num_samples,
+ num_samples,
PIPE_BIND_RENDER_TARGET))
v->stvis.color_format = PIPE_FORMAT_NONE;
srgb_format = util_format_srgb(resource->format);
if (sRGB && srgb_format != PIPE_FORMAT_NONE &&
screen->is_format_supported(screen, srgb_format,
- resource->target, 0, resource->bind))
+ resource->target, 0, 0, resource->bind))
templ.format = srgb_format;
else
templ.format = resource->format;
user_assert(screen->is_format_supported(screen, src_res->format,
src_res->target,
src_res->nr_samples,
+ src_res->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW),
D3DERR_INVALIDCALL);
user_assert(screen->is_format_supported(screen, dst_res->format,
dst_res->target,
dst_res->nr_samples,
+ dst_res->nr_storage_samples,
zs ? PIPE_BIND_DEPTH_STENCIL :
PIPE_BIND_RENDER_TARGET),
D3DERR_INVALIDCALL);
#define format_check_internal(pipe_format) \
screen->is_format_supported(screen, pipe_format, target, \
- sample_count, bindings)
+ sample_count, sample_count, bindings)
static inline enum pipe_format
d3d9_to_pipe_format_checked(struct pipe_screen *screen,
srgb_format = util_format_srgb(resource->format);
if (srgb_format == PIPE_FORMAT_NONE ||
!screen->is_format_supported(screen, srgb_format,
- resource->target, 0, resource->bind))
+ resource->target, 0, 0, resource->bind))
srgb_format = resource->format;
memset(&templ, 0, sizeof(templ));
tex_temp.flags = 0;
if (!drv->pipe->screen->is_format_supported(
drv->pipe->screen, tex_temp.format, tex_temp.target,
- tex_temp.nr_samples, tex_temp.bind)) {
+ tex_temp.nr_samples, tex_temp.nr_storage_samples, tex_temp.bind)) {
mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
mtx_lock(&dev->mutex);
*is_supported = pscreen->is_format_supported
(
- pscreen, format, PIPE_TEXTURE_3D, 1,
+ pscreen, format, PIPE_TEXTURE_3D, 1, 1,
PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET
);
if (*is_supported) {
mtx_lock(&dev->mutex);
*is_supported = pscreen->is_format_supported
(
- pscreen, format, PIPE_TEXTURE_2D, 1,
+ pscreen, format, PIPE_TEXTURE_2D, 1, 1,
PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET
);
mtx_unlock(&dev->mutex);
mtx_lock(&dev->mutex);
*is_supported = pscreen->is_format_supported
(
- pscreen, rgba_format, PIPE_TEXTURE_2D, 1,
+ pscreen, rgba_format, PIPE_TEXTURE_2D, 1, 1,
PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET
);
*is_supported &= pscreen->is_format_supported
(
- pscreen, index_format, PIPE_TEXTURE_2D, 1,
+ pscreen, index_format, PIPE_TEXTURE_2D, 1, 1,
PIPE_BIND_SAMPLER_VIEW
);
*is_supported &= pscreen->is_format_supported
(
- pscreen, colortbl_format, PIPE_TEXTURE_1D, 1,
+ pscreen, colortbl_format, PIPE_TEXTURE_1D, 1, 1,
PIPE_BIND_SAMPLER_VIEW
);
mtx_unlock(&dev->mutex);
mtx_lock(&dev->mutex);
*is_supported = pscreen->is_format_supported
(
- pscreen, rgba_format, PIPE_TEXTURE_2D, 1,
+ pscreen, rgba_format, PIPE_TEXTURE_2D, 1, 1,
PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET
);
mtx_lock(&dev->mutex);
*is_supported = pscreen->is_format_supported
(
- pscreen, format, PIPE_TEXTURE_3D, 1,
+ pscreen, format, PIPE_TEXTURE_3D, 1, 1,
PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET
);
if (*is_supported) {
CheckSurfaceParams(struct pipe_screen *screen,
const struct pipe_resource *templ)
{
- return screen->is_format_supported(
- screen, templ->format, templ->target, templ->nr_samples, templ->bind);
+ return screen->is_format_supported(screen, templ->format, templ->target,
+ templ->nr_samples,
+ templ->nr_storage_samples, templ->bind);
}
typedef struct
for (cfmt = 0; cfmt < num_color_formats; cfmt++) {
if (!screen->is_format_supported(screen, color_formats[cfmt].format,
- PIPE_TEXTURE_2D, samples,
+ PIPE_TEXTURE_2D, samples, samples,
bind_flags)) {
continue;
}
if (!screen->is_format_supported(screen, depth->format,
PIPE_TEXTURE_2D, samples,
+ samples,
PIPE_BIND_DEPTH_STENCIL)) {
continue;
}
}
if (!screen->is_format_supported(screen, dst->tex->format,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_RENDER_TARGET))
return -XA_ERR_INVAL;
uint32_t fs_traits = FS_COMPOSITE;
assert(screen->is_format_supported(screen, dst_surface->format,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_RENDER_TARGET));
(void)screen;
break;
case xa_format_a8:
if (xa->screen->is_format_supported(xa->screen, PIPE_FORMAT_R8_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
stype_bind[xa_type_a] |
PIPE_BIND_RENDER_TARGET))
fdesc.format = PIPE_FORMAT_R8_UNORM;
break;
case xa_format_yuv8:
if (xa->screen->is_format_supported(xa->screen, PIPE_FORMAT_R8_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
stype_bind[xa_type_yuv_component]))
fdesc.format = PIPE_FORMAT_R8_UNORM;
else
xa_get_pipe_format(xa, xa_format);
if (xa->screen->is_format_supported(xa->screen, fdesc.format,
- PIPE_TEXTURE_2D, 0, bind)) {
+ PIPE_TEXTURE_2D, 0, 0, bind)) {
if (xa->format_map[stype][0] == 0)
xa->format_map[stype][0] = num_formats;
xa->format_map[stype][1] = num_formats;
bind |= PIPE_BIND_SCANOUT;
if (!xa->screen->is_format_supported(xa->screen, fdesc.format,
- PIPE_TEXTURE_2D, 0, bind))
+ PIPE_TEXTURE_2D, 0, 0, bind))
return -XA_ERR_INVAL;
return XA_ERR_NONE;
return -XA_ERR_INVAL;
if (!xa->screen->is_format_supported(xa->screen, fdesc.format,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
template->bind |
PIPE_BIND_RENDER_TARGET))
return -XA_ERR_INVAL;
case FOURCC_AI44:
ret = PIPE_FORMAT_R4A4_UNORM;
if (!screen->is_format_supported(
- screen, ret, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW))
+ screen, ret, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW))
ret = PIPE_FORMAT_B4G4R4A4_UNORM;
break;
case FOURCC_IA44:
ret = PIPE_FORMAT_A4R4_UNORM;
if (!screen->is_format_supported(
- screen, ret, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW))
+ screen, ret, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW))
ret = PIPE_FORMAT_B4G4R4A4_UNORM;
break;
}
if (!screen->is_format_supported(
- screen, ret, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW)) {
+ screen, ret, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW)) {
XVMC_MSG(XVMC_ERR, "[XvMC] Unsupported 2D format %s for Xv image ID 0x%08X.\n", util_format_name(ret), xvimage_id);
ret = PIPE_FORMAT_NONE;
}
component_order[2] = 'V';
component_order[3] = 'A';
if (!screen->is_format_supported(
- screen, *palette_format, PIPE_TEXTURE_1D, 0,
+ screen, *palette_format, PIPE_TEXTURE_1D, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
/* One of these formats better be supported... */
*palette_format = PIPE_FORMAT_B8G8R8X8_UNORM;
printf(" - %s\n", util_format_name(surface_fmts[i]));
if (!ctx->screen->is_format_supported(ctx->screen,
- surface_fmts[i], PIPE_TEXTURE_2D, 1,
+ surface_fmts[i], PIPE_TEXTURE_2D, 1, 1,
PIPE_BIND_COMPUTE_RESOURCE)) {
printf("(unsupported)\n");
continue;
printf(" - %s\n", util_format_name(surface_fmts[i]));
if (!ctx->screen->is_format_supported(ctx->screen,
- surface_fmts[i], PIPE_TEXTURE_2D, 1,
+ surface_fmts[i], PIPE_TEXTURE_2D, 1, 1,
PIPE_BIND_COMPUTE_RESOURCE)) {
printf("(unsupported)\n");
continue;
struct wrapper_sw_winsys *wsw = wrapper_sw_winsys(ws);
return wsw->screen->is_format_supported(wsw->screen, format,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
}
* drivers callback must be adjusted for this.
*/
if (screen->is_format_supported(screen, PIPE_FORMAT_NONE,
- PIPE_TEXTURE_2D, msaa_mode,
+ PIPE_TEXTURE_2D, msaa_mode, msaa_mode,
PIPE_BIND_RENDER_TARGET))
quantized_samples = msaa_mode;
}
/* find a usable texture format */
if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM,
- st->internal_target, 0,
+ st->internal_target, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_I8_UNORM;
}
else if (screen->is_format_supported(screen, PIPE_FORMAT_A8_UNORM,
- st->internal_target, 0,
+ st->internal_target, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_A8_UNORM;
}
else if (screen->is_format_supported(screen, PIPE_FORMAT_L8_UNORM,
- st->internal_target, 0,
+ st->internal_target, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_L8_UNORM;
}
if (screen->is_format_supported(screen, blit.src.format,
blit.src.resource->target,
blit.src.resource->nr_samples,
+ blit.src.resource->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, blit.dst.format,
blit.dst.resource->target,
blit.dst.resource->nr_samples,
+ blit.dst.resource->nr_storage_samples,
PIPE_BIND_RENDER_TARGET)) {
pipe->blit(pipe, &blit);
return GL_TRUE;
(type == GL_COLOR ? PIPE_BIND_RENDER_TARGET : PIPE_BIND_DEPTH_STENCIL);
if (!screen->is_format_supported(screen, srcFormat, st->internal_target, 0,
- srcBind)) {
+ 0, srcBind)) {
/* srcFormat is non-renderable. Find a compatible renderable format. */
if (type == GL_DEPTH) {
srcFormat = st_choose_format(st, GL_DEPTH_COMPONENT, GL_NONE,
static bool
is_format_supported(struct pipe_screen *screen, enum pipe_format format,
- unsigned nr_samples, unsigned usage)
+ unsigned nr_samples, unsigned nr_storage_samples,
+ unsigned usage)
{
bool supported = screen->is_format_supported(screen, format, PIPE_TEXTURE_2D,
- nr_samples, usage);
+ nr_samples, nr_storage_samples,
+ usage);
/* for sampling, some formats can be emulated.. it doesn't matter that
* the surface will have a format that the driver can't cope with because
if (format == PIPE_FORMAT_IYUV) {
supported = screen->is_format_supported(screen, PIPE_FORMAT_R8_UNORM,
PIPE_TEXTURE_2D, nr_samples,
- usage);
+ nr_storage_samples, usage);
} else if (format == PIPE_FORMAT_NV12) {
supported = screen->is_format_supported(screen, PIPE_FORMAT_R8_UNORM,
PIPE_TEXTURE_2D, nr_samples,
- usage) &&
+ nr_storage_samples, usage) &&
screen->is_format_supported(screen, PIPE_FORMAT_R8G8_UNORM,
PIPE_TEXTURE_2D, nr_samples,
- usage);
+ nr_storage_samples, usage);
}
}
return false;
}
- if (!is_format_supported(screen, out->format, out->texture->nr_samples, usage)) {
+ if (!is_format_supported(screen, out->format, out->texture->nr_samples,
+ out->texture->nr_storage_samples, usage)) {
/* unable to specify a texture object using the specified EGL image */
pipe_resource_reference(&out->texture, NULL);
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(format not supported)", error);
}
valid = screen->is_format_supported(screen, format,
- PIPE_TEXTURE_2D,
- stObj->pt->nr_samples, bindings);
+ PIPE_TEXTURE_2D,
+ stObj->pt->nr_samples,
+ stObj->pt->nr_storage_samples,
+ bindings);
if (!valid) {
st_fbo_invalid("Invalid format");
}
if (texture->nr_samples > 1)
return false;
- if (!screen->is_format_supported(screen, dst_format, PIPE_BUFFER, 0,
+ if (!screen->is_format_supported(screen, dst_format, PIPE_BUFFER, 0, 0,
PIPE_BIND_SHADER_IMAGE))
return false;
if (!src_format ||
!screen->is_format_supported(screen, src_format, src->target,
- src->nr_samples,
+ src->nr_samples, src->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW)) {
goto fallback;
}
else
bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
- if (screen->is_format_supported(screen, format, target, 0, bindings))
+ if (screen->is_format_supported(screen, format, target, 0, 0, bindings))
return bindings;
else {
/* Try non-sRGB. */
format = util_format_linear(format);
- if (screen->is_format_supported(screen, format, target, 0, bindings))
+ if (screen->is_format_supported(screen, format, target, 0, 0, bindings))
return bindings;
else
return PIPE_BIND_SAMPLER_VIEW;
if (dst_format != orig_dst_format &&
!screen->is_format_supported(screen, dst_format, PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET)) {
+ 0, PIPE_BIND_RENDER_TARGET)) {
return false;
}
}
if (!src_format ||
- !screen->is_format_supported(screen, src_format, PIPE_BUFFER, 0,
+ !screen->is_format_supported(screen, src_format, PIPE_BUFFER, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
return false;
}
if (!dst_format ||
!screen->is_format_supported(screen, dst_format, dst->target,
- dst->nr_samples, bind)) {
+ dst->nr_samples, dst->nr_storage_samples,
+ bind)) {
goto fallback;
}
goto fallback;
}
- if (!screen->is_format_supported(screen, copy_format, PIPE_BUFFER, 0,
+ if (!screen->is_format_supported(screen, copy_format, PIPE_BUFFER, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
goto fallback;
}
if (!screen->is_format_supported(screen, copy_format, dst->target,
- dst->nr_samples, PIPE_BIND_RENDER_TARGET)) {
+ dst->nr_samples, dst->nr_storage_samples,
+ PIPE_BIND_RENDER_TARGET)) {
goto fallback;
}
if (!src_format ||
!screen->is_format_supported(screen, src_format, src->target,
- src->nr_samples,
+ src->nr_samples, src->nr_storage_samples,
PIPE_BIND_SAMPLER_VIEW)) {
goto fallback;
}
break;
case PIPE_FORMAT_ETC2_R11_UNORM:
if (!screen->is_format_supported(screen, PIPE_FORMAT_R16_UNORM,
- pipe_target, 0, bind))
+ pipe_target, 0, 0, bind))
goto fallback;
dst_glformat = GL_R16;
break;
case PIPE_FORMAT_ETC2_R11_SNORM:
if (!screen->is_format_supported(screen, PIPE_FORMAT_R16_SNORM,
- pipe_target, 0, bind))
+ pipe_target, 0, 0, bind))
goto fallback;
dst_glformat = GL_R16_SNORM;
break;
case PIPE_FORMAT_ETC2_RG11_UNORM:
if (!screen->is_format_supported(screen, PIPE_FORMAT_R16G16_UNORM,
- pipe_target, 0, bind))
+ pipe_target, 0, 0, bind))
goto fallback;
dst_glformat = GL_RG16;
break;
case PIPE_FORMAT_ETC2_RG11_SNORM:
if (!screen->is_format_supported(screen, PIPE_FORMAT_R16G16_SNORM,
- pipe_target, 0, bind))
+ pipe_target, 0, 0, bind))
goto fallback;
dst_glformat = GL_RG16_SNORM;
break;
if (!dst_format ||
!screen->is_format_supported(screen, dst_format, stImage->pt->target,
- stImage->pt->nr_samples, bind)) {
+ stImage->pt->nr_samples,
+ stImage->pt->nr_storage_samples, bind)) {
goto fallback;
}
(int) target, util_format_name(format), last_level);
assert(format);
- assert(screen->is_format_supported(screen, format, target, 0,
+ assert(screen->is_format_supported(screen, format, target, 0, 0,
PIPE_BIND_SAMPLER_VIEW));
memset(&pt, 0, sizeof(pt));
for (; num_samples <= ctx->Const.MaxSamples; num_samples++) {
if (screen->is_format_supported(screen, fmt, ptarget,
- num_samples,
+ num_samples, num_samples,
PIPE_BIND_SAMPLER_VIEW)) {
/* Update the sample count in gl_texture_image as well. */
texImage->NumSamples = num_samples;
screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT);
st->has_shader_model3 = screen->get_param(screen, PIPE_CAP_SM3);
st->has_etc1 = screen->is_format_supported(screen, PIPE_FORMAT_ETC1_RGB8,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW);
st->has_etc2 = screen->is_format_supported(screen, PIPE_FORMAT_ETC2_RGB8,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW);
st->has_astc_2d_ldr =
screen->is_format_supported(screen, PIPE_FORMAT_ASTC_4x4_SRGB,
- PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW);
+ PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW);
st->prefer_blit_based_texture_transfer = screen->get_param(screen,
PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER);
st->force_persample_in_shader =
/* Examine each format in the list. */
for (j = 0; j < num_formats && mapping[i].format[j]; j++) {
if (screen->is_format_supported(screen, mapping[i].format[j],
- target, 0, bind_flags)) {
+ target, 0, 0, bind_flags)) {
num_supported++;
}
}
for (i = max_samples; i > 0; --i) {
for (f = 0; f < num_formats; f++) {
if (screen->is_format_supported(screen, formats[f],
- PIPE_TEXTURE_2D, i, bind)) {
+ PIPE_TEXTURE_2D, i, i, bind)) {
return i;
}
}
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS) >= 16 &&
/* Requirements for ETC2 emulation. */
screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_R16_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_R16G16_UNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_R16_SNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_R16G16_SNORM,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
extensions->ARB_ES3_compatibility = GL_TRUE;
}
struct pipe_screen *screen = st->pipe->screen;
bool has_bgra_srgb = screen->is_format_supported(screen,
PIPE_FORMAT_B8G8R8A8_SRGB,
- PIPE_TEXTURE_2D, 0,
+ PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW);
switch (mesaFormat) {
uint i;
for (i = 0; formats[i]; i++) {
if (screen->is_format_supported(screen, formats[i], target,
- sample_count, bindings)) {
+ sample_count, sample_count, bindings)) {
if (!allow_dxt && util_format_is_s3tc(formats[i])) {
/* we can't return a dxt format, continue searching */
continue;
/* search for exact matches */
pf = find_exact_format(internalFormat, format, type);
if (pf != PIPE_FORMAT_NONE &&
- screen->is_format_supported(screen, pf,
- target, sample_count, bindings)) {
+ screen->is_format_supported(screen, pf, target, sample_count,
+ sample_count, bindings)) {
goto success;
}
st_mesa_format_to_pipe_format(st, mesa_format);
if (format &&
- screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0,
- bind)) {
+ screen->is_format_supported(screen, format, PIPE_TEXTURE_2D,
+ 0, 0, bind)) {
return format;
}
/* It's unlikely to find 2 matching Mesa formats. */
st_pipe_format_to_mesa_format(srgb_format) != MESA_FORMAT_NONE &&
screen->is_format_supported(screen, srgb_format,
PIPE_TEXTURE_2D, stfbi->visual->samples,
+ stfbi->visual->samples,
(PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_RENDER_TARGET)))
mode.sRGBCapable = GL_TRUE;
(int) target, util_format_name(format), last_level);
assert(format);
- assert(screen->is_format_supported(screen, format, target, 0,
+ assert(screen->is_format_supported(screen, format, target, 0, 0,
PIPE_BIND_SAMPLER_VIEW));
memset(&pt, 0, sizeof(pt));