Mesa (main): pvr: Remove pvr_cmd_struct() macro
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 11 12:04:04 UTC 2022
Module: Mesa
Branch: main
Commit: 4084162ccb0f7330996b00ed1c15f33752f5df23
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4084162ccb0f7330996b00ed1c15f33752f5df23
Author: Matt Coster <matt.coster at imgtec.com>
Date: Wed Jun 29 09:47:33 2022 +0100
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 at imgtec.com>
Reviewed-by: Frank Binns <frank.binns at imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17359>
---
src/imagination/vulkan/pvr_cmd_buffer.c | 16 ++++++++--------
src/imagination/vulkan/pvr_csb.h | 7 +++----
src/imagination/vulkan/pvr_private.h | 2 +-
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c b/src/imagination/vulkan/pvr_cmd_buffer.c
index ee87483a496..470c141fbff 100644
--- a/src/imagination/vulkan/pvr_cmd_buffer.c
+++ b/src/imagination/vulkan/pvr_cmd_buffer.c
@@ -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;
diff --git a/src/imagination/vulkan/pvr_csb.h b/src/imagination/vulkan/pvr_csb.h
index 9023846b128..b500ecdc144 100644
--- a/src/imagination/vulkan/pvr_csb.h
+++ b/src/imagination/vulkan/pvr_csb.h
@@ -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); \
diff --git a/src/imagination/vulkan/pvr_private.h b/src/imagination/vulkan/pvr_private.h
index 6ee6f4be072..264a5ae9c22 100644
--- a/src/imagination/vulkan/pvr_private.h
+++ b/src/imagination/vulkan/pvr_private.h
@@ -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;
More information about the mesa-commit
mailing list