return ISL_FORMAT_R16_UNORM;
default: {
if (is_render_target) {
- assert(brw->format_supported_as_render_target[format]);
- return brw->render_target_format[format];
+ assert(brw->mesa_format_supports_render[format]);
+ return brw->mesa_to_isl_render_format[format];
} else {
return brw_isl_format_for_mesa_format(format);
}
_mesa_get_format_base_format(dst_mt->format) == GL_DEPTH_STENCIL)
return false;
- if (!brw->format_supported_as_render_target[dst_image->TexFormat])
+ if (!brw->mesa_format_supports_render[dst_image->TexFormat])
return false;
/* Source clipping shouldn't be necessary, since copytexsubimage (in
struct blorp_batch batch;
blorp_batch_init(&brw->blorp, &batch, brw, 0);
blorp_fast_clear(&batch, &surf,
- brw->render_target_format[format],
+ brw->mesa_to_isl_render_format[format],
level, logical_layer, num_layers,
x0, y0, x1, y1);
blorp_batch_finish(&batch);
struct blorp_batch batch;
blorp_batch_init(&brw->blorp, &batch, brw, 0);
blorp_clear(&batch, &surf,
- brw->render_target_format[format],
+ brw->mesa_to_isl_render_format[format],
ISL_SWIZZLE_IDENTITY,
level, irb_logical_mt_layer(irb), num_layers,
x0, y0, x1, y1,
const struct brw_tracked_state render_atoms[76];
const struct brw_tracked_state compute_atoms[11];
- enum isl_format render_target_format[MESA_FORMAT_COUNT];
- bool format_supported_as_render_target[MESA_FORMAT_COUNT];
+ enum isl_format mesa_to_isl_render_format[MESA_FORMAT_COUNT];
+ bool mesa_format_supports_render[MESA_FORMAT_COUNT];
/* PrimitiveRestart */
struct {
*/
if (brw->gen >= 9 &&
brw_isl_format_for_mesa_format(mt->format) !=
- brw->render_target_format[mt->format])
+ brw->mesa_to_isl_render_format[mt->format])
return false;
/* Gen9 doesn't support fast clear on single-sampled SRGB buffers. When
*/
if (isl_format_supports_rendering(devinfo, render) &&
(isl_format_supports_alpha_blending(devinfo, render) || is_integer)) {
- brw->render_target_format[format] = render;
- brw->format_supported_as_render_target[format] = true;
+ brw->mesa_to_isl_render_format[format] = render;
+ brw->mesa_format_supports_render[format] = true;
}
}
/* We will check this table for FBO completeness, but the surface format
* table above only covered color rendering.
*/
- brw->format_supported_as_render_target[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_S_UINT8] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_Z_FLOAT32] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = true;
+ brw->mesa_format_supports_render[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;
+ brw->mesa_format_supports_render[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;
+ brw->mesa_format_supports_render[MESA_FORMAT_S_UINT8] = true;
+ brw->mesa_format_supports_render[MESA_FORMAT_Z_FLOAT32] = true;
+ brw->mesa_format_supports_render[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = true;
if (brw->gen >= 8)
- brw->format_supported_as_render_target[MESA_FORMAT_Z_UNORM16] = true;
+ brw->mesa_format_supports_render[MESA_FORMAT_Z_UNORM16] = true;
/* We remap depth formats to a supported texturing format in
* translate_tex_format().
for (int i = 0; i < ARRAY_SIZE(rgbx_formats); i++) {
ctx->TextureFormatSupported[rgbx_formats[i]] = false;
- brw->format_supported_as_render_target[rgbx_formats[i]] = false;
+ brw->mesa_format_supports_render[rgbx_formats[i]] = false;
}
}
return false;
}
- return brw->format_supported_as_render_target[format];
+ return brw->mesa_format_supports_render[format];
}
enum isl_format
* alignment of 4 as often as we can, this shouldn't happen very often.
*/
if (brw->gen == 7 && mt->valign == 2 &&
- brw->format_supported_as_render_target[mt->format]) {
+ brw->mesa_format_supports_render[mt->format]) {
return I915_TILING_X;
}
assert(brw_render_target_supported(brw, rb));
mesa_format rb_format = _mesa_get_render_format(ctx, intel_rb_format(irb));
- if (unlikely(!brw->format_supported_as_render_target[rb_format])) {
+ if (unlikely(!brw->mesa_format_supports_render[rb_format])) {
_mesa_problem(ctx, "%s: renderbuffer format %s unsupported\n",
__func__, _mesa_get_format_name(rb_format));
}
MAX2(irb->mt->num_samples, 1) : 1;
struct isl_view view = {
- .format = brw->render_target_format[rb_format],
+ .format = brw->mesa_to_isl_render_format[rb_format],
.base_level = irb->mt_level - irb->mt->first_level,
.levels = 1,
.base_array_layer = irb->mt_layer / layer_multiplier,
surf = brw_state_batch(brw, 6 * 4, 32, &offset);
- format = brw->render_target_format[rb_format];
- if (unlikely(!brw->format_supported_as_render_target[rb_format])) {
+ format = brw->mesa_to_isl_render_format[rb_format];
+ if (unlikely(!brw->mesa_format_supports_render[rb_format])) {
_mesa_problem(ctx, "%s: renderbuffer format %s unsupported\n",
__func__, _mesa_get_format_name(rb_format));
}
uint32_t *surf_offset = &brw->wm.base.surf_offset[surf_index];
if (irb) {
- const enum isl_format format = brw->render_target_format[
+ const enum isl_format format = brw->mesa_to_isl_render_format[
_mesa_get_render_format(ctx, intel_rb_format(irb))];
assert(isl_format_supports_sampling(&brw->screen->devinfo,
format));
}
/* __DRIimage is opaque to the core so it has to be checked here */
- if (!brw->format_supported_as_render_target[image->format]) {
+ if (!brw->mesa_format_supports_render[image->format]) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glEGLImageTargetRenderbufferStorage(unsupported image format)");
return;
/* There's no point in using an MCS buffer if the surface isn't in a
* renderable format.
*/
- if (!brw->format_supported_as_render_target[mt->format])
+ if (!brw->mesa_format_supports_render[mt->format])
return false;
if (brw->gen >= 9) {
break;
default:
surf->usage = ISL_SURF_USAGE_TEXTURE_BIT;
- if (brw->format_supported_as_render_target[mt->format])
+ if (brw->mesa_format_supports_render[mt->format])
surf->usage = ISL_SURF_USAGE_RENDER_TARGET_BIT;
break;
}
return false;
}
- if (!brw->format_supported_as_render_target[image->TexFormat]) {
+ if (!brw->mesa_format_supports_render[image->TexFormat]) {
perf_debug("Non-renderable PBO format; fallback to CPU mapping\n");
return false;
}