if (!batch->framebuffer.gpu) {
unsigned size = (screen->quirks & MIDGARD_SFBD) ?
sizeof(struct mali_single_framebuffer) :
- sizeof(struct bifrost_framebuffer);
+ sizeof(struct mali_framebuffer);
batch->framebuffer = panfrost_allocate_transient(batch, size);
static void
panfrost_mfbd_clear(
struct panfrost_batch *batch,
- struct bifrost_framebuffer *fb,
- struct bifrost_fb_extra *fbx,
- struct bifrost_render_target *rts,
+ struct mali_framebuffer *fb,
+ struct mali_framebuffer_extra *fbx,
+ struct mali_render_target *rts,
unsigned rt_count)
{
for (unsigned i = 0; i < rt_count; ++i) {
static void
panfrost_mfbd_set_cbuf(
- struct bifrost_render_target *rt,
+ struct mali_render_target *rt,
struct pipe_surface *surf)
{
struct panfrost_resource *rsrc = pan_resource(surf->texture);
static void
panfrost_mfbd_set_zsbuf(
- struct bifrost_framebuffer *fb,
- struct bifrost_fb_extra *fbx,
+ struct mali_framebuffer *fb,
+ struct mali_framebuffer_extra *fbx,
struct pipe_surface *surf)
{
struct panfrost_resource *rsrc = pan_resource(surf->texture);
static mali_ptr
panfrost_mfbd_upload(struct panfrost_batch *batch,
- struct bifrost_framebuffer *fb,
- struct bifrost_fb_extra *fbx,
- struct bifrost_render_target *rts,
+ struct mali_framebuffer *fb,
+ struct mali_framebuffer_extra *fbx,
+ struct mali_render_target *rts,
unsigned rt_count)
{
off_t offset = 0;
/* Compute total size for transfer */
size_t total_sz =
- sizeof(struct bifrost_framebuffer) +
- (has_extra ? sizeof(struct bifrost_fb_extra) : 0) +
- sizeof(struct bifrost_render_target) * 4;
+ sizeof(struct mali_framebuffer) +
+ (has_extra ? sizeof(struct mali_framebuffer_extra) : 0) +
+ sizeof(struct mali_render_target) * 4;
struct panfrost_transfer m_f_trans =
panfrost_allocate_transient(batch, total_sz);
#undef UPLOAD
-static struct bifrost_framebuffer
+static struct mali_framebuffer
panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
{
struct panfrost_context *ctx = batch->ctx;
unsigned shift = panfrost_get_stack_shift(batch->stack_size);
- struct bifrost_framebuffer framebuffer = {
+ struct mali_framebuffer framebuffer = {
.width1 = MALI_POSITIVE(width),
.height1 = MALI_POSITIVE(height),
.width2 = MALI_POSITIVE(width),
void
panfrost_attach_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
{
- struct bifrost_framebuffer mfbd =
+ struct mali_framebuffer mfbd =
panfrost_emit_mfbd(batch, vertex_count);
memcpy(batch->framebuffer.cpu, &mfbd, sizeof(mfbd));
mali_ptr
panfrost_mfbd_fragment(struct panfrost_batch *batch, bool has_draws)
{
- struct bifrost_framebuffer fb = panfrost_emit_mfbd(batch, has_draws);
- struct bifrost_fb_extra fbx = {0};
- struct bifrost_render_target rts[4] = {0};
+ struct mali_framebuffer fb = panfrost_emit_mfbd(batch, has_draws);
+ struct mali_framebuffer_extra fbx = {0};
+ struct mali_render_target rts[4] = {0};
/* We always upload at least one dummy GL_NONE render target */
unsigned no_preload : 1;
} __attribute__((packed));
-struct bifrost_render_target {
+struct mali_render_target {
struct mali_rt_format format;
u64 zero1;
u32 clear_color_4; // always equal, but unclear function?
} __attribute__((packed));
-/* An optional part of bifrost_framebuffer. It comes between the main structure
+/* An optional part of mali_framebuffer. It comes between the main structure
* and the array of render targets. It must be included if any of these are
* enabled:
*
/* flags_lo */
#define MALI_EXTRA_ZS (0x4)
-struct bifrost_fb_extra {
+struct mali_framebuffer_extra {
mali_ptr checksum;
/* Each tile has an 8 byte checksum, so the stride is "width in tiles * 8" */
u32 checksum_stride;
#define MALI_MFBD_DEPTH_WRITE (1 << 10)
-/* The MFBD contains the extra bifrost_fb_extra section */
+/* The MFBD contains the extra mali_framebuffer_extra section */
#define MALI_MFBD_EXTRA (1 << 13)
-struct bifrost_framebuffer {
+struct mali_framebuffer {
struct mali_shared_memory shared_memory;
/* 0x20 */
struct midgard_tiler_descriptor tiler;
- /* optional: struct bifrost_fb_extra extra */
- /* struct bifrost_render_target rts[] */
+ /* optional: struct mali_framebuffer_extra extra */
+ /* struct mali_render_target rts[] */
} __attribute__((packed));
#endif /* __PANFROST_JOB_H__ */
}
static void
-pandecode_render_target(uint64_t gpu_va, unsigned job_no, const struct bifrost_framebuffer *fb)
+pandecode_render_target(uint64_t gpu_va, unsigned job_no, const struct mali_framebuffer *fb)
{
- pandecode_log("struct bifrost_render_target rts_list_%"PRIx64"_%d[] = {\n", gpu_va, job_no);
+ pandecode_log("struct mali_render_target rts_list_%"PRIx64"_%d[] = {\n", gpu_va, job_no);
pandecode_indent++;
for (int i = 0; i < (fb->rt_count_1 + 1); i++) {
- mali_ptr rt_va = gpu_va + i * sizeof(struct bifrost_render_target);
+ mali_ptr rt_va = gpu_va + i * sizeof(struct mali_render_target);
struct pandecode_mapped_memory *mem =
pandecode_find_mapped_gpu_mem_containing(rt_va);
- const struct bifrost_render_target *PANDECODE_PTR_VAR(rt, mem, (mali_ptr) rt_va);
+ const struct mali_render_target *PANDECODE_PTR_VAR(rt, mem, (mali_ptr) rt_va);
pandecode_log("{\n");
pandecode_indent++;
pandecode_mfbd_bfr(uint64_t gpu_va, int job_no, bool is_fragment, bool is_compute)
{
struct pandecode_mapped_memory *mem = pandecode_find_mapped_gpu_mem_containing(gpu_va);
- const struct bifrost_framebuffer *PANDECODE_PTR_VAR(fb, mem, (mali_ptr) gpu_va);
+ const struct mali_framebuffer *PANDECODE_PTR_VAR(fb, mem, (mali_ptr) gpu_va);
struct pandecode_fbd info;
- pandecode_log("struct bifrost_framebuffer framebuffer_%"PRIx64"_%d = {\n", gpu_va, job_no);
+ pandecode_log("struct mali_framebuffer framebuffer_%"PRIx64"_%d = {\n", gpu_va, job_no);
pandecode_indent++;
pandecode_log(".shared_memory = {\n");
pandecode_indent--;
pandecode_log("};\n");
- gpu_va += sizeof(struct bifrost_framebuffer);
+ gpu_va += sizeof(struct mali_framebuffer);
info.has_extra = (fb->mfbd_flags & MALI_MFBD_EXTRA) && is_fragment;
if (info.has_extra) {
mem = pandecode_find_mapped_gpu_mem_containing(gpu_va);
- const struct bifrost_fb_extra *PANDECODE_PTR_VAR(fbx, mem, (mali_ptr) gpu_va);
+ const struct mali_framebuffer_extra *PANDECODE_PTR_VAR(fbx, mem, (mali_ptr) gpu_va);
- pandecode_log("struct bifrost_fb_extra fb_extra_%"PRIx64"_%d = {\n", gpu_va, job_no);
+ pandecode_log("struct mali_framebuffer_extra fb_extra_%"PRIx64"_%d = {\n", gpu_va, job_no);
pandecode_indent++;
MEMORY_PROP(fbx, checksum);
pandecode_indent--;
pandecode_log("};\n");
- gpu_va += sizeof(struct bifrost_fb_extra);
+ gpu_va += sizeof(struct mali_framebuffer_extra);
}
if (is_fragment)