pvr: Remove pvr_cmd_struct() macro

Motivated by comments on !17252; this macro adds nothing of value over
just using PVRX() directly.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17359>
This commit is contained in:
Matt Coster 2022-06-29 09:47:33 +01:00 committed by Marge Bot
parent 3cc207bc03
commit 4084162ccb
3 changed files with 12 additions and 13 deletions

View File

@ -3197,9 +3197,9 @@ static void pvr_setup_output_select(struct pvr_cmd_buffer *const cmd_buffer)
}
}
static void pvr_setup_isp_faces_and_control(
struct pvr_cmd_buffer *const cmd_buffer,
struct pvr_cmd_struct(TA_STATE_ISPA) *const ispa_out)
static void
pvr_setup_isp_faces_and_control(struct pvr_cmd_buffer *const cmd_buffer,
struct PVRX(TA_STATE_ISPA) *const ispa_out)
{
struct pvr_emit_state *const emit_state = &cmd_buffer->state.emit_state;
const struct pvr_graphics_pipeline *const gfx_pipeline =
@ -3476,7 +3476,7 @@ pvr_setup_isp_depth_bias_scissor_state(struct pvr_cmd_buffer *const cmd_buffer)
struct pvr_ppp_state *const ppp_state = &cmd_buffer->state.ppp_state;
const struct pvr_dynamic_state *const dynamic_state =
&cmd_buffer->state.dynamic.common;
const struct pvr_cmd_struct(TA_STATE_ISPCTL) *const ispctl =
const struct PVRX(TA_STATE_ISPCTL) *const ispctl =
&ppp_state->isp.control_struct;
struct pvr_device_info *const dev_info =
&cmd_buffer->device->pdevice->dev_info;
@ -3581,7 +3581,7 @@ pvr_setup_isp_depth_bias_scissor_state(struct pvr_cmd_buffer *const cmd_buffer)
static void
pvr_setup_triangle_merging_flag(struct pvr_cmd_buffer *const cmd_buffer,
struct pvr_cmd_struct(TA_STATE_ISPA) * ispa)
struct PVRX(TA_STATE_ISPA) * ispa)
{
struct pvr_emit_state *const emit_state = &cmd_buffer->state.emit_state;
struct pvr_ppp_state *const ppp_state = &cmd_buffer->state.ppp_state;
@ -4063,7 +4063,7 @@ pvr_emit_dirty_ppp_state(struct pvr_cmd_buffer *const cmd_buffer)
}
if (state->dirty.gfx_pipeline_binding) {
struct pvr_cmd_struct(TA_STATE_ISPA) ispa;
struct PVRX(TA_STATE_ISPA) ispa;
pvr_setup_output_select(cmd_buffer);
pvr_setup_isp_faces_and_control(cmd_buffer, &ispa);
@ -4172,7 +4172,7 @@ pvr_emit_dirty_vdm_state(const struct pvr_cmd_buffer *const cmd_buffer)
&cmd_buffer->device->pdevice->dev_info;
ASSERTED const uint32_t max_user_vertex_output_components =
pvr_get_max_user_vertex_output_components(dev_info);
struct pvr_cmd_struct(VDMCTRL_VDM_STATE0)
struct PVRX(VDMCTRL_VDM_STATE0)
header = { pvr_cmd_header(VDMCTRL_VDM_STATE0) };
const struct pvr_cmd_buffer_state *const state = &cmd_buffer->state;
const struct pvr_graphics_pipeline *const gfx_pipeline = state->gfx_pipeline;
@ -4497,7 +4497,7 @@ static void pvr_emit_vdm_index_list(struct pvr_cmd_buffer *cmd_buffer,
{
struct pvr_cmd_buffer_state *state = &cmd_buffer->state;
struct pvr_csb *const csb = &state->current_sub_cmd->gfx.control_stream;
struct pvr_cmd_struct(VDMCTRL_INDEX_LIST0)
struct PVRX(VDMCTRL_INDEX_LIST0)
list_hdr = { pvr_cmd_header(VDMCTRL_INDEX_LIST0) };
pvr_dev_addr_t index_buffer_addr = { 0 };
unsigned int index_stride = 0;

View File

@ -126,7 +126,6 @@ VkResult pvr_csb_emit_return(struct pvr_csb *csb);
VkResult pvr_csb_emit_terminate(struct pvr_csb *csb);
#define PVRX(x) ROGUE_##x
#define pvr_cmd_struct(x) PVRX(x)
#define pvr_cmd_length(x) PVRX(x##_length)
#define pvr_cmd_header(x) PVRX(x##_header)
#define pvr_cmd_pack(x) PVRX(x##_pack)
@ -143,8 +142,8 @@ VkResult pvr_csb_emit_terminate(struct pvr_csb *csb);
* state information before it's packed.
*/
#define pvr_csb_pack(_dst, cmd, name) \
for (struct pvr_cmd_struct(cmd) name = { pvr_cmd_header(cmd) }, \
*_loop_terminate = &name; \
for (struct PVRX(cmd) name = { pvr_cmd_header(cmd) }, \
*_loop_terminate = &name; \
__builtin_expect(_loop_terminate != NULL, 1); \
({ \
STATIC_ASSERT(sizeof(*(_dst)) == pvr_cmd_length(cmd) * 4); \
@ -183,7 +182,7 @@ VkResult pvr_csb_emit_terminate(struct pvr_csb *csb);
* information before it's packed.
*/
#define pvr_csb_emit(csb, cmd, name) \
for (struct pvr_cmd_struct(cmd) \
for (struct PVRX(cmd) \
name = { pvr_cmd_header(cmd) }, \
*_dst = pvr_csb_alloc_dwords(csb, pvr_cmd_length(cmd)); \
__builtin_expect(_dst != NULL, 1); \

View File

@ -644,7 +644,7 @@ struct pvr_ppp_state {
struct {
/* TODO: Can we get rid of the "control" field? */
struct pvr_cmd_struct(TA_STATE_ISPCTL) control_struct;
struct PVRX(TA_STATE_ISPCTL) control_struct;
uint32_t control;
uint32_t front_a;