#include "pan_bo.h"
#include "pan_context.h"
#include "pan_util.h"
-#include "pan_format.h"
#include "util/format/u_format.h"
case PIPE_FORMAT_A4B4G4R4_UNORM:
case PIPE_FORMAT_B4G4R4A4_UNORM:
+ case PIPE_FORMAT_R4G4B4A4_UNORM:
fmt.unk1 = 0x4;
fmt.nr_channels = MALI_POSITIVE(1);
fmt.unk2 = 0x5;
fb->framebuffer = base;
fb->stride = stride;
- if (rsrc->layout == PAN_LINEAR)
+ if (rsrc->layout == MALI_TEXTURE_LINEAR)
fb->format.block = MALI_BLOCK_LINEAR;
- else if (rsrc->layout == PAN_TILED) {
+ else if (rsrc->layout == MALI_TEXTURE_TILED) {
fb->format.block = MALI_BLOCK_TILED;
fb->stride *= 16;
} else {
unsigned level = surf->u.tex.level;
assert(surf->u.tex.first_layer == 0);
- if (rsrc->layout != PAN_LINEAR)
+ if (rsrc->layout != MALI_TEXTURE_TILED)
unreachable("Invalid render layout.");
fb->depth_buffer = rsrc->bo->gpu + rsrc->slices[level].offset;
return;
if (panfrost_is_z24s8_variant(surf->format)) {
-
/* Stencil data is interleaved with depth */
fb->stencil_buffer = fb->depth_buffer;
fb->stencil_stride = fb->depth_stride;
- } else if (surf->format == PIPE_FORMAT_Z32_UNORM ||
- surf->format == PIPE_FORMAT_Z32_FLOAT) {
-
+ } else if (surf->format == PIPE_FORMAT_Z32_FLOAT) {
/* No stencil, nothing to do */
} else if (surf->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) {
-
/* Stencil data in separate buffer */
struct panfrost_resource *stencil = rsrc->separate_stencil;
struct panfrost_slice stencil_slice = stencil->slices[level];
{
struct panfrost_context *ctx = batch->ctx;
struct pipe_context *gallium = (struct pipe_context *) ctx;
- struct panfrost_screen *screen = pan_screen(gallium->screen);
+ struct panfrost_device *dev = pan_device(gallium->screen);
unsigned width = batch->key.width;
unsigned height = batch->key.height;
struct mali_single_framebuffer framebuffer = {
.width = MALI_POSITIVE(width),
.height = MALI_POSITIVE(height),
- .unknown2 = 0x1f,
+ .shared_memory = {
+ .shared_workgroup_count = ~0,
+ .scratchpad = panfrost_batch_get_scratchpad(batch, shift, dev->thread_tls_alloc, dev->core_count)->gpu,
+ },
.format = {
.unk3 = 0x3,
},
.clear_flags = 0x1000,
- .scratchpad = panfrost_batch_get_scratchpad(batch, shift, screen->thread_tls_alloc, screen->core_count)->gpu,
.tiler = panfrost_emit_midg_tiler(batch, vertex_count),
};
fb.format.unk2 |= MALI_SFBD_FORMAT_MSAA_B;
}
- return panfrost_upload_transient(batch, &fb, sizeof(fb)) | MALI_SFBD;
+ return panfrost_upload_transient(batch, &fb, sizeof(fb));
}