brts[i].constant = blend[i].equation.constant;
brts[i].format = panfrost_format_to_bifrost_blend(format_desc);
+ if (dev->quirks & HAS_SWIZZLES)
+ brts[i].swizzle = panfrost_get_default_swizzle(4);
/* 0x19 disables blending and forces REPLACE
* mode (equivalent to rgb_mode = alpha_mode =
so->bo = panfrost_bo_create(device, size, 0);
panfrost_new_texture_bifrost(
+ device,
&so->bifrost_descriptor,
texture->width0, texture->height0,
depth, array_size,
case 0x820: /* T820 */
case 0x860: /* T860 */
break;
+ case 0x6221: /* G72 */
case 0x7093: /* G31 */
case 0x7212: /* G52 */
if (dev->debug & PAN_DBG_BIFROST)
return MIDGARD_QUIRKS;
case 0x6000: /* G71 */
+ case 0x6221: /* G72 */
return BIFROST_QUIRKS | HAS_SWIZZLES;
case 0x7093: /* G31 */
case 0x750: return "Mali T760 (Panfrost)";
case 0x860: return "Mali T860 (Panfrost)";
case 0x880: return "Mali T880 (Panfrost)";
+ case 0x6221: return "Mali G72 (Panfrost)";
case 0x7093: return "Mali G31 (Panfrost)";
case 0x7212: return "Mali G52 (Panfrost)";
default:
#include "util/macros.h"
#include "util/u_math.h"
#include "pan_texture.h"
+#include "panfrost-quirks.h"
/* Generates a texture descriptor. Ideally, descriptors are immutable after the
* texture is created, so we can keep these hanging around in GPU memory in a
void
panfrost_new_texture_bifrost(
+ const struct panfrost_device *dev,
struct mali_bifrost_texture_packed *out,
uint16_t width, uint16_t height,
uint16_t depth, uint16_t array_size,
pan_pack(out, BIFROST_TEXTURE, cfg) {
cfg.dimension = dim;
cfg.format = (mali_format << 12) | (srgb << 20);
+ if (dev->quirks & HAS_SWIZZLES)
+ cfg.format |= panfrost_get_default_swizzle(desc->nr_channels);
+
cfg.width = u_minify(width, first_level);
cfg.height = u_minify(height, first_level);
cfg.swizzle = swizzle;
void
panfrost_new_texture_bifrost(
+ const struct panfrost_device *dev,
struct mali_bifrost_texture_packed *out,
uint16_t width, uint16_t height,
uint16_t depth, uint16_t array_size,