GL_EXT_texture_integer DONE (panfrost, v3d)
GL_EXT_texture_array DONE (panfrost, v3d)
GL_EXT_draw_buffers2 (Per-buffer blend and masks) DONE (panfrost, v3d)
- GL_EXT_texture_compression_rgtc DONE (panfrost/if SoC supports)
+ GL_EXT_texture_compression_rgtc DONE (panfrost)
GL_ARB_texture_rg DONE (panfrost, v3d)
GL_EXT_transform_feedback (Transform feedback) DONE (panfrost, v3d)
GL_ARB_vertex_array_object (Vertex array objects) DONE (panfrost, v3d)
assert(prsrc->bo);
/* Format to access the stencil portion of a Z32_S8 texture */
- if (so->base.format == PIPE_FORMAT_X32_S8X24_UINT) {
+ if (format == PIPE_FORMAT_X32_S8X24_UINT) {
assert(prsrc->separate_stencil);
texture = &prsrc->separate_stencil->base;
prsrc = (struct panfrost_resource *)texture;
format = texture->format;
}
+ const struct util_format_description *desc = util_format_description(format);
+
+ bool fake_rgtc = !panfrost_supports_compressed_format(device, MALI_BC4_UNORM);
+
+ if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC && fake_rgtc) {
+ if (desc->is_snorm)
+ format = PIPE_FORMAT_R8G8B8A8_SNORM;
+ else
+ format = PIPE_FORMAT_R8G8B8A8_UNORM;
+ desc = util_format_description(format);
+ }
+
so->texture_bo = prsrc->bo->gpu;
so->layout = prsrc->layout;
panfrost_translate_texture_type(so->base.target);
if (device->quirks & IS_BIFROST) {
- const struct util_format_description *desc =
- util_format_description(format);
unsigned char composed_swizzle[4];
util_format_compose_swizzles(desc->swizzle, user_swizzle, composed_swizzle);
void
panfrost_resource_screen_init(struct pipe_screen *pscreen)
{
+ struct panfrost_device *dev = pan_device(pscreen);
+
+ bool fake_rgtc = !panfrost_supports_compressed_format(dev, MALI_BC4_UNORM);
+
//pscreen->base.resource_create_with_modifiers =
// panfrost_resource_create_with_modifiers;
pscreen->resource_create = u_transfer_helper_resource_create;
pscreen->resource_get_handle = panfrost_resource_get_handle;
pscreen->transfer_helper = u_transfer_helper_create(&transfer_vtbl,
true, false,
- true, true);
+ fake_rgtc, true);
}
void
if (scanout && renderable && !util_format_is_rgba8_variant(format_desc))
return false;
- if (dev->debug & (PAN_DBG_GL3 | PAN_DBG_DEQP)) {
- if (format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC)
- return true;
- }
-
/* Check we support the format with the given bind */
unsigned relevant_bind = bind &
/* Also check that compressed texture formats are supported on this
* particular chip. They may not be depending on system integration
- * differences. */
+ * differences. RGTC can be emulated so is always supported. */
+
+ bool is_rgtc = format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC;
+ bool supported = panfrost_supports_compressed_format(dev, fmt.hw);
- if (!panfrost_supports_compressed_format(dev, fmt.hw))
+ if (!is_rgtc && !supported)
return false;
return fmt.hw && ((relevant_bind & ~fmt.bind) == 0);