mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
v3d: use more an auxiliar devinfo
Improve readability by using an auxiliar
struct v3d_device_info *devinfo = &screen->devinfo;
this was triggered by the use of the v3d_X macro, where just having a
devinfo makes is more friendly. As we are here, we used it on other
places of the code.
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23172>
This commit is contained in:
parent
a5c8be30d1
commit
b7c35f5998
3 changed files with 14 additions and 11 deletions
|
|
@ -432,8 +432,9 @@ v3d_tlb_blit(struct pipe_context *pctx, struct pipe_blit_info *info)
|
|||
{
|
||||
struct v3d_context *v3d = v3d_context(pctx);
|
||||
struct v3d_screen *screen = v3d->screen;
|
||||
struct v3d_device_info *devinfo = &screen->devinfo;
|
||||
|
||||
if (screen->devinfo.ver < 40 || !info->mask)
|
||||
if (devinfo->ver < 40 || !info->mask)
|
||||
return;
|
||||
|
||||
bool is_color_blit = info->mask & PIPE_MASK_RGBA;
|
||||
|
|
@ -459,11 +460,11 @@ v3d_tlb_blit(struct pipe_context *pctx, struct pipe_blit_info *info)
|
|||
util_format_is_depth_or_stencil(info->dst.format))
|
||||
return;
|
||||
|
||||
if (!v3d_rt_format_supported(&screen->devinfo, info->src.format))
|
||||
if (!v3d_rt_format_supported(devinfo, info->src.format))
|
||||
return;
|
||||
|
||||
if (v3d_get_rt_format(&screen->devinfo, info->src.format) !=
|
||||
v3d_get_rt_format(&screen->devinfo, info->dst.format))
|
||||
if (v3d_get_rt_format(devinfo, info->src.format) !=
|
||||
v3d_get_rt_format(devinfo, info->dst.format))
|
||||
return;
|
||||
|
||||
bool msaa = (info->src.resource->nr_samples > 1 ||
|
||||
|
|
@ -472,7 +473,7 @@ v3d_tlb_blit(struct pipe_context *pctx, struct pipe_blit_info *info)
|
|||
info->dst.resource->nr_samples < 2);
|
||||
|
||||
if (is_msaa_resolve &&
|
||||
!v3d_format_supports_tlb_msaa_resolve(&screen->devinfo, info->src.format))
|
||||
!v3d_format_supports_tlb_msaa_resolve(devinfo, info->src.format))
|
||||
return;
|
||||
|
||||
v3d_flush_jobs_writing_resource(v3d, info->src.resource, V3D_FLUSH_DEFAULT, false);
|
||||
|
|
@ -554,7 +555,7 @@ v3d_tlb_blit(struct pipe_context *pctx, struct pipe_blit_info *info)
|
|||
info->mask &= ~PIPE_MASK_S;
|
||||
}
|
||||
|
||||
v3d_X(&v3d->screen->devinfo, start_binning)(v3d, job);
|
||||
v3d_X(devinfo, start_binning)(v3d, job);
|
||||
|
||||
v3d_job_submit(v3d, job);
|
||||
|
||||
|
|
|
|||
|
|
@ -343,6 +343,7 @@ v3d_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
|||
{
|
||||
struct v3d_screen *screen = v3d_screen(pscreen);
|
||||
struct v3d_context *v3d;
|
||||
struct v3d_device_info *devinfo = &screen->devinfo;
|
||||
|
||||
/* Prevent dumping of the shaders built during context setup. */
|
||||
uint32_t saved_shaderdb_flag = v3d_mesa_debug & V3D_DEBUG_SHADERDB;
|
||||
|
|
@ -371,8 +372,8 @@ v3d_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
|||
pctx->invalidate_resource = v3d_invalidate_resource;
|
||||
pctx->get_sample_position = v3d_get_sample_position;
|
||||
|
||||
v3d_X(&screen->devinfo, draw_init)(pctx);
|
||||
v3d_X(&screen->devinfo, state_init)(pctx);
|
||||
v3d_X(devinfo, draw_init)(pctx);
|
||||
v3d_X(devinfo, state_init)(pctx);
|
||||
v3d_program_init(pctx);
|
||||
v3d_query_init(pctx);
|
||||
v3d_resource_context_init(pctx);
|
||||
|
|
|
|||
|
|
@ -493,6 +493,7 @@ void
|
|||
v3d_job_submit(struct v3d_context *v3d, struct v3d_job *job)
|
||||
{
|
||||
struct v3d_screen *screen = v3d->screen;
|
||||
struct v3d_device_info *devinfo = &screen->devinfo;
|
||||
|
||||
if (!job->needs_flush)
|
||||
goto done;
|
||||
|
|
@ -507,10 +508,10 @@ v3d_job_submit(struct v3d_context *v3d, struct v3d_job *job)
|
|||
if (job->needs_primitives_generated)
|
||||
v3d_ensure_prim_counts_allocated(v3d);
|
||||
|
||||
v3d_X(&screen->devinfo, emit_rcl)(job);
|
||||
v3d_X(devinfo, emit_rcl)(job);
|
||||
|
||||
if (cl_offset(&job->bcl) > 0)
|
||||
v3d_X(&screen->devinfo, bcl_epilogue)(v3d, job);
|
||||
v3d_X(devinfo, bcl_epilogue)(v3d, job);
|
||||
|
||||
/* While the RCL will implicitly depend on the last RCL to have
|
||||
* finished, we also need to block on any previous TFU job we may have
|
||||
|
|
@ -545,7 +546,7 @@ v3d_job_submit(struct v3d_context *v3d, struct v3d_job *job)
|
|||
/* On V3D 4.1, the tile alloc/state setup moved to register writes
|
||||
* instead of binner packets.
|
||||
*/
|
||||
if (screen->devinfo.ver >= 41) {
|
||||
if (devinfo->ver >= 41) {
|
||||
v3d_job_add_bo(job, job->tile_alloc);
|
||||
job->submit.qma = job->tile_alloc->offset;
|
||||
job->submit.qms = job->tile_alloc->size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue