image->first_layer *
panfrost_get_layer_stride(image->layout, image->first_level);
+ unsigned char swizzle[4] = {
+ PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y, PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W
+ };
+
panfrost_new_texture(pool->dev, image->layout, texture.cpu,
image->width0, image->height0,
MAX2(image->nr_samples, 1), 1,
image->first_level, image->last_level,
0, 0,
image->nr_samples,
- PAN_V6_SWIZZLE(R, G, B, A),
+ swizzle,
image->bo->ptr.gpu + offset, &payload);
pan_pack(sampler.cpu, MIDGARD_SAMPLER, cfg)
image->first_layer *
panfrost_get_layer_stride(image->layout, image->first_level);
+ unsigned char swizzle[4] = {
+ PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y, PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W
+ };
+
panfrost_new_texture(pool->dev, image->layout, texture.cpu,
image->width0, image->height0,
MAX2(image->nr_samples, 1), 1,
image->first_level, image->last_level,
0, 0,
image->nr_samples,
- PAN_V6_SWIZZLE(R, G, B, A),
+ swizzle,
image->bo->ptr.gpu + offset, &payload);
pan_pack(sampler.cpu, BIFROST_SAMPLER, cfg) {
unsigned first_level, unsigned last_level,
unsigned first_layer, unsigned last_layer,
unsigned nr_samples,
- unsigned swizzle,
+ const unsigned char user_swizzle[4],
mali_ptr base,
const struct panfrost_ptr *payload)
{
+ unsigned swizzle = panfrost_translate_swizzle_4(user_swizzle);
const struct util_format_description *desc =
util_format_description(format);