v3dv: don't use typedef enum with broadcom stages

This is the only place on the broadcom stack where we use "typedef
enum", so for consistency let's avoid it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10947>
This commit is contained in:
Alejandro Piñeiro 2021-05-23 23:08:07 +02:00 committed by Marge Bot
parent 55db371223
commit 77edb2d40d
4 changed files with 15 additions and 15 deletions

View file

@ -576,7 +576,7 @@ pipeline_get_descriptor_map(struct v3dv_pipeline *pipeline,
gl_shader_stage gl_stage,
bool is_sampler)
{
broadcom_shader_stage broadcom_stage =
enum broadcom_shader_stage broadcom_stage =
gl_shader_stage_to_broadcom(gl_stage);
assert(pipeline->shared_data &&
@ -1449,7 +1449,7 @@ pipeline_check_spill_size(struct v3dv_pipeline *pipeline)
*/
struct v3dv_shader_variant *
v3dv_shader_variant_create(struct v3dv_device *device,
broadcom_shader_stage stage,
enum broadcom_shader_stage stage,
struct v3d_prog_data *prog_data,
uint32_t prog_data_size,
uint32_t assembly_offset,

View file

@ -492,7 +492,7 @@ shader_variant_create_from_blob(struct v3dv_device *device,
{
VkResult result;
broadcom_shader_stage stage = blob_read_uint32(blob);
enum broadcom_shader_stage stage = blob_read_uint32(blob);
uint32_t prog_data_size = blob_read_uint32(blob);
/* FIXME: as we include the stage perhaps we can avoid prog_data_size? */

View file

@ -285,17 +285,17 @@ struct v3dv_pipeline_cache_stats {
*
* FIXME: perhaps move to common
*/
typedef enum {
enum broadcom_shader_stage {
BROADCOM_SHADER_VERTEX,
BROADCOM_SHADER_VERTEX_BIN,
BROADCOM_SHADER_FRAGMENT,
BROADCOM_SHADER_COMPUTE,
} broadcom_shader_stage;
};
#define BROADCOM_SHADER_STAGES (BROADCOM_SHADER_COMPUTE + 1)
/* Assumes that coordinate shaders will be custom-handled by the caller */
static inline broadcom_shader_stage
static inline enum broadcom_shader_stage
gl_shader_stage_to_broadcom(gl_shader_stage stage)
{
switch (stage) {
@ -311,7 +311,7 @@ gl_shader_stage_to_broadcom(gl_shader_stage stage)
}
static inline gl_shader_stage
broadcom_shader_stage_to_gl(broadcom_shader_stage stage)
broadcom_shader_stage_to_gl(enum broadcom_shader_stage stage)
{
switch (stage) {
case BROADCOM_SHADER_VERTEX:
@ -327,7 +327,7 @@ broadcom_shader_stage_to_gl(broadcom_shader_stage stage)
}
static inline const char *
broadcom_shader_stage_name(broadcom_shader_stage stage)
broadcom_shader_stage_name(enum broadcom_shader_stage stage)
{
switch(stage) {
case BROADCOM_SHADER_VERTEX_BIN:
@ -1386,7 +1386,7 @@ struct v3dv_event {
};
struct v3dv_shader_variant {
broadcom_shader_stage stage;
enum broadcom_shader_stage stage;
union {
struct v3d_prog_data *base;
@ -1425,7 +1425,7 @@ struct v3dv_shader_variant {
struct v3dv_pipeline_stage {
struct v3dv_pipeline *pipeline;
broadcom_shader_stage stage;
enum broadcom_shader_stage stage;
const struct vk_shader_module *module;
const char *entrypoint;
@ -1942,7 +1942,7 @@ v3dv_get_shader_variant(struct v3dv_pipeline_stage *p_stage,
struct v3dv_shader_variant *
v3dv_shader_variant_create(struct v3dv_device *device,
broadcom_shader_stage stage,
enum broadcom_shader_stage stage,
struct v3d_prog_data *prog_data,
uint32_t prog_data_size,
uint32_t assembly_offset,

View file

@ -125,7 +125,7 @@ check_push_constants_ubo(struct v3dv_cmd_buffer *cmd_buffer,
static void
write_tmu_p0(struct v3dv_cmd_buffer *cmd_buffer,
struct v3dv_pipeline *pipeline,
broadcom_shader_stage stage,
enum broadcom_shader_stage stage,
struct v3dv_cl_out **uniforms,
uint32_t data,
struct texture_bo_list *tex_bos,
@ -169,7 +169,7 @@ write_tmu_p0(struct v3dv_cmd_buffer *cmd_buffer,
static void
write_tmu_p1(struct v3dv_cmd_buffer *cmd_buffer,
struct v3dv_pipeline *pipeline,
broadcom_shader_stage stage,
enum broadcom_shader_stage stage,
struct v3dv_cl_out **uniforms,
uint32_t data,
struct state_bo_list *state_bos)
@ -219,7 +219,7 @@ write_tmu_p1(struct v3dv_cmd_buffer *cmd_buffer,
static void
write_ubo_ssbo_uniforms(struct v3dv_cmd_buffer *cmd_buffer,
struct v3dv_pipeline *pipeline,
broadcom_shader_stage stage,
enum broadcom_shader_stage stage,
struct v3dv_cl_out **uniforms,
enum quniform_contents content,
uint32_t data,
@ -348,7 +348,7 @@ get_texture_size_from_buffer_view(struct v3dv_buffer_view *buffer_view,
static uint32_t
get_texture_size(struct v3dv_cmd_buffer *cmd_buffer,
struct v3dv_pipeline *pipeline,
broadcom_shader_stage stage,
enum broadcom_shader_stage stage,
enum quniform_contents contents,
uint32_t data)
{