panfrost: Hide some Bifrost-specific functions

Pertains to data structures removed in Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
This commit is contained in:
Alyssa Rosenzweig 2022-04-07 11:18:17 -04:00 committed by Marge Bot
parent 58934dd666
commit e4edb1a53f
1 changed files with 27 additions and 21 deletions

View File

@ -447,6 +447,18 @@ pan_allow_forward_pixel_to_kill(struct panfrost_context *ctx, struct panfrost_sh
!blend_reads_dest;
}
static mali_ptr
panfrost_emit_compute_shader_meta(struct panfrost_batch *batch, enum pipe_shader_type stage)
{
struct panfrost_shader_state *ss = panfrost_get_shader_state(batch->ctx, stage);
panfrost_batch_add_bo(batch, ss->bin.bo, PIPE_SHADER_VERTEX);
panfrost_batch_add_bo(batch, ss->state.bo, PIPE_SHADER_VERTEX);
return ss->state.gpu;
}
#if PAN_ARCH <= 7
/* Construct a partial RSD corresponding to no executed fragment shader, and
* merge with the existing partial RSD. */
@ -631,17 +643,6 @@ panfrost_emit_frag_shader(struct panfrost_context *ctx,
memcpy(fragmeta, &rsd, sizeof(rsd));
}
static mali_ptr
panfrost_emit_compute_shader_meta(struct panfrost_batch *batch, enum pipe_shader_type stage)
{
struct panfrost_shader_state *ss = panfrost_get_shader_state(batch->ctx, stage);
panfrost_batch_add_bo(batch, ss->bin.bo, PIPE_SHADER_VERTEX);
panfrost_batch_add_bo(batch, ss->state.bo, PIPE_SHADER_VERTEX);
return ss->state.gpu;
}
static mali_ptr
panfrost_emit_frag_shader_meta(struct panfrost_batch *batch)
{
@ -682,6 +683,7 @@ panfrost_emit_frag_shader_meta(struct panfrost_batch *batch)
return xfer.gpu;
}
#endif
static mali_ptr
panfrost_emit_viewport(struct panfrost_batch *batch)
@ -1499,6 +1501,7 @@ panfrost_emit_sampler_descriptors(struct panfrost_batch *batch,
return T.gpu;
}
#if PAN_ARCH <= 7
/* Packs all image attribute descs and attribute buffer descs.
* `first_image_buf_index` must be the index of the first image attribute buffer descriptor.
*/
@ -2407,6 +2410,7 @@ panfrost_emit_vertex_tiler_jobs(struct panfrost_batch *batch,
MALI_JOB_TYPE_TILER, false, false,
vertex, 0, tiler_job, false);
}
#endif
static void
emit_tls(struct panfrost_batch *batch)
@ -2574,6 +2578,17 @@ panfrost_update_streamout_offsets(struct panfrost_context *ctx)
}
}
static inline enum mali_index_type
panfrost_translate_index_size(unsigned size)
{
STATIC_ASSERT(MALI_INDEX_TYPE_NONE == 0);
STATIC_ASSERT(MALI_INDEX_TYPE_UINT8 == 1);
STATIC_ASSERT(MALI_INDEX_TYPE_UINT16 == 2);
return (size == 4) ? MALI_INDEX_TYPE_UINT32 : size;
}
#if PAN_ARCH <= 7
static inline void
pan_emit_draw_descs(struct panfrost_batch *batch,
struct MALI_DRAW *d, enum pipe_shader_type st)
@ -2588,16 +2603,6 @@ pan_emit_draw_descs(struct panfrost_batch *batch,
d->samplers = batch->samplers[st];
}
static inline enum mali_index_type
panfrost_translate_index_size(unsigned size)
{
STATIC_ASSERT(MALI_INDEX_TYPE_NONE == 0);
STATIC_ASSERT(MALI_INDEX_TYPE_UINT8 == 1);
STATIC_ASSERT(MALI_INDEX_TYPE_UINT16 == 2);
return (size == 4) ? MALI_INDEX_TYPE_UINT32 : size;
}
static void
panfrost_draw_emit_vertex_section(struct panfrost_batch *batch,
mali_ptr vs_vary, mali_ptr varyings,
@ -2636,6 +2641,7 @@ panfrost_draw_emit_vertex(struct panfrost_batch *batch,
panfrost_draw_emit_vertex_section(batch, vs_vary, varyings,
attribs, attrib_bufs, section);
}
#endif
static void
panfrost_emit_primitive_size(struct panfrost_context *ctx,