diff --git a/src/asahi/compiler/agx_compile.h b/src/asahi/compiler/agx_compile.h index 3c67edabdb3..659aee9490b 100644 --- a/src/asahi/compiler/agx_compile.h +++ b/src/asahi/compiler/agx_compile.h @@ -78,7 +78,7 @@ struct agx_rodata { }; struct agx_shader_info { - enum pipe_shader_type stage; + mesa_shader_stage stage; uint32_t binary_size; union agx_varyings varyings; diff --git a/src/asahi/vulkan/hk_cmd_buffer.c b/src/asahi/vulkan/hk_cmd_buffer.c index 3c14113f658..a164c99f4d8 100644 --- a/src/asahi/vulkan/hk_cmd_buffer.c +++ b/src/asahi/vulkan/hk_cmd_buffer.c @@ -666,7 +666,7 @@ hk_upload_usc_words(struct hk_cmd_buffer *cmd, struct hk_shader *s, { struct hk_device *dev = hk_cmd_buffer_device(cmd); - enum pipe_shader_type sw_stage = s->info.stage; + mesa_shader_stage sw_stage = s->info.stage; unsigned constant_push_ranges = DIV_ROUND_UP(s->b.info.rodata.size_16, 64); unsigned push_ranges = 2; diff --git a/src/asahi/vulkan/hk_device.h b/src/asahi/vulkan/hk_device.h index b4ea364fdd6..29ecb74bea4 100644 --- a/src/asahi/vulkan/hk_device.h +++ b/src/asahi/vulkan/hk_device.h @@ -137,7 +137,7 @@ VkResult hk_sampler_heap_add(struct hk_device *dev, void hk_sampler_heap_remove(struct hk_device *dev, struct hk_rc_sampler *rc); static inline struct agx_scratch * -hk_device_scratch_locked(struct hk_device *dev, enum pipe_shader_type stage) +hk_device_scratch_locked(struct hk_device *dev, mesa_shader_stage stage) { simple_mtx_assert_locked(&dev->scratch.lock); @@ -152,7 +152,7 @@ hk_device_scratch_locked(struct hk_device *dev, enum pipe_shader_type stage) } static inline void -hk_device_alloc_scratch(struct hk_device *dev, enum pipe_shader_type stage, +hk_device_alloc_scratch(struct hk_device *dev, mesa_shader_stage stage, unsigned size) { simple_mtx_lock(&dev->scratch.lock); diff --git a/src/compiler/rust/meson.build b/src/compiler/rust/meson.build index 4880872ce22..b1bb5a816f3 100644 --- a/src/compiler/rust/meson.build +++ b/src/compiler/rust/meson.build @@ -29,7 +29,7 @@ _compiler_binding_types = [ 'nir_.*', 'mesa_scope', 'mesa_prim', - 'pipe_shader_type', + 'mesa_shader_stage', 'shader_info', 'tess_primitive_mode', 'u_printf_info', diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index bb9c8180d51..053c6cd9990 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -49,8 +49,7 @@ extern "C" { * The GLSL linker assumes that if ibase.pipe->screen; - enum pipe_shader_type sh; + mesa_shader_stage sh; for (sh = 0; sh < MESA_SHADER_MESH_STAGES; sh++) { switch (sh) { case MESA_SHADER_GEOMETRY: @@ -1366,7 +1366,7 @@ cso_set_vertex_buffers_and_elements(struct cso_context *cso, ALWAYS_INLINE static struct cso_sampler * -set_sampler(struct cso_context_priv *ctx, enum pipe_shader_type shader_stage, +set_sampler(struct cso_context_priv *ctx, mesa_shader_stage shader_stage, unsigned idx, const struct pipe_sampler_state *templ, size_t key_size) { @@ -1399,7 +1399,7 @@ set_sampler(struct cso_context_priv *ctx, enum pipe_shader_type shader_stage, ALWAYS_INLINE static bool -cso_set_sampler(struct cso_context_priv *ctx, enum pipe_shader_type shader_stage, +cso_set_sampler(struct cso_context_priv *ctx, mesa_shader_stage shader_stage, unsigned idx, const struct pipe_sampler_state *templ, size_t size) { @@ -1411,7 +1411,7 @@ cso_set_sampler(struct cso_context_priv *ctx, enum pipe_shader_type shader_stage void -cso_single_sampler(struct cso_context *cso, enum pipe_shader_type shader_stage, +cso_single_sampler(struct cso_context *cso, mesa_shader_stage shader_stage, unsigned idx, const struct pipe_sampler_state *templ) { struct cso_context_priv *ctx = (struct cso_context_priv *)cso; @@ -1437,7 +1437,7 @@ cso_single_sampler(struct cso_context *cso, enum pipe_shader_type shader_stage, */ void cso_single_sampler_done(struct cso_context *cso, - enum pipe_shader_type shader_stage) + mesa_shader_stage shader_stage) { struct cso_context_priv *ctx = (struct cso_context_priv *)cso; struct sampler_info *info = &ctx->samplers[shader_stage]; @@ -1454,7 +1454,7 @@ cso_single_sampler_done(struct cso_context *cso, ALWAYS_INLINE static int set_samplers(struct cso_context_priv *ctx, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned nr, const struct pipe_sampler_state **templates, size_t key_size) @@ -1502,7 +1502,7 @@ set_samplers(struct cso_context_priv *ctx, */ void cso_set_samplers(struct cso_context *cso, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned nr, const struct pipe_sampler_state **templates) { diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h index 24bf4ea1139..515bbcbdcec 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.h +++ b/src/gallium/auxiliary/cso_cache/cso_context.h @@ -72,7 +72,7 @@ cso_set_rasterizer(struct cso_context *cso, void cso_set_samplers(struct cso_context *cso, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned count, const struct pipe_sampler_state **states); @@ -81,12 +81,12 @@ cso_set_samplers(struct cso_context *cso, * samplers one at a time: */ void -cso_single_sampler(struct cso_context *cso, enum pipe_shader_type shader_stage, +cso_single_sampler(struct cso_context *cso, mesa_shader_stage shader_stage, unsigned idx, const struct pipe_sampler_state *states); void cso_single_sampler_done(struct cso_context *cso, - enum pipe_shader_type shader_stage); + mesa_shader_stage shader_stage); void * cso_get_vertex_elements_for_bind(struct cso_context *cso, diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index b3b6c0ef9e1..deeae8e3de1 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -454,7 +454,7 @@ draw_set_mapped_vertex_buffer(struct draw_context *draw, void draw_set_mapped_constant_buffer(struct draw_context *draw, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, unsigned slot, const void *buffer, unsigned size) @@ -473,7 +473,7 @@ draw_set_mapped_constant_buffer(struct draw_context *draw, void draw_set_mapped_shader_buffer(struct draw_context *draw, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, unsigned slot, const void *buffer, unsigned size) @@ -756,7 +756,7 @@ draw_total_tes_outputs(const struct draw_context *draw) */ void draw_texture_sampler(struct draw_context *draw, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct tgsi_sampler *sampler) { switch (shader) { @@ -780,7 +780,7 @@ draw_texture_sampler(struct draw_context *draw, */ void draw_image(struct draw_context *draw, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct tgsi_image *image) { switch (shader) { @@ -804,7 +804,7 @@ draw_image(struct draw_context *draw, */ void draw_buffer(struct draw_context *draw, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct tgsi_buffer *buffer) { switch (shader) { @@ -1051,7 +1051,7 @@ draw_set_mapped_so_targets(struct draw_context *draw, void draw_set_sampler_views(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, struct pipe_sampler_view **views, unsigned num) { @@ -1071,7 +1071,7 @@ draw_set_sampler_views(struct draw_context *draw, void draw_set_samplers(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, struct pipe_sampler_state **samplers, unsigned num) { @@ -1096,7 +1096,7 @@ draw_set_samplers(struct draw_context *draw, void draw_set_images(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, struct pipe_image_view *views, unsigned num) { @@ -1116,7 +1116,7 @@ draw_set_images(struct draw_context *draw, void draw_set_mapped_texture(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned sview_idx, uint32_t width, uint32_t height, uint32_t depth, uint32_t first_level, uint32_t last_level, @@ -1141,7 +1141,7 @@ draw_set_mapped_texture(struct draw_context *draw, void draw_set_mapped_image(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned idx, uint32_t width, uint32_t height, uint32_t depth, const void *base_ptr, diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h index 6475b9881da..95b4c38d575 100644 --- a/src/gallium/auxiliary/draw/draw_context.h +++ b/src/gallium/auxiliary/draw/draw_context.h @@ -191,39 +191,39 @@ draw_total_tes_outputs(const struct draw_context *draw); void draw_texture_sampler(struct draw_context *draw, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, struct tgsi_sampler *sampler); void draw_image(struct draw_context *draw, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, struct tgsi_image *image); void draw_buffer(struct draw_context *draw, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, struct tgsi_buffer *buffer); void draw_set_sampler_views(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, struct pipe_sampler_view **views, unsigned num); void draw_set_samplers(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, struct pipe_sampler_state **samplers, unsigned num); void draw_set_images(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, struct pipe_image_view *images, unsigned num); void draw_set_mapped_texture(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned sview_idx, uint32_t width, uint32_t height, uint32_t depth, uint32_t first_level, uint32_t last_level, @@ -236,7 +236,7 @@ draw_set_mapped_texture(struct draw_context *draw, void draw_set_mapped_image(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned idx, uint32_t width, uint32_t height, uint32_t depth, const void *base_ptr, @@ -340,14 +340,14 @@ void draw_set_mapped_vertex_buffer(struct draw_context *draw, void draw_set_mapped_constant_buffer(struct draw_context *draw, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, unsigned slot, const void *buffer, unsigned size); void draw_set_mapped_shader_buffer(struct draw_context *draw, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, unsigned slot, const void *buffer, unsigned size); diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 772db5c0490..2d0053ab0b9 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -2146,7 +2146,7 @@ draw_llvm_dump_variant_key(struct draw_llvm_variant_key *key) void draw_llvm_set_mapped_texture(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned sview_idx, uint32_t width, uint32_t height, uint32_t depth, uint32_t first_level, uint32_t last_level, @@ -2188,7 +2188,7 @@ draw_llvm_set_mapped_texture(struct draw_context *draw, void draw_llvm_set_mapped_image(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned idx, uint32_t width, uint32_t height, uint32_t depth, const void *base_ptr, @@ -2218,7 +2218,7 @@ draw_llvm_set_mapped_image(struct draw_context *draw, void draw_llvm_set_sampler_state(struct draw_context *draw, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { assert(shader_type < DRAW_MAX_SHADER_STAGE); for (unsigned i = 0; i < draw->num_samplers[shader_type]; i++) { diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h index 7be14520bcc..5d0f01c27a2 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.h +++ b/src/gallium/auxiliary/draw/draw_llvm.h @@ -652,11 +652,11 @@ draw_tes_llvm_dump_variant_key(struct draw_tes_llvm_variant_key *key); void draw_llvm_set_sampler_state(struct draw_context *draw, - enum pipe_shader_type shader_stage); + mesa_shader_stage shader_stage); void draw_llvm_set_mapped_texture(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned sview_idx, uint32_t width, uint32_t height, uint32_t depth, uint32_t first_level, uint32_t last_level, @@ -669,7 +669,7 @@ draw_llvm_set_mapped_texture(struct draw_context *draw, void draw_llvm_set_mapped_image(struct draw_context *draw, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, unsigned idx, uint32_t width, uint32_t height, uint32_t depth, const void *base_ptr, diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index 62634b0ff70..55e83aea490 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -102,11 +102,11 @@ struct pstip_stage void (*driver_delete_fs_state)(struct pipe_context *, void *); void (*driver_bind_sampler_states)(struct pipe_context *, - enum pipe_shader_type, + mesa_shader_stage, unsigned, unsigned, void **); void (*driver_set_sampler_views)(struct pipe_context *, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **); @@ -389,7 +389,7 @@ pstip_delete_fs_state(struct pipe_context *pipe, void *fs) static void pstip_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, void **sampler) { struct pstip_stage *pstip = pstip_stage_from_pipe(pipe); @@ -412,7 +412,7 @@ pstip_bind_sampler_states(struct pipe_context *pipe, static void pstip_set_sampler_views(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c index 46177c23cfb..749890aa0a6 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c @@ -431,7 +431,7 @@ llvm_middle_end_bind_parameters(struct draw_pt_middle_end *middle) struct draw_llvm *llvm = fpme->llvm; unsigned i; - for (enum pipe_shader_type shader_type = MESA_SHADER_VERTEX; shader_type <= MESA_SHADER_GEOMETRY; shader_type++) { + for (mesa_shader_stage shader_type = MESA_SHADER_VERTEX; shader_type <= MESA_SHADER_GEOMETRY; shader_type++) { for (i = 0; i < ARRAY_SIZE(llvm->jit_resources[shader_type].constants); ++i) { /* * There could be a potential issue with rounding this up, as the diff --git a/src/gallium/auxiliary/driver_ddebug/dd_context.c b/src/gallium/auxiliary/driver_ddebug/dd_context.c index 6a5997721f9..00f5dd6b5bc 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_context.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_context.c @@ -215,7 +215,7 @@ DD_CSO_DELETE(sampler) static void dd_context_bind_sampler_states(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, void **states) { struct dd_context *dctx = dd_context(_pipe); @@ -359,7 +359,7 @@ DD_IMM_STATE(polygon_stipple, const struct pipe_poly_stipple, *state, state) static void dd_context_set_constant_buffer(struct pipe_context *_pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *constant_buffer) { @@ -502,7 +502,7 @@ dd_context_stream_output_target_destroy(struct pipe_context *_pipe, static void dd_context_set_sampler_views(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -520,7 +520,7 @@ dd_context_set_sampler_views(struct pipe_context *_pipe, static void dd_context_set_shader_images(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, const struct pipe_image_view *views) @@ -538,7 +538,7 @@ dd_context_set_shader_images(struct pipe_context *_pipe, static void dd_context_set_shader_buffers(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num_buffers, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -818,7 +818,7 @@ dd_context_set_context_param(struct pipe_context *_pipe, static void dd_context_set_inlinable_constants(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint num_values, uint32_t *values) { struct pipe_context *pipe = dd_context(_pipe)->pipe; diff --git a/src/gallium/auxiliary/driver_ddebug/dd_draw.c b/src/gallium/auxiliary/driver_ddebug/dd_draw.c index d09bddbefc3..60c04acdf0d 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_draw.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_draw.c @@ -259,7 +259,7 @@ dd_dump_render_condition(struct dd_draw_state *dstate, FILE *f) } static void -dd_dump_shader(struct dd_draw_state *dstate, enum pipe_shader_type sh, FILE *f) +dd_dump_shader(struct dd_draw_state *dstate, mesa_shader_stage sh, FILE *f) { int i; const char *shader_str[MESA_SHADER_STAGES]; diff --git a/src/gallium/auxiliary/driver_noop/noop_pipe.c b/src/gallium/auxiliary/driver_noop/noop_pipe.c index 48ee16215a6..4845068a67e 100644 --- a/src/gallium/auxiliary/driver_noop/noop_pipe.c +++ b/src/gallium/auxiliary/driver_noop/noop_pipe.c @@ -603,7 +603,7 @@ static void noop_set_max_shader_compiler_threads(struct pipe_screen *screen, static bool noop_is_parallel_shader_compilation_finished(struct pipe_screen *screen, void *shader, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { return true; } diff --git a/src/gallium/auxiliary/driver_noop/noop_state.c b/src/gallium/auxiliary/driver_noop/noop_state.c index 0498219301d..23b8f6ace29 100644 --- a/src/gallium/auxiliary/driver_noop/noop_state.c +++ b/src/gallium/auxiliary/driver_noop/noop_state.c @@ -100,7 +100,7 @@ static struct pipe_sampler_view *noop_create_sampler_view(struct pipe_context *c } static void noop_set_sampler_views(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -108,7 +108,7 @@ static void noop_set_sampler_views(struct pipe_context *ctx, } static void noop_bind_sampler_states(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, void **states) { @@ -153,7 +153,7 @@ static void noop_set_framebuffer_state(struct pipe_context *ctx, } static void noop_set_constant_buffer(struct pipe_context *ctx, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -164,7 +164,7 @@ static void noop_set_constant_buffer(struct pipe_context *ctx, } static void noop_set_inlinable_constants(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint num_values, uint32_t *values) { } @@ -257,7 +257,7 @@ static void noop_set_window_rectangles(struct pipe_context *ctx, } static void noop_set_shader_buffers(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -265,7 +265,7 @@ static void noop_set_shader_buffers(struct pipe_context *ctx, } static void noop_set_shader_images(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) diff --git a/src/gallium/auxiliary/driver_trace/tr_context.c b/src/gallium/auxiliary/driver_trace/tr_context.c index 51e5bf6998f..db20115e592 100644 --- a/src/gallium/auxiliary/driver_trace/tr_context.c +++ b/src/gallium/auxiliary/driver_trace/tr_context.c @@ -480,7 +480,7 @@ trace_context_create_sampler_state(struct pipe_context *_pipe, static void trace_context_bind_sampler_states(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num_states, void **states) @@ -499,7 +499,7 @@ trace_context_bind_sampler_states(struct pipe_context *_pipe, trace_dump_call_begin("pipe_context", "bind_sampler_states"); trace_dump_arg(ptr, pipe); - trace_dump_arg_enum(pipe_shader_type, shader); + trace_dump_arg_enum(mesa_shader_stage, shader); trace_dump_arg(uint, start); if (!found) num_states = 1; @@ -941,7 +941,7 @@ trace_context_set_sample_mask(struct pipe_context *_pipe, static void trace_context_set_constant_buffer(struct pipe_context *_pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *constant_buffer) { @@ -951,7 +951,7 @@ trace_context_set_constant_buffer(struct pipe_context *_pipe, trace_dump_call_begin("pipe_context", "set_constant_buffer"); trace_dump_arg(ptr, pipe); - trace_dump_arg_enum(pipe_shader_type, shader); + trace_dump_arg_enum(mesa_shader_stage, shader); trace_dump_arg(uint, index); trace_dump_arg(bool, take_ownership); trace_dump_arg(constant_buffer, constant_buffer); @@ -978,7 +978,7 @@ trace_context_set_framebuffer_state(struct pipe_context *_pipe, } static void -trace_context_set_inlinable_constants(struct pipe_context *_pipe, enum pipe_shader_type shader, +trace_context_set_inlinable_constants(struct pipe_context *_pipe, mesa_shader_stage shader, uint num_values, uint32_t *values) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -987,7 +987,7 @@ trace_context_set_inlinable_constants(struct pipe_context *_pipe, enum pipe_shad trace_dump_call_begin("pipe_context", "set_inlinable_constants"); trace_dump_arg(ptr, pipe); - trace_dump_arg_enum(pipe_shader_type, shader); + trace_dump_arg_enum(mesa_shader_stage, shader); trace_dump_arg(uint, num_values); trace_dump_arg_array(uint, values, num_values); @@ -1158,7 +1158,7 @@ trace_context_sampler_view_release(struct pipe_context *_pipe, static void trace_context_set_sampler_views(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, @@ -1187,7 +1187,7 @@ trace_context_set_sampler_views(struct pipe_context *_pipe, trace_dump_call_begin("pipe_context", "set_sampler_views"); trace_dump_arg(ptr, pipe); - trace_dump_arg_enum(pipe_shader_type, shader); + trace_dump_arg_enum(mesa_shader_stage, shader); if (!found) start = 0; trace_dump_arg(uint, start); @@ -2185,7 +2185,7 @@ trace_context_set_patch_vertices(struct pipe_context *_context, } static void trace_context_set_shader_buffers(struct pipe_context *_context, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -2220,7 +2220,7 @@ static void trace_context_set_shader_buffers(struct pipe_context *_context, } static void trace_context_set_shader_images(struct pipe_context *_context, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.h b/src/gallium/auxiliary/driver_trace/tr_screen.h index 6faba08cc55..3d90c8269cc 100644 --- a/src/gallium/auxiliary/driver_trace/tr_screen.h +++ b/src/gallium/auxiliary/driver_trace/tr_screen.h @@ -46,7 +46,7 @@ extern "C" { #define TRACE_FLAG_USER_BUFFER (1 << 31) static inline const char * -tr_util_pipe_shader_type_name(mesa_shader_stage stage) +tr_util_mesa_shader_stage_name(mesa_shader_stage stage) { return gl_shader_stage_name(stage); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 9acf51a1fb8..eaaa1e1e242 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1208,7 +1208,7 @@ tgsi_exec_machine_bind_shader( struct tgsi_exec_machine * -tgsi_exec_machine_create(enum pipe_shader_type shader_type) +tgsi_exec_machine_create(mesa_shader_stage shader_type) { struct tgsi_exec_machine *mach; diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index 55d349e15ce..6e08cf9a384 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -322,7 +322,7 @@ struct tgsi_exec_machine unsigned ConstsSize[PIPE_MAX_CONSTANT_BUFFERS]; const struct tgsi_token *Tokens; /**< Declarations, instructions */ - enum pipe_shader_type ShaderType; /**< PIPE_SHADER_x */ + mesa_shader_stage ShaderType; /**< PIPE_SHADER_x */ /* GEOMETRY processor only. */ /* Number of vertices emitted per emitted primitive. */ @@ -408,7 +408,7 @@ struct tgsi_exec_machine }; struct tgsi_exec_machine * -tgsi_exec_machine_create(enum pipe_shader_type shader_type); +tgsi_exec_machine_create(mesa_shader_stage shader_type); void tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach); diff --git a/src/gallium/auxiliary/tgsi/tgsi_from_mesa.h b/src/gallium/auxiliary/tgsi/tgsi_from_mesa.h index abdb6c54358..abb3560aa0e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_from_mesa.h +++ b/src/gallium/auxiliary/tgsi/tgsi_from_mesa.h @@ -58,16 +58,16 @@ tgsi_get_sysval_semantic(unsigned sysval); enum tgsi_interpolate_mode tgsi_get_interp_mode(enum glsl_interp_mode mode, bool color); -static inline enum pipe_shader_type +static inline mesa_shader_stage pipe_shader_type_from_mesa(mesa_shader_stage stage) { - STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_VERTEX == MESA_SHADER_VERTEX); - STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_FRAGMENT == MESA_SHADER_FRAGMENT); - STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_TESS_CTRL == MESA_SHADER_TESS_CTRL); - STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_TESS_EVAL == MESA_SHADER_TESS_EVAL); - STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_GEOMETRY == MESA_SHADER_GEOMETRY); - STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_COMPUTE == MESA_SHADER_COMPUTE); - return (enum pipe_shader_type)stage; + STATIC_ASSERT((mesa_shader_stage) MESA_SHADER_VERTEX == MESA_SHADER_VERTEX); + STATIC_ASSERT((mesa_shader_stage) MESA_SHADER_FRAGMENT == MESA_SHADER_FRAGMENT); + STATIC_ASSERT((mesa_shader_stage) MESA_SHADER_TESS_CTRL == MESA_SHADER_TESS_CTRL); + STATIC_ASSERT((mesa_shader_stage) MESA_SHADER_TESS_EVAL == MESA_SHADER_TESS_EVAL); + STATIC_ASSERT((mesa_shader_stage) MESA_SHADER_GEOMETRY == MESA_SHADER_GEOMETRY); + STATIC_ASSERT((mesa_shader_stage) MESA_SHADER_COMPUTE == MESA_SHADER_COMPUTE); + return (mesa_shader_stage)stage; } static inline mesa_shader_stage diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index c6126430d85..19ff91acbd4 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -330,7 +330,7 @@ static void report_error( struct translate_ctx *ctx, const char *msg ) */ static bool parse_header( struct translate_ctx *ctx ) { - enum pipe_shader_type processor; + mesa_shader_stage processor; if (str_match_nocase_whole( &ctx->cur, "FRAG" )) processor = MESA_SHADER_FRAGMENT; diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h index 2d8c5953db9..11ce467860a 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_transform.h +++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h @@ -69,7 +69,7 @@ struct tgsi_transform_context */ void (*epilog)(struct tgsi_transform_context *ctx); - enum pipe_shader_type processor; + mesa_shader_stage processor; /*** PRIVATE ***/ diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 00f522a7366..1b90aeadf66 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -111,7 +111,7 @@ struct hw_atomic_decl { struct ureg_program { - enum pipe_shader_type processor; + mesa_shader_stage processor; bool supports_any_inout_decl_range; int next_shader_processor; @@ -2226,14 +2226,14 @@ void ureg_free_tokens( const struct tgsi_token *tokens ) struct ureg_program * -ureg_create(enum pipe_shader_type processor) +ureg_create(mesa_shader_stage processor) { return ureg_create_with_screen(processor, NULL); } struct ureg_program * -ureg_create_with_screen(enum pipe_shader_type processor, +ureg_create_with_screen(mesa_shader_stage processor, struct pipe_screen *screen) { unsigned i; diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index 76efe956fcd..cda731414ba 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h @@ -97,10 +97,10 @@ struct ureg_dst struct pipe_context; struct ureg_program * -ureg_create(enum pipe_shader_type processor); +ureg_create(mesa_shader_stage processor); struct ureg_program * -ureg_create_with_screen(enum pipe_shader_type processor, +ureg_create_with_screen(mesa_shader_stage processor, struct pipe_screen *screen); const struct tgsi_token * diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 7f8b437d70e..42f820f57b1 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -676,7 +676,7 @@ pipe_texture_unmap(struct pipe_context *context, static inline void pipe_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, struct pipe_resource *buf) { if (buf) { diff --git a/src/gallium/auxiliary/util/u_live_shader_cache.c b/src/gallium/auxiliary/util/u_live_shader_cache.c index f4d6ddb48c6..fd1ea8e27e3 100644 --- a/src/gallium/auxiliary/util/u_live_shader_cache.c +++ b/src/gallium/auxiliary/util/u_live_shader_cache.c @@ -78,7 +78,7 @@ util_live_shader_cache_get(struct pipe_context *ctx, struct blob blob = {0}; unsigned ir_size; const void *ir_binary; - enum pipe_shader_type stage; + mesa_shader_stage stage; /* Get the shader binary and shader stage. */ if (state->type == PIPE_SHADER_IR_TGSI) { diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index e8ed1950366..0b9ccfc7589 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -848,7 +848,7 @@ tc_rebind_bindings(uint32_t old_id, uint32_t new_id, uint32_t *bindings, static void tc_add_shader_bindings_to_buffer_list(struct threaded_context *tc, BITSET_WORD *buffer_list, - enum pipe_shader_type shader) + mesa_shader_stage shader) { tc_add_bindings_to_buffer_list(buffer_list, tc->const_buffers[shader], tc->max_const_buffers); @@ -868,7 +868,7 @@ tc_add_shader_bindings_to_buffer_list(struct threaded_context *tc, static unsigned tc_rebind_shader_bindings(struct threaded_context *tc, uint32_t old_id, - uint32_t new_id, enum pipe_shader_type shader, uint32_t *rebind_mask) + uint32_t new_id, mesa_shader_stage shader, uint32_t *rebind_mask) { unsigned ubo = 0, ssbo = 0, img = 0, sampler = 0; @@ -983,7 +983,7 @@ tc_is_buffer_bound_with_mask(uint32_t id, uint32_t *bindings, unsigned binding_m static bool tc_is_buffer_shader_bound_for_write(struct threaded_context *tc, uint32_t id, - enum pipe_shader_type shader) + mesa_shader_stage shader) { if (tc->seen_shader_buffers[shader] && tc_is_buffer_bound_with_mask(id, tc->shader_buffers[shader], @@ -1441,7 +1441,7 @@ tc_call_bind_sampler_states(struct pipe_context *pipe, void *call) static void tc_bind_sampler_states(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, void **states) { if (!count) @@ -1646,7 +1646,7 @@ tc_call_set_constant_buffer(struct pipe_context *pipe, void *call) static void tc_set_constant_buffer(struct pipe_context *_pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -1720,7 +1720,7 @@ tc_call_set_inlinable_constants(struct pipe_context *pipe, void *call) static void tc_set_inlinable_constants(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint num_values, uint32_t *values) { struct threaded_context *tc = threaded_context(_pipe); @@ -1868,7 +1868,7 @@ tc_call_set_sampler_views(struct pipe_context *pipe, void *call) static void tc_set_sampler_views(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -1973,7 +1973,7 @@ tc_call_set_shader_images(struct pipe_context *pipe, void *call) static void tc_set_shader_images(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) @@ -2068,7 +2068,7 @@ tc_call_set_shader_buffers(struct pipe_context *pipe, void *call) static void tc_set_shader_buffers(struct pipe_context *_pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) diff --git a/src/gallium/drivers/asahi/agx_nir_lower_sysvals.c b/src/gallium/drivers/asahi/agx_nir_lower_sysvals.c index 431bcded6f0..f21f44da6b5 100644 --- a/src/gallium/drivers/asahi/agx_nir_lower_sysvals.c +++ b/src/gallium/drivers/asahi/agx_nir_lower_sysvals.c @@ -487,13 +487,13 @@ lay_out_uniforms(struct agx_compiled_shader *shader, struct state *state) } bool -agx_nir_lower_sysvals(nir_shader *shader, enum pipe_shader_type desc_stage, +agx_nir_lower_sysvals(nir_shader *shader, mesa_shader_stage desc_stage, bool lower_draw_params) { /* override stage for the duration on the pass. XXX: should refactor, but * it's annoying! */ - enum pipe_shader_type phys_stage = shader->info.stage; + mesa_shader_stage phys_stage = shader->info.stage; shader->info.stage = desc_stage; bool progress = nir_shader_instructions_pass( diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index bdc663f2552..09b185bd82f 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -81,7 +81,7 @@ agx_legalize_compression(struct agx_context *ctx, struct agx_resource *rsrc, } static void -agx_set_shader_images(struct pipe_context *pctx, enum pipe_shader_type shader, +agx_set_shader_images(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *iviews) @@ -154,7 +154,7 @@ agx_set_shader_images(struct pipe_context *pctx, enum pipe_shader_type shader, } static void -agx_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader, +agx_set_shader_buffers(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -569,7 +569,7 @@ agx_delete_sampler_state(struct pipe_context *ctx, void *state) } static void -agx_bind_sampler_states(struct pipe_context *pctx, enum pipe_shader_type shader, +agx_bind_sampler_states(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned count, void **states) { struct agx_context *ctx = agx_context(pctx); @@ -811,7 +811,7 @@ agx_create_sampler_view(struct pipe_context *pctx, } static void -agx_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader, +agx_set_sampler_views(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -1298,7 +1298,7 @@ agx_batch_upload_pbe(struct agx_batch *batch, struct agx_pbe_packed *out, */ static void -agx_set_constant_buffer(struct pipe_context *pctx, enum pipe_shader_type shader, +agx_set_constant_buffer(struct pipe_context *pctx, mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -1472,7 +1472,7 @@ agx_nir_lower_point_sprite_zw(nir_builder *b, nir_intrinsic_instr *intr, */ static struct agx_compiled_shader * agx_compile_nir(struct agx_device *dev, nir_shader *nir, - struct util_debug_callback *debug, enum pipe_shader_type stage, + struct util_debug_callback *debug, mesa_shader_stage stage, bool internal_kernel, bool terminal, bool secondary, unsigned cf_base, BITSET_WORD *attrib_components_read) { @@ -2034,7 +2034,7 @@ agx_get_compute_state_info(struct pipe_context *pctx, void *cso, /* Does not take ownership of key. Clones if necessary. */ static bool agx_update_shader(struct agx_context *ctx, struct agx_compiled_shader **out, - enum pipe_shader_type stage, union asahi_shader_key *key) + mesa_shader_stage stage, union asahi_shader_key *key) { struct agx_uncompiled_shader *so = ctx->stage[stage].shader; assert(so != NULL); @@ -2392,7 +2392,7 @@ agx_update_fs(struct agx_batch *batch) static void agx_bind_shader_state(struct pipe_context *pctx, void *cso, - enum pipe_shader_type stage) + mesa_shader_stage stage) { struct agx_context *ctx = agx_context(pctx); @@ -2632,7 +2632,7 @@ agx_build_meta_shader(struct agx_context *ctx, meta_shader_builder_t builder, } static unsigned -sampler_count(struct agx_context *ctx, enum pipe_shader_type stage) +sampler_count(struct agx_context *ctx, mesa_shader_stage stage) { /* We reserve sampler #0 for txf so add 1 to the API count */ return ctx->stage[stage].sampler_count + 1; @@ -2640,7 +2640,7 @@ sampler_count(struct agx_context *ctx, enum pipe_shader_type stage) static inline enum agx_sampler_states translate_sampler_state_count(struct agx_context *ctx, - enum pipe_shader_type stage) + mesa_shader_stage stage) { /* Clamp to binding table maximum, anything larger will be bindless */ return agx_translate_sampler_state_count(MIN2(sampler_count(ctx, stage), 16), @@ -2700,7 +2700,7 @@ agx_upload_spilled_rt_descriptors(struct agx_texture_packed *out, static void agx_upload_textures(struct agx_batch *batch, struct agx_compiled_shader *cs, - enum pipe_shader_type stage) + mesa_shader_stage stage) { struct agx_context *ctx = batch->ctx; @@ -2815,7 +2815,7 @@ agx_sampler_heap_add(struct agx_device *dev, struct agx_sampler_heap *heap, static void agx_upload_samplers(struct agx_batch *batch, struct agx_compiled_shader *cs, - enum pipe_shader_type stage) + mesa_shader_stage stage) { struct agx_context *ctx = batch->ctx; @@ -2866,7 +2866,7 @@ agx_update_descriptors(struct agx_batch *batch, struct agx_compiled_shader *cs) if (!cs) return; - enum pipe_shader_type stage = cs->stage; + mesa_shader_stage stage = cs->stage; if (!ctx->stage[stage].dirty) return; @@ -2894,7 +2894,7 @@ agx_update_descriptors(struct agx_batch *batch, struct agx_compiled_shader *cs) static uint32_t agx_build_pipeline(struct agx_batch *batch, struct agx_compiled_shader *cs, struct agx_linked_shader *linked, - enum pipe_shader_type phys_stage, + mesa_shader_stage phys_stage, unsigned variable_shared_mem, size_t max_subgroups) { struct agx_context *ctx = batch->ctx; @@ -2909,7 +2909,7 @@ agx_build_pipeline(struct agx_batch *batch, struct agx_compiled_shader *cs, struct agx_usc_builder b = agx_usc_builder(t.cpu, usc_size); - enum pipe_shader_type stage = cs->stage; + mesa_shader_stage stage = cs->stage; if (batch->texture_count[stage]) { agx_usc_pack(&b, TEXTURE, cfg) { @@ -3020,7 +3020,7 @@ static void agx_launch_internal(struct agx_batch *batch, struct agx_grid grid, struct agx_workgroup wg, struct agx_cdm_launch_word_0_packed launch, - enum pipe_shader_type stage, uint32_t usc) + mesa_shader_stage stage, uint32_t usc) { struct agx_context *ctx = batch->ctx; struct agx_device *dev = agx_device(ctx->base.screen); @@ -4383,7 +4383,7 @@ agx_apply_passthrough_gs(struct agx_context *ctx, const struct pipe_draw_start_count_bias *draws, unsigned num_draws, bool xfb_passthrough) { - enum pipe_shader_type prev_stage = ctx->stage[MESA_SHADER_TESS_EVAL].shader + mesa_shader_stage prev_stage = ctx->stage[MESA_SHADER_TESS_EVAL].shader ? MESA_SHADER_TESS_EVAL : MESA_SHADER_VERTEX; struct agx_uncompiled_shader *prev_cso = ctx->stage[prev_stage].shader; @@ -5304,7 +5304,7 @@ agx_texture_barrier(struct pipe_context *pipe, unsigned flags) void agx_launch(struct agx_batch *batch, struct agx_grid grid, struct agx_workgroup wg, struct agx_compiled_shader *cs, - struct agx_linked_shader *linked, enum pipe_shader_type stage, + struct agx_linked_shader *linked, mesa_shader_stage stage, unsigned variable_shared_mem) { struct agx_context *ctx = batch->ctx; diff --git a/src/gallium/drivers/asahi/agx_state.h b/src/gallium/drivers/asahi/agx_state.h index 7e9e7081ccd..4972513e8bd 100644 --- a/src/gallium/drivers/asahi/agx_state.h +++ b/src/gallium/drivers/asahi/agx_state.h @@ -254,7 +254,7 @@ struct agx_compiled_shader { * physical shader stage of the compiled shader, for example when executing a * tessellation eval shader as a vertex shader. */ - enum pipe_shader_type stage; + mesa_shader_stage stage; }; struct agx_fast_link_key { @@ -274,7 +274,7 @@ struct agx_fast_link_key { struct agx_uncompiled_shader { struct pipe_shader_state base; - enum pipe_shader_type type; + mesa_shader_stage type; struct blob early_serialized_nir; struct blob serialized_nir; uint8_t nir_sha1[20]; @@ -782,7 +782,7 @@ struct agx_compiled_shader *agx_build_meta_shader(struct agx_context *ctx, void agx_launch(struct agx_batch *batch, struct agx_grid grid, struct agx_workgroup wg, struct agx_compiled_shader *cs, - struct agx_linked_shader *linked, enum pipe_shader_type stage, + struct agx_linked_shader *linked, mesa_shader_stage stage, unsigned variable_shared_mem); void agx_launch_precomp(struct agx_batch *batch, struct agx_grid grid, @@ -1003,17 +1003,17 @@ void agx_upload_vbos(struct agx_batch *batch); void agx_upload_uniforms(struct agx_batch *batch); void agx_set_sampler_uniforms(struct agx_batch *batch, - enum pipe_shader_type stage); + mesa_shader_stage stage); void agx_set_cbuf_uniforms(struct agx_batch *batch, - enum pipe_shader_type stage); + mesa_shader_stage stage); void agx_set_ssbo_uniforms(struct agx_batch *batch, - enum pipe_shader_type stage); + mesa_shader_stage stage); bool agx_nir_lower_point_size(nir_shader *nir, bool insert_write); -bool agx_nir_lower_sysvals(nir_shader *shader, enum pipe_shader_type desc_stage, +bool agx_nir_lower_sysvals(nir_shader *shader, mesa_shader_stage desc_stage, bool lower_draw_params); bool agx_nir_layout_uniforms(nir_shader *shader, diff --git a/src/gallium/drivers/asahi/agx_uniforms.c b/src/gallium/drivers/asahi/agx_uniforms.c index bbe9a0571a0..2f79d45d7d6 100644 --- a/src/gallium/drivers/asahi/agx_uniforms.c +++ b/src/gallium/drivers/asahi/agx_uniforms.c @@ -83,7 +83,7 @@ agx_upload_uniforms(struct agx_batch *batch) } void -agx_set_sampler_uniforms(struct agx_batch *batch, enum pipe_shader_type stage) +agx_set_sampler_uniforms(struct agx_batch *batch, mesa_shader_stage stage) { struct agx_context *ctx = batch->ctx; struct agx_stage *st = &ctx->stage[stage]; @@ -106,7 +106,7 @@ agx_set_sampler_uniforms(struct agx_batch *batch, enum pipe_shader_type stage) } void -agx_set_cbuf_uniforms(struct agx_batch *batch, enum pipe_shader_type stage) +agx_set_cbuf_uniforms(struct agx_batch *batch, mesa_shader_stage stage) { struct agx_stage *st = &batch->ctx->stage[stage]; struct agx_stage_uniforms *unif = &batch->stage_uniforms[stage]; @@ -118,7 +118,7 @@ agx_set_cbuf_uniforms(struct agx_batch *batch, enum pipe_shader_type stage) } void -agx_set_ssbo_uniforms(struct agx_batch *batch, enum pipe_shader_type stage) +agx_set_ssbo_uniforms(struct agx_batch *batch, mesa_shader_stage stage) { struct agx_stage *st = &batch->ctx->stage[stage]; struct agx_stage_uniforms *unif = &batch->stage_uniforms[stage]; diff --git a/src/gallium/drivers/crocus/crocus_pipe.h b/src/gallium/drivers/crocus/crocus_pipe.h index 4b4f7f11375..f1bd5b320c7 100644 --- a/src/gallium/drivers/crocus/crocus_pipe.h +++ b/src/gallium/drivers/crocus/crocus_pipe.h @@ -27,15 +27,15 @@ #include "compiler/shader_enums.h" static inline mesa_shader_stage -stage_from_pipe(enum pipe_shader_type pstage) +stage_from_pipe(mesa_shader_stage pstage) { return (mesa_shader_stage)pstage; } -static inline enum pipe_shader_type +static inline mesa_shader_stage stage_to_pipe(mesa_shader_stage stage) { - return (enum pipe_shader_type)stage; + return (mesa_shader_stage)stage; } /** diff --git a/src/gallium/drivers/crocus/crocus_state.c b/src/gallium/drivers/crocus/crocus_state.c index c7b5ebbed9f..a74a345ab5c 100644 --- a/src/gallium/drivers/crocus/crocus_state.c +++ b/src/gallium/drivers/crocus/crocus_state.c @@ -2297,7 +2297,7 @@ crocus_create_sampler_state(struct pipe_context *ctx, */ static void crocus_bind_sampler_states(struct pipe_context *ctx, - enum pipe_shader_type p_stage, + mesa_shader_stage p_stage, unsigned start, unsigned count, void **states) { @@ -3031,7 +3031,7 @@ fill_buffer_image_param(struct isl_image_param *param, */ static void crocus_set_shader_images(struct pipe_context *ctx, - enum pipe_shader_type p_stage, + mesa_shader_stage p_stage, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *p_images) @@ -3129,7 +3129,7 @@ crocus_set_shader_images(struct pipe_context *ctx, */ static void crocus_set_sampler_views(struct pipe_context *ctx, - enum pipe_shader_type p_stage, + mesa_shader_stage p_stage, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -3504,7 +3504,7 @@ crocus_set_framebuffer_state(struct pipe_context *ctx, */ static void crocus_set_constant_buffer(struct pipe_context *ctx, - enum pipe_shader_type p_stage, unsigned index, + mesa_shader_stage p_stage, unsigned index, bool take_ownership, const struct pipe_constant_buffer *input) { @@ -3632,7 +3632,7 @@ upload_sysvals(struct crocus_context *ice, */ static void crocus_set_shader_buffers(struct pipe_context *ctx, - enum pipe_shader_type p_stage, + mesa_shader_stage p_stage, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -8393,7 +8393,7 @@ crocus_rebind_buffer(struct crocus_context *ice, for (int s = MESA_SHADER_VERTEX; s < MESA_SHADER_STAGES; s++) { struct crocus_shader_state *shs = &ice->state.shaders[s]; - enum pipe_shader_type p_stage = stage_to_pipe(s); + mesa_shader_stage p_stage = stage_to_pipe(s); if (!(res->bind_stages & (1 << s))) continue; diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp index 7cfdaca5b2f..a3c86abefb5 100644 --- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp +++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp @@ -836,7 +836,7 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx, d3d12_shader_key *key, d3d12_shader_selector *sel, d3d12_shader_selector *prev, d3d12_shader_selector *next) { - pipe_shader_type stage = sel->stage; + mesa_shader_stage stage = sel->stage; memset(key, 0, offsetof(d3d12_shader_key, vs)); key->stage = stage; @@ -1197,7 +1197,7 @@ select_shader_variant(struct d3d12_selection_context *sel_ctx, d3d12_shader_sele } static d3d12_shader_selector * -get_prev_shader(struct d3d12_context *ctx, pipe_shader_type current) +get_prev_shader(struct d3d12_context *ctx, mesa_shader_stage current) { switch (current) { case MESA_SHADER_VERTEX: @@ -1222,7 +1222,7 @@ get_prev_shader(struct d3d12_context *ctx, pipe_shader_type current) } static d3d12_shader_selector * -get_next_shader(struct d3d12_context *ctx, pipe_shader_type current) +get_next_shader(struct d3d12_context *ctx, mesa_shader_stage current) { switch (current) { case MESA_SHADER_VERTEX: @@ -1388,7 +1388,7 @@ d3d12_create_shader_impl(struct d3d12_context *ctx, struct d3d12_shader_selector * d3d12_create_shader(struct d3d12_context *ctx, - pipe_shader_type stage, + mesa_shader_stage stage, const struct pipe_shader_state *shader) { struct d3d12_shader_selector *sel = rzalloc(nullptr, d3d12_shader_selector); diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.h b/src/gallium/drivers/d3d12/d3d12_compiler.h index 6ca28ff5ffe..4a73c35e29d 100644 --- a/src/gallium/drivers/d3d12/d3d12_compiler.h +++ b/src/gallium/drivers/d3d12/d3d12_compiler.h @@ -99,7 +99,7 @@ struct d3d12_image_format_conversion_info_arr { struct d3d12_shader_key { uint32_t hash; - enum pipe_shader_type stage; + mesa_shader_stage stage; uint64_t next_varying_inputs; uint64_t prev_varying_outputs; @@ -252,7 +252,7 @@ struct d3d12_tcs_variant_key }; struct d3d12_shader_selector { - enum pipe_shader_type stage; + mesa_shader_stage stage; const nir_shader *initial; struct d3d12_varying_info *initial_output_vars; struct d3d12_varying_info *initial_input_vars; @@ -280,7 +280,7 @@ struct d3d12_shader_selector { struct d3d12_shader_selector * d3d12_create_shader(struct d3d12_context *ctx, - enum pipe_shader_type stage, + mesa_shader_stage stage, const struct pipe_shader_state *shader); struct d3d12_shader_selector * diff --git a/src/gallium/drivers/d3d12/d3d12_context_graphics.cpp b/src/gallium/drivers/d3d12/d3d12_context_graphics.cpp index 6beea012606..5334ca3d62d 100644 --- a/src/gallium/drivers/d3d12/d3d12_context_graphics.cpp +++ b/src/gallium/drivers/d3d12/d3d12_context_graphics.cpp @@ -694,7 +694,7 @@ pipe_to_dxil_tex_wrap(enum pipe_tex_wrap wrap) static void d3d12_bind_sampler_states(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned num_samplers, void **samplers) @@ -953,7 +953,7 @@ d3d12_create_sampler_view(struct pipe_context *pctx, static void d3d12_increment_sampler_view_bind_count(struct pipe_context *ctx, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, struct pipe_sampler_view *view) { struct d3d12_resource *res = d3d12_resource(view->texture); if (res) @@ -962,7 +962,7 @@ d3d12_increment_sampler_view_bind_count(struct pipe_context *ctx, static void d3d12_decrement_sampler_view_bind_count(struct pipe_context *ctx, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, struct pipe_sampler_view *view) { struct d3d12_resource *res = d3d12_resource(view->texture); if (res) { @@ -973,7 +973,7 @@ d3d12_decrement_sampler_view_bind_count(struct pipe_context *ctx, static void d3d12_set_sampler_views(struct pipe_context *pctx, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, unsigned start_slot, unsigned num_views, unsigned unbind_num_trailing_slots, @@ -1044,7 +1044,7 @@ d3d12_destroy_sampler_view(struct pipe_context *pctx, } static void -delete_shader(struct d3d12_context *ctx, enum pipe_shader_type stage, +delete_shader(struct d3d12_context *ctx, mesa_shader_stage stage, struct d3d12_shader_selector *shader) { d3d12_gfx_pipeline_state_cache_invalidate_shader(ctx, stage, shader); @@ -1063,7 +1063,7 @@ delete_shader(struct d3d12_context *ctx, enum pipe_shader_type stage, } static void -bind_stage(struct d3d12_context *ctx, enum pipe_shader_type stage, +bind_stage(struct d3d12_context *ctx, mesa_shader_stage stage, struct d3d12_shader_selector *shader) { assert(stage < D3D12_GFX_SHADER_STAGES); @@ -1351,7 +1351,7 @@ d3d12_set_scissor_states(struct pipe_context *pctx, static void d3d12_decrement_constant_buffer_bind_count(struct d3d12_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct d3d12_resource *res) { assert(res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_CBV] > 0); res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_CBV]--; @@ -1359,14 +1359,14 @@ d3d12_decrement_constant_buffer_bind_count(struct d3d12_context *ctx, static void d3d12_increment_constant_buffer_bind_count(struct d3d12_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct d3d12_resource *res) { res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_CBV]++; } static void d3d12_set_constant_buffer(struct pipe_context *pctx, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *buf) { @@ -1583,7 +1583,7 @@ d3d12_set_stream_output_targets(struct pipe_context *pctx, static void d3d12_decrement_ssbo_bind_count(struct d3d12_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct d3d12_resource *res) { assert(res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_SSBO] > 0); res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_SSBO]--; @@ -1591,14 +1591,14 @@ d3d12_decrement_ssbo_bind_count(struct d3d12_context *ctx, static void d3d12_increment_ssbo_bind_count(struct d3d12_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct d3d12_resource *res) { res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_SSBO]++; } static void d3d12_set_shader_buffers(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -1638,7 +1638,7 @@ d3d12_set_shader_buffers(struct pipe_context *pctx, static void d3d12_decrement_image_bind_count(struct d3d12_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct d3d12_resource *res) { assert(res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_IMAGE] > 0); res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_IMAGE]--; @@ -1646,7 +1646,7 @@ d3d12_decrement_image_bind_count(struct d3d12_context *ctx, static void d3d12_increment_image_bind_count(struct d3d12_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, struct d3d12_resource *res) { res->bind_counts[shader][D3D12_RESOURCE_BINDING_TYPE_IMAGE]++; } @@ -1694,7 +1694,7 @@ get_shader_image_emulation_format(enum pipe_format resource_format) static void d3d12_set_shader_images(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) diff --git a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp index d7be04ed5bf..5cc61158e60 100644 --- a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp +++ b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp @@ -494,7 +494,7 @@ d3d12_gfx_pipeline_state_cache_invalidate(struct d3d12_context *ctx, const void void d3d12_gfx_pipeline_state_cache_invalidate_shader(struct d3d12_context *ctx, - enum pipe_shader_type stage, + mesa_shader_stage stage, struct d3d12_shader_selector *selector) { struct d3d12_shader *shader = selector->first; diff --git a/src/gallium/drivers/d3d12/d3d12_pipeline_state.h b/src/gallium/drivers/d3d12/d3d12_pipeline_state.h index f4cff607cc2..c6ee1e19aac 100644 --- a/src/gallium/drivers/d3d12/d3d12_pipeline_state.h +++ b/src/gallium/drivers/d3d12/d3d12_pipeline_state.h @@ -107,7 +107,7 @@ d3d12_gfx_pipeline_state_cache_invalidate(struct d3d12_context *ctx, const void void d3d12_gfx_pipeline_state_cache_invalidate_shader(struct d3d12_context *ctx, - enum pipe_shader_type stage, + mesa_shader_stage stage, struct d3d12_shader_selector *selector); void diff --git a/src/gallium/drivers/d3d12/d3d12_root_signature.cpp b/src/gallium/drivers/d3d12/d3d12_root_signature.cpp index 24d041f876f..bfa445997da 100644 --- a/src/gallium/drivers/d3d12/d3d12_root_signature.cpp +++ b/src/gallium/drivers/d3d12/d3d12_root_signature.cpp @@ -38,7 +38,7 @@ struct d3d12_root_signature { }; static D3D12_SHADER_VISIBILITY -get_shader_visibility(enum pipe_shader_type stage) +get_shader_visibility(mesa_shader_stage stage) { switch (stage) { case MESA_SHADER_VERTEX: @@ -123,7 +123,7 @@ create_root_signature(struct d3d12_context *ctx, struct d3d12_root_signature_key unsigned count = key->compute ? 1 : D3D12_GFX_SHADER_STAGES; for (unsigned i = 0; i < count; ++i) { unsigned stage = key->compute ? MESA_SHADER_COMPUTE : i; - D3D12_SHADER_VISIBILITY visibility = get_shader_visibility((enum pipe_shader_type)stage); + D3D12_SHADER_VISIBILITY visibility = get_shader_visibility((mesa_shader_stage)stage); if (key->stages[i].end_cb_bindings - key->stages[i].begin_cb_bindings > 0) { init_range_root_param(&root_params[num_params++], diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index cce55e727c6..b267fc11e83 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -151,7 +151,7 @@ etna_screen_get_device_vendor(struct pipe_screen *pscreen) } static void -etna_init_single_shader_caps(struct etna_screen *screen, enum pipe_shader_type shader) +etna_init_single_shader_caps(struct etna_screen *screen, mesa_shader_stage shader) { struct pipe_shader_caps *caps = (struct pipe_shader_caps *)&screen->base.shader_caps[shader]; diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.c b/src/gallium/drivers/etnaviv/etnaviv_shader.c index 2989743b5b4..fb24e746a60 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_shader.c +++ b/src/gallium/drivers/etnaviv/etnaviv_shader.c @@ -613,7 +613,7 @@ etna_set_max_shader_compiler_threads(struct pipe_screen *pscreen, static bool etna_is_parallel_shader_compilation_finished(struct pipe_screen *pscreen, void *hwcso, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { struct etna_shader *shader = (struct etna_shader *)hwcso; diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c index a46c286fd03..40da56bd825 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_state.c +++ b/src/gallium/drivers/etnaviv/etnaviv_state.c @@ -78,7 +78,7 @@ etna_set_sample_mask(struct pipe_context *pctx, unsigned sample_mask) static void etna_set_constant_buffer(struct pipe_context *pctx, - enum pipe_shader_type shader, uint index, bool take_ownership, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { struct etna_context *ctx = etna_context(pctx); diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c index 1decf02b516..c0cb283ed0f 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_texture.c +++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c @@ -40,7 +40,7 @@ #include "drm-uapi/drm_fourcc.h" static void -etna_bind_sampler_states(struct pipe_context *pctx, enum pipe_shader_type shader, +etna_bind_sampler_states(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start_slot, unsigned num_samplers, void **samplers) { @@ -320,7 +320,7 @@ etna_vertex_set_sampler_views(struct etna_context *ctx, unsigned nr, } static void -etna_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader, +etna_set_sampler_views(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start_slot, unsigned num_views, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c index cad8406f767..783cef2207c 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c @@ -103,7 +103,7 @@ fd2_sampler_state_create(struct pipe_context *pctx, } static void -fd2_sampler_states_bind(struct pipe_context *pctx, enum pipe_shader_type shader, +fd2_sampler_states_bind(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned nr, void **hwcso) in_dt { if (!hwcso) @@ -183,7 +183,7 @@ fd2_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, } static void -fd2_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader, +fd2_set_sampler_views(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) in_dt diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_image.c b/src/gallium/drivers/freedreno/a4xx/fd4_image.c index 74a28b488ce..956a108913d 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_image.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_image.c @@ -134,7 +134,7 @@ static void translate_image(struct fd4_image *img, struct pipe_image_view *pimg) } static void emit_image_tex(struct fd_ringbuffer *ring, unsigned slot, - struct fd4_image *img, enum pipe_shader_type shader) + struct fd4_image *img, mesa_shader_stage shader) { OUT_PKT3(ring, CP_LOAD_STATE4, 2 + 8); OUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(slot) | @@ -180,7 +180,7 @@ static void emit_image_tex(struct fd_ringbuffer *ring, unsigned slot, } static void emit_image_ssbo(struct fd_ringbuffer *ring, unsigned slot, - struct fd4_image *img, enum pipe_shader_type shader) + struct fd4_image *img, mesa_shader_stage shader) { OUT_PKT3(ring, CP_LOAD_STATE4, 2 + 4); OUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(slot) | @@ -214,7 +214,7 @@ static void emit_image_ssbo(struct fd_ringbuffer *ring, unsigned slot, */ void fd4_emit_images(struct fd_context *ctx, struct fd_ringbuffer *ring, - enum pipe_shader_type shader, + mesa_shader_stage shader, const struct ir3_shader_variant *v) { struct fd_shaderimg_stateobj *so = &ctx->shaderimg[shader]; diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_image.h b/src/gallium/drivers/freedreno/a4xx/fd4_image.h index 61e062b4a7b..2be211aa41b 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_image.h +++ b/src/gallium/drivers/freedreno/a4xx/fd4_image.h @@ -14,6 +14,6 @@ struct ir3_shader_variant; void fd4_emit_images(struct fd_context *ctx, struct fd_ringbuffer *ring, - enum pipe_shader_type shader, const struct ir3_shader_variant *v); + mesa_shader_stage shader, const struct ir3_shader_variant *v); #endif /* FD4_IMAGE_H_ */ diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c index 9a4986f6828..91c3e92f53a 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c @@ -213,7 +213,7 @@ fd4_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, } static void -fd4_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader, +fd4_set_sampler_views(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_image.c b/src/gallium/drivers/freedreno/a5xx/fd5_image.c index 7fc0838673d..664b073dd1f 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_image.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_image.c @@ -118,7 +118,7 @@ translate_image(struct fd5_image *img, struct pipe_image_view *pimg) static void emit_image_tex(struct fd_ringbuffer *ring, unsigned slot, struct fd5_image *img, - enum pipe_shader_type shader) + mesa_shader_stage shader) { OUT_PKT7(ring, CP_LOAD_STATE4, 3 + 12); OUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(slot) | @@ -157,7 +157,7 @@ emit_image_tex(struct fd_ringbuffer *ring, unsigned slot, struct fd5_image *img, static void emit_image_ssbo(struct fd_ringbuffer *ring, unsigned slot, - struct fd5_image *img, enum pipe_shader_type shader) + struct fd5_image *img, mesa_shader_stage shader) { OUT_PKT7(ring, CP_LOAD_STATE4, 3 + 2); OUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(slot) | @@ -194,7 +194,7 @@ emit_image_ssbo(struct fd_ringbuffer *ring, unsigned slot, */ void fd5_emit_images(struct fd_context *ctx, struct fd_ringbuffer *ring, - enum pipe_shader_type shader, + mesa_shader_stage shader, const struct ir3_shader_variant *v) { struct fd_shaderimg_stateobj *so = &ctx->shaderimg[shader]; diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_image.h b/src/gallium/drivers/freedreno/a5xx/fd5_image.h index 8b38fe1ca7b..9dee5c84508 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_image.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_image.h @@ -13,7 +13,7 @@ struct ir3_shader_variant; void fd5_emit_images(struct fd_context *ctx, struct fd_ringbuffer *ring, - enum pipe_shader_type shader, + mesa_shader_stage shader, const struct ir3_shader_variant *v); #endif /* FD5_IMAGE_H_ */ diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc index 1d01cfef143..9574bed63ba 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc @@ -37,7 +37,7 @@ /* Helper to get tex stateobj. */ static struct fd_ringbuffer * -tex_state(struct fd_context *ctx, enum pipe_shader_type type) +tex_state(struct fd_context *ctx, mesa_shader_stage type) assert_dt { if (ctx->tex[type].num_textures == 0) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_image.cc b/src/gallium/drivers/freedreno/a6xx/fd6_image.cc index ed068c48279..7630ed495b1 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_image.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_image.cc @@ -121,7 +121,7 @@ fd6_image_descriptor(struct fd_context *ctx, const struct pipe_image_view *buf, } static struct fd6_descriptor_set * -descriptor_set(struct fd_context *ctx, enum pipe_shader_type shader) +descriptor_set(struct fd_context *ctx, mesa_shader_stage shader) assert_dt { struct fd6_context *fd6_ctx = fd6_context(ctx); @@ -184,7 +184,7 @@ validate_buffer_descriptor(struct fd_context *ctx, struct fd6_descriptor_set *se /* Build bindless descriptor state, returns ownership of state reference */ template struct fd_ringbuffer * -fd6_build_bindless_state(struct fd_context *ctx, enum pipe_shader_type shader, +fd6_build_bindless_state(struct fd_context *ctx, mesa_shader_stage shader, bool append_fb_read) { struct fd_shaderbuf_stateobj *bufso = &ctx->shaderbuf[shader]; @@ -375,7 +375,7 @@ fd6_build_bindless_state(struct fd_context *ctx, enum pipe_shader_type shader, FD_GENX(fd6_build_bindless_state); static void -fd6_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader, +fd6_set_shader_buffers(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -406,7 +406,7 @@ fd6_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader, } static void -fd6_set_shader_images(struct pipe_context *pctx, enum pipe_shader_type shader, +fd6_set_shader_images(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_image.h b/src/gallium/drivers/freedreno/a6xx/fd6_image.h index dcbef9be401..007b4222f9d 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_image.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_image.h @@ -14,7 +14,7 @@ template struct fd_ringbuffer * -fd6_build_bindless_state(struct fd_context *ctx, enum pipe_shader_type shader, +fd6_build_bindless_state(struct fd_context *ctx, mesa_shader_stage shader, bool append_fb_read) assert_dt; void fd6_image_init(struct pipe_context *pctx); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc b/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc index 0780496491a..874026d0243 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc @@ -539,7 +539,7 @@ fd6_sampler_view_update(struct fd_context *ctx, } static void -fd6_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader, +fd6_set_sampler_views(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -601,7 +601,7 @@ tex_key_equals(const void *_a, const void *_b) } static struct fd_ringbuffer * -build_texture_state(struct fd_context *ctx, enum pipe_shader_type type, +build_texture_state(struct fd_context *ctx, mesa_shader_stage type, struct fd_texture_stateobj *tex) assert_dt { @@ -797,7 +797,7 @@ handle_invalidates(struct fd_context *ctx) } struct fd6_texture_state * -fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type) +fd6_texture_state(struct fd_context *ctx, mesa_shader_stage type) { struct fd_texture_stateobj *tex = &ctx->tex[type]; struct fd6_context *fd6_ctx = fd6_context(ctx); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.h b/src/gallium/drivers/freedreno/a6xx/fd6_texture.h index b49a479820a..42eae07651b 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.h @@ -110,7 +110,7 @@ struct fd6_texture_state { }; struct fd6_texture_state * -fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type) assert_dt; +fd6_texture_state(struct fd_context *ctx, mesa_shader_stage type) assert_dt; static inline void diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index 003e265ec97..586e7690ee3 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -706,7 +706,7 @@ dirty_shader_to_dirty_state(BITMASK_ENUM(fd_dirty_shader_state) dirty) } static inline void -fd_context_dirty_shader(struct fd_context *ctx, enum pipe_shader_type shader, +fd_context_dirty_shader(struct fd_context *ctx, mesa_shader_stage shader, BITMASK_ENUM(fd_dirty_shader_state) dirty) assert_dt { @@ -766,7 +766,7 @@ fd_context_add_map(struct fd_context *ctx, uint32_t dirty, uint32_t gen_dirty) * specific dirty bit */ static inline void -fd_context_add_shader_map(struct fd_context *ctx, enum pipe_shader_type shader, +fd_context_add_shader_map(struct fd_context *ctx, mesa_shader_stage shader, BITMASK_ENUM(fd_dirty_shader_state) dirty, uint32_t gen_dirty) { u_foreach_bit (b, dirty) { diff --git a/src/gallium/drivers/freedreno/freedreno_program.c b/src/gallium/drivers/freedreno/freedreno_program.c index fbb82339ab6..7502b20116e 100644 --- a/src/gallium/drivers/freedreno/freedreno_program.c +++ b/src/gallium/drivers/freedreno/freedreno_program.c @@ -15,7 +15,7 @@ #include "freedreno_program.h" static void -update_bound_stage(struct fd_context *ctx, enum pipe_shader_type shader, +update_bound_stage(struct fd_context *ctx, mesa_shader_stage shader, bool bound) assert_dt { uint32_t bound_shader_stages = ctx->bound_shader_stages; diff --git a/src/gallium/drivers/freedreno/freedreno_resource.h b/src/gallium/drivers/freedreno/freedreno_resource.h index 72dc565ced5..6c2ab08da8e 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.h +++ b/src/gallium/drivers/freedreno/freedreno_resource.h @@ -430,7 +430,7 @@ fd_dirty_resource(struct fd_context *ctx, struct pipe_resource *prsc, static inline void fd_dirty_shader_resource(struct fd_context *ctx, struct pipe_resource *prsc, - enum pipe_shader_type shader, + mesa_shader_stage shader, BITMASK_ENUM(fd_dirty_shader_state) dirty, bool write) assert_dt diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 8467761b62c..734a937b56d 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -678,7 +678,7 @@ fd_init_screen_caps(struct fd_screen *screen) static const struct nir_shader_compiler_options * fd_get_compiler_options(struct pipe_screen *pscreen, - enum pipe_shader_type shader) + mesa_shader_stage shader) { struct fd_screen *screen = fd_screen(pscreen); diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index 38d99c8b3a9..dd71de03c2a 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -124,7 +124,7 @@ upload_user_buffer(struct pipe_context *pctx, struct pipe_constant_buffer *cb) * index>0 will be UBO's.. well, I'll worry about that later */ static void -fd_set_constant_buffer(struct pipe_context *pctx, enum pipe_shader_type shader, +fd_set_constant_buffer(struct pipe_context *pctx, mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) in_dt { @@ -154,7 +154,7 @@ fd_set_constant_buffer(struct pipe_context *pctx, enum pipe_shader_type shader, } void -fd_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader, +fd_set_shader_buffers(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) in_dt @@ -200,7 +200,7 @@ fd_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader, } void -fd_set_shader_images(struct pipe_context *pctx, enum pipe_shader_type shader, +fd_set_shader_images(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) in_dt diff --git a/src/gallium/drivers/freedreno/freedreno_state.h b/src/gallium/drivers/freedreno/freedreno_state.h index 99d7d937798..64fe984c7fb 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.h +++ b/src/gallium/drivers/freedreno/freedreno_state.h @@ -51,13 +51,13 @@ fd_depth_clamp_enabled(struct fd_context *ctx) assert_dt } void fd_set_shader_buffers(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) in_dt; void fd_set_shader_images(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) in_dt; diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index 9a9075bdcd9..87ec5ba4944 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.c +++ b/src/gallium/drivers/freedreno/freedreno_texture.c @@ -31,7 +31,7 @@ fd_sampler_view_destroy(struct pipe_context *pctx, } void -fd_sampler_states_bind(struct pipe_context *pctx, enum pipe_shader_type shader, +fd_sampler_states_bind(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned nr, void **hwcso) in_dt { struct fd_context *ctx = fd_context(pctx); @@ -52,7 +52,7 @@ fd_sampler_states_bind(struct pipe_context *pctx, enum pipe_shader_type shader, } void -fd_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader, +fd_set_sampler_views(struct pipe_context *pctx, mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) in_dt diff --git a/src/gallium/drivers/freedreno/freedreno_texture.h b/src/gallium/drivers/freedreno/freedreno_texture.h index 42f80656c4d..8df0a62bd03 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.h +++ b/src/gallium/drivers/freedreno/freedreno_texture.h @@ -14,11 +14,11 @@ BEGINC; void fd_sampler_states_bind(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned nr, void **hwcso); void fd_set_sampler_views(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views); diff --git a/src/gallium/drivers/freedreno/ir3/ir3_const.h b/src/gallium/drivers/freedreno/ir3/ir3_const.h index 395a505815d..05c752474f1 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_const.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_const.h @@ -390,7 +390,7 @@ emit_tfbos(struct fd_context *ctx, const struct ir3_shader_variant *v, static inline void emit_common_consts(const struct ir3_shader_variant *v, struct fd_ringbuffer *ring, struct fd_context *ctx, - enum pipe_shader_type t) assert_dt + mesa_shader_stage t) assert_dt { enum fd_dirty_shader_state dirty = ctx->dirty_shader[t]; diff --git a/src/gallium/drivers/freedreno/ir3/ir3_descriptor.h b/src/gallium/drivers/freedreno/ir3/ir3_descriptor.h index 5c80437e3ce..92df37cd909 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_descriptor.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_descriptor.h @@ -32,7 +32,7 @@ * across shader stages. */ static inline unsigned -ir3_shader_descriptor_set(enum pipe_shader_type shader) +ir3_shader_descriptor_set(mesa_shader_stage shader) { switch (shader) { case MESA_SHADER_VERTEX: return 0; diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c index 65486d685e6..2d5edb3cd1d 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c @@ -509,7 +509,7 @@ ir3_set_max_shader_compiler_threads(struct pipe_screen *pscreen, static bool ir3_is_parallel_shader_compilation_finished(struct pipe_screen *pscreen, void *shader, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { struct ir3_shader_state *hwcso = (struct ir3_shader_state *)shader; diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 518216f5c04..3d51f885cad 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -350,7 +350,7 @@ i915_create_sampler_state(struct pipe_context *pipe, static void i915_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned num, void **samplers) { if (shader != MESA_SHADER_FRAGMENT) { @@ -718,7 +718,7 @@ i915_delete_vs_state(struct pipe_context *pipe, void *shader) static void i915_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint32_t index, + mesa_shader_stage shader, uint32_t index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -779,7 +779,7 @@ i915_set_constant_buffer(struct pipe_context *pipe, } static void -i915_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader, +i915_set_sampler_views(struct pipe_context *pipe, mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 3350fd7c1b6..808f2057480 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -1363,7 +1363,7 @@ bool iris_use_tcs_multi_patch(struct iris_screen *screen); bool iris_indirect_ubos_use_sampler(struct iris_screen *screen); const struct nir_shader_compiler_options * iris_get_compiler_options(struct pipe_screen *pscreen, - enum pipe_shader_type pstage); + mesa_shader_stage pstage); /* iris_disk_cache.c */ diff --git a/src/gallium/drivers/iris/iris_pipe.h b/src/gallium/drivers/iris/iris_pipe.h index 779299da770..1c811e67912 100644 --- a/src/gallium/drivers/iris/iris_pipe.h +++ b/src/gallium/drivers/iris/iris_pipe.h @@ -27,15 +27,15 @@ #include "compiler/shader_enums.h" static inline mesa_shader_stage -stage_from_pipe(enum pipe_shader_type pstage) +stage_from_pipe(mesa_shader_stage pstage) { return (mesa_shader_stage)pstage; } -static inline enum pipe_shader_type +static inline mesa_shader_stage stage_to_pipe(mesa_shader_stage stage) { - return (enum pipe_shader_type)stage; + return (mesa_shader_stage)stage; } /** diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 5a73503e7bf..8531b07b7d2 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -3827,7 +3827,7 @@ iris_set_max_shader_compiler_threads(struct pipe_screen *pscreen, static bool iris_is_parallel_shader_compilation_finished(struct pipe_screen *pscreen, void *v_shader, - enum pipe_shader_type p_stage) + mesa_shader_stage p_stage) { struct iris_screen *screen = (struct iris_screen *) pscreen; @@ -4001,7 +4001,7 @@ iris_shader_perf_log(void *data, unsigned *id, const char *fmt, ...) const struct nir_shader_compiler_options * iris_get_compiler_options(struct pipe_screen *pscreen, - enum pipe_shader_type pstage) + mesa_shader_stage pstage) { struct iris_screen *screen = (struct iris_screen *) pscreen; mesa_shader_stage stage = stage_from_pipe(pstage); diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 76f2cb2e0e6..7c0cceb1b33 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2623,7 +2623,7 @@ iris_create_sampler_state(struct pipe_context *ctx, */ static void iris_bind_sampler_states(struct pipe_context *ctx, - enum pipe_shader_type p_stage, + mesa_shader_stage p_stage, unsigned start, unsigned count, void **states) { @@ -3357,7 +3357,7 @@ fill_buffer_image_param(struct isl_image_param *param, */ static void iris_set_shader_images(struct pipe_context *ctx, - enum pipe_shader_type p_stage, + mesa_shader_stage p_stage, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *p_images) @@ -3505,7 +3505,7 @@ is_sampler_view_3d(const struct iris_sampler_view *view) */ static void iris_set_sampler_views(struct pipe_context *ctx, - enum pipe_shader_type p_stage, + mesa_shader_stage p_stage, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -3948,7 +3948,7 @@ iris_set_framebuffer_state(struct pipe_context *ctx, */ static void iris_set_constant_buffer(struct pipe_context *ctx, - enum pipe_shader_type p_stage, unsigned index, + mesa_shader_stage p_stage, unsigned index, bool take_ownership, const struct pipe_constant_buffer *input) { @@ -4108,7 +4108,7 @@ upload_sysvals(struct iris_context *ice, */ static void iris_set_shader_buffers(struct pipe_context *ctx, - enum pipe_shader_type p_stage, + mesa_shader_stage p_stage, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -9615,7 +9615,7 @@ iris_rebind_buffer(struct iris_context *ice, for (int s = MESA_SHADER_VERTEX; s < MESA_SHADER_STAGES; s++) { struct iris_shader_state *shs = &ice->state.shaders[s]; - enum pipe_shader_type p_stage = stage_to_pipe(s); + mesa_shader_stage p_stage = stage_to_pipe(s); if (!(res->bind_stages & (1 << s))) continue; diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index 137e3f053c0..8e41fff86af 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -91,7 +91,7 @@ static const nir_shader_compiler_options fs_nir_options = { }; const void * -lima_program_get_compiler_options(enum pipe_shader_type shader) +lima_program_get_compiler_options(mesa_shader_stage shader) { switch (shader) { case MESA_SHADER_VERTEX: diff --git a/src/gallium/drivers/lima/lima_program.h b/src/gallium/drivers/lima/lima_program.h index 9b5e676554c..da677a54356 100644 --- a/src/gallium/drivers/lima/lima_program.h +++ b/src/gallium/drivers/lima/lima_program.h @@ -27,7 +27,7 @@ #include "pipe/p_defines.h" -const void *lima_program_get_compiler_options(enum pipe_shader_type shader); +const void *lima_program_get_compiler_options(mesa_shader_stage shader); bool lima_update_vs_state(struct lima_context *ctx); bool lima_update_fs_state(struct lima_context *ctx); diff --git a/src/gallium/drivers/lima/lima_state.c b/src/gallium/drivers/lima/lima_state.c index a8e6a35444b..2283472761f 100644 --- a/src/gallium/drivers/lima/lima_state.c +++ b/src/gallium/drivers/lima/lima_state.c @@ -263,7 +263,7 @@ lima_set_stencil_ref(struct pipe_context *pctx, static void lima_set_constant_buffer(struct pipe_context *pctx, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool pass_reference, const struct pipe_constant_buffer *cb) { @@ -308,7 +308,7 @@ lima_sampler_state_delete(struct pipe_context *pctx, void *sstate) static void lima_sampler_states_bind(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned nr, void **hwcso) { struct lima_context *ctx = lima_context(pctx); @@ -369,7 +369,7 @@ lima_sampler_view_destroy(struct pipe_context *pctx, static void lima_set_sampler_views(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index 2a537fc0659..b137e25247c 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -84,7 +84,7 @@ llvmpipe_destroy(struct pipe_context *pipe) util_unreference_framebuffer_state(&llvmpipe->framebuffer); - for (enum pipe_shader_type s = MESA_SHADER_VERTEX; s < MESA_SHADER_MESH_STAGES; s++) { + for (mesa_shader_stage s = MESA_SHADER_VERTEX; s < MESA_SHADER_MESH_STAGES; s++) { for (i = 0; i < ARRAY_SIZE(llvmpipe->sampler_views[0]); i++) { pipe_sampler_view_reference(&llvmpipe->sampler_views[s][i], NULL); } diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h index 302e3b25267..acd486cb331 100644 --- a/src/gallium/drivers/llvmpipe/lp_state.h +++ b/src/gallium/drivers/llvmpipe/lp_state.h @@ -209,7 +209,7 @@ llvmpipe_prepare_tess_eval_sampling(struct llvmpipe_context *ctx, struct pipe_sampler_view **views); void llvmpipe_cleanup_stage_sampling(struct llvmpipe_context *ctx, - enum pipe_shader_type stage); + mesa_shader_stage stage); void llvmpipe_prepare_vertex_images(struct llvmpipe_context *lp, @@ -233,6 +233,6 @@ llvmpipe_prepare_tess_eval_images(struct llvmpipe_context *lp, void llvmpipe_cleanup_stage_images(struct llvmpipe_context *ctx, - enum pipe_shader_type stage); + mesa_shader_stage stage); #endif diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c index 17c3e1f4462..cbe32d7622f 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_cs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c @@ -1101,7 +1101,7 @@ llvmpipe_delete_compute_state(struct pipe_context *pipe, static struct lp_compute_shader_variant_key * make_variant_key(struct llvmpipe_context *lp, struct lp_compute_shader *shader, - enum pipe_shader_type sh_type, + mesa_shader_stage sh_type, char *store) { struct lp_compute_shader_variant_key *key = @@ -1268,7 +1268,7 @@ lp_cs_get_ir_cache_key(struct lp_compute_shader_variant *variant, static struct lp_compute_shader_variant * generate_variant(struct llvmpipe_context *lp, struct lp_compute_shader *shader, - enum pipe_shader_type sh_type, + mesa_shader_stage sh_type, const struct lp_compute_shader_variant_key *key) { struct llvmpipe_screen *screen = llvmpipe_screen(lp->pipe.screen); @@ -1359,7 +1359,7 @@ lp_cs_ctx_set_cs_variant(struct lp_cs_context *csctx, static struct lp_compute_shader_variant * llvmpipe_update_cs_variant(struct llvmpipe_context *lp, - enum pipe_shader_type sh_type, + mesa_shader_stage sh_type, struct lp_compute_shader *shader) { char store[LP_CS_MAX_VARIANT_KEY_SIZE]; diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 75cd9d5074d..ffd584422c0 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -4212,7 +4212,7 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs) static void llvmpipe_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -4281,7 +4281,7 @@ llvmpipe_set_constant_buffer(struct pipe_context *pipe, static void llvmpipe_set_shader_buffers(struct pipe_context *pipe, - enum pipe_shader_type shader, unsigned start_slot, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -4339,7 +4339,7 @@ llvmpipe_set_shader_buffers(struct pipe_context *pipe, static void llvmpipe_set_shader_images(struct pipe_context *pipe, - enum pipe_shader_type shader, unsigned start_slot, + mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) { diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c index 2f480aa7902..3a86223a676 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c +++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c @@ -67,7 +67,7 @@ llvmpipe_create_sampler_state(struct pipe_context *pipe, static void llvmpipe_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, void **samplers) @@ -127,7 +127,7 @@ llvmpipe_bind_sampler_states(struct pipe_context *pipe, static void llvmpipe_set_sampler_views(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, @@ -290,7 +290,7 @@ static void prepare_shader_sampling(struct llvmpipe_context *lp, unsigned num, struct pipe_sampler_view **views, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS]; uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS]; @@ -432,7 +432,7 @@ llvmpipe_prepare_tess_eval_sampling(struct llvmpipe_context *lp, void llvmpipe_cleanup_stage_sampling(struct llvmpipe_context *ctx, - enum pipe_shader_type stage) + mesa_shader_stage stage) { assert(ctx); assert(stage < ARRAY_SIZE(ctx->num_sampler_views)); @@ -458,7 +458,7 @@ static void prepare_shader_images(struct llvmpipe_context *lp, unsigned num, struct pipe_image_view *views, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { assert(num <= PIPE_MAX_SHADER_SAMPLER_VIEWS); if (!num) @@ -591,7 +591,7 @@ llvmpipe_prepare_tess_eval_images(struct llvmpipe_context *lp, void llvmpipe_cleanup_stage_images(struct llvmpipe_context *ctx, - enum pipe_shader_type stage) + mesa_shader_stage stage) { assert(ctx); assert(stage < ARRAY_SIZE(ctx->num_images)); diff --git a/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c b/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c index 9f2f6bfaee5..ddfc0fca8e8 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c @@ -197,7 +197,7 @@ nv30_fragtex_set_sampler_views(struct pipe_context *pipe, unsigned nr, static void -nv30_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader, +nv30_set_sampler_views(struct pipe_context *pipe, mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) diff --git a/src/gallium/drivers/nouveau/nv30/nv30_state.c b/src/gallium/drivers/nouveau/nv30/nv30_state.c index 0b17266494c..50318a94ce7 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_state.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_state.c @@ -327,7 +327,7 @@ nv30_set_sample_mask(struct pipe_context *pipe, unsigned sample_mask) static void nv30_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool pass_reference, const struct pipe_constant_buffer *cb) { diff --git a/src/gallium/drivers/nouveau/nv30/nv30_texture.c b/src/gallium/drivers/nouveau/nv30/nv30_texture.c index 73c50afe9f2..c4e26065904 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_texture.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_texture.c @@ -188,7 +188,7 @@ nv30_sampler_state_delete(struct pipe_context *pipe, void *hwcso) static void nv30_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, unsigned start_slot, + mesa_shader_stage shader, unsigned start_slot, unsigned num_samplers, void **samplers) { switch (shader) { diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c index 87de8c4fa47..17e01d8044d 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c @@ -630,7 +630,7 @@ nv50_stage_sampler_states_bind(struct nv50_context *nv50, int s, static void nv50_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned num_samplers, void **samplers) { unsigned s = nv50_context_shader_stage(shader); @@ -701,7 +701,7 @@ nv50_stage_set_sampler_views(struct nv50_context *nv50, int s, } static void -nv50_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader, +nv50_set_sampler_views(struct pipe_context *pipe, mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -731,7 +731,7 @@ nv50_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader, static void * nv50_sp_state_create(struct pipe_context *pipe, const struct pipe_shader_state *cso, - enum pipe_shader_type type) + mesa_shader_stage type) { struct nv50_program *prog; @@ -884,7 +884,7 @@ nv50_get_compute_state_info(struct pipe_context *pipe, void *hwcso, static void nv50_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -1311,7 +1311,7 @@ nv50_bind_images_range(struct nv50_context *nv50, static void nv50_set_shader_images(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) @@ -1376,7 +1376,7 @@ nv50_bind_buffers_range(struct nv50_context *nv50, static void nv50_set_shader_buffers(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c index a75dde41d62..b235b8a908d 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c @@ -485,7 +485,7 @@ nvc0_stage_sampler_states_bind(struct nvc0_context *nvc0, static void nvc0_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, void **samplers) { const unsigned s = nvc0_shader_stage(shader); @@ -566,7 +566,7 @@ nvc0_stage_set_sampler_views(struct nvc0_context *nvc0, int s, } static void -nvc0_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader, +nvc0_set_sampler_views(struct pipe_context *pipe, mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -788,7 +788,7 @@ nvc0_get_compute_state_info(struct pipe_context *pipe, void *hwcso, static void nvc0_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -1266,7 +1266,7 @@ nvc0_bind_images_range(struct nvc0_context *nvc0, const unsigned s, static void nvc0_set_shader_images(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) @@ -1336,7 +1336,7 @@ nvc0_bind_buffers_range(struct nvc0_context *nvc0, const unsigned t, static void nvc0_set_shader_buffers(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 837d1a0ee15..96f9722e75a 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -415,7 +415,7 @@ panfrost_emit_blend(struct panfrost_batch *batch, void *rts, static uint64_t panfrost_emit_compute_shader_meta(struct panfrost_batch *batch, - enum pipe_shader_type stage) + mesa_shader_stage stage) { struct panfrost_compiled_shader *ss = batch->ctx->prog[stage]; @@ -971,7 +971,7 @@ static void panfrost_update_sampler_view(struct panfrost_sampler_view *view, struct pipe_context *pctx); static uint64_t -panfrost_emit_images(struct panfrost_batch *batch, enum pipe_shader_type stage) +panfrost_emit_images(struct panfrost_batch *batch, mesa_shader_stage stage) { struct panfrost_context *ctx = batch->ctx; unsigned last_bit = util_last_bit(ctx->image_mask[stage]); @@ -1012,7 +1012,7 @@ panfrost_emit_images(struct panfrost_batch *batch, enum pipe_shader_type stage) static uint64_t panfrost_map_constant_buffer_gpu(struct panfrost_batch *batch, - enum pipe_shader_type st, + mesa_shader_stage st, struct panfrost_constant_buffer *buf, unsigned index) { @@ -1069,7 +1069,7 @@ panfrost_upload_viewport_offset_sysval(struct panfrost_batch *batch, static void panfrost_upload_txs_sysval(struct panfrost_batch *batch, - enum pipe_shader_type st, unsigned int sysvalid, + mesa_shader_stage st, unsigned int sysvalid, struct sysval_uniform *uniform) { struct panfrost_context *ctx = batch->ctx; @@ -1111,7 +1111,7 @@ panfrost_upload_txs_sysval(struct panfrost_batch *batch, static void panfrost_upload_image_size_sysval(struct panfrost_batch *batch, - enum pipe_shader_type st, + mesa_shader_stage st, unsigned int sysvalid, struct sysval_uniform *uniform) { @@ -1144,7 +1144,7 @@ panfrost_upload_image_size_sysval(struct panfrost_batch *batch, static void panfrost_upload_ssbo_sysval(struct panfrost_batch *batch, - enum pipe_shader_type st, unsigned ssbo_id, + mesa_shader_stage st, unsigned ssbo_id, struct sysval_uniform *uniform) { struct panfrost_context *ctx = batch->ctx; @@ -1168,7 +1168,7 @@ panfrost_upload_ssbo_sysval(struct panfrost_batch *batch, static void panfrost_upload_sampler_sysval(struct panfrost_batch *batch, - enum pipe_shader_type st, unsigned samp_idx, + mesa_shader_stage st, unsigned samp_idx, struct sysval_uniform *uniform) { struct panfrost_context *ctx = batch->ctx; @@ -1282,7 +1282,7 @@ panfrost_xfb_offset(unsigned stride, struct pipe_stream_output_target *target) static void panfrost_upload_sysvals(struct panfrost_batch *batch, void *ptr_cpu, uint64_t ptr_gpu, struct panfrost_compiled_shader *ss, - enum pipe_shader_type st) + mesa_shader_stage st) { struct sysval_uniform *uniforms = ptr_cpu; @@ -1422,7 +1422,7 @@ panfrost_emit_ubo(void *base, unsigned index, uint64_t address, size_t size) #if PAN_ARCH >= 9 static uint64_t -panfrost_emit_ssbos(struct panfrost_batch *batch, enum pipe_shader_type st) +panfrost_emit_ssbos(struct panfrost_batch *batch, mesa_shader_stage st) { struct panfrost_context *ctx = batch->ctx; unsigned ssbo_count = util_last_bit(ctx->ssbo_mask[st]); @@ -1457,7 +1457,7 @@ panfrost_emit_ssbos(struct panfrost_batch *batch, enum pipe_shader_type st) static uint64_t panfrost_emit_const_buf(struct panfrost_batch *batch, - enum pipe_shader_type stage, unsigned *buffer_count, + mesa_shader_stage stage, unsigned *buffer_count, uint64_t *push_constants, unsigned *pushed_words) { struct panfrost_context *ctx = batch->ctx; @@ -1657,7 +1657,7 @@ panfrost_emit_shared_memory(struct panfrost_batch *batch, #if PAN_ARCH <= 5 static uint64_t -panfrost_get_tex_desc(struct panfrost_batch *batch, enum pipe_shader_type st, +panfrost_get_tex_desc(struct panfrost_batch *batch, mesa_shader_stage st, struct panfrost_sampler_view *view) { if (!view) @@ -1881,7 +1881,7 @@ panfrost_emit_null_texture(struct mali_texture_packed *out) static uint64_t panfrost_emit_texture_descriptors(struct panfrost_batch *batch, - enum pipe_shader_type stage) + mesa_shader_stage stage) { struct panfrost_context *ctx = batch->ctx; @@ -1959,7 +1959,7 @@ panfrost_upload_wa_sampler(struct panfrost_batch *batch) static uint64_t panfrost_emit_sampler_descriptors(struct panfrost_batch *batch, - enum pipe_shader_type stage) + mesa_shader_stage stage) { struct panfrost_context *ctx = batch->ctx; @@ -1990,7 +1990,7 @@ panfrost_emit_sampler_descriptors(struct panfrost_batch *batch, * descriptor. */ static void -emit_image_attribs(struct panfrost_context *ctx, enum pipe_shader_type shader, +emit_image_attribs(struct panfrost_context *ctx, mesa_shader_stage shader, struct mali_attribute_packed *attribs, unsigned first_buf) { unsigned last_bit = util_last_bit(ctx->image_mask[shader]); @@ -2021,7 +2021,7 @@ pan_modifier_to_attr_type(uint64_t modifier) } static void -emit_image_bufs(struct panfrost_batch *batch, enum pipe_shader_type shader, +emit_image_bufs(struct panfrost_batch *batch, mesa_shader_stage shader, struct mali_attribute_buffer_packed *bufs, unsigned first_image_buf_index) { @@ -2124,7 +2124,7 @@ emit_image_bufs(struct panfrost_batch *batch, enum pipe_shader_type shader, static uint64_t panfrost_emit_image_attribs(struct panfrost_batch *batch, uint64_t *buffers, - enum pipe_shader_type type) + mesa_shader_stage type) { struct panfrost_context *ctx = batch->ctx; struct panfrost_compiled_shader *shader = ctx->prog[type]; @@ -2981,7 +2981,7 @@ panfrost_emit_varying_descriptors(struct panfrost_batch *batch) static inline void panfrost_update_shader_state(struct panfrost_batch *batch, - enum pipe_shader_type st) + mesa_shader_stage st) { struct panfrost_context *ctx = batch->ctx; struct panfrost_compiled_shader *ss = ctx->prog[st]; diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.h b/src/gallium/drivers/panfrost/pan_cmdstream.h index 8831e855b2f..65be2b38212 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.h +++ b/src/gallium/drivers/panfrost/pan_cmdstream.h @@ -281,7 +281,7 @@ panfrost_vertex_attribute_stride(struct panfrost_compiled_shader *vs, static inline uint64_t panfrost_emit_resources(struct panfrost_batch *batch, - enum pipe_shader_type stage) + mesa_shader_stage stage) { struct panfrost_context *ctx = batch->ctx; struct pan_ptr T; diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 536a35336a6..ece422a7c3d 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -249,7 +249,7 @@ panfrost_bind_rasterizer_state(struct pipe_context *pctx, void *hwcso) static void panfrost_set_shader_images(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start_slot, + mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *iviews) { @@ -313,7 +313,7 @@ panfrost_bind_vertex_elements_state(struct pipe_context *pctx, void *hwcso) static void panfrost_bind_sampler_states(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start_slot, + mesa_shader_stage shader, unsigned start_slot, unsigned num_sampler, void **sampler) { struct panfrost_context *ctx = pan_context(pctx); @@ -345,7 +345,7 @@ panfrost_set_vertex_buffers(struct pipe_context *pctx, unsigned num_buffers, static void panfrost_set_constant_buffer(struct pipe_context *pctx, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *buf) { @@ -376,7 +376,7 @@ panfrost_set_stencil_ref(struct pipe_context *pctx, static void panfrost_set_sampler_views(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start_slot, + mesa_shader_stage shader, unsigned start_slot, unsigned num_views, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -424,7 +424,7 @@ panfrost_set_sampler_views(struct pipe_context *pctx, static void panfrost_set_shader_buffers(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index af6ff488cdf..f2562504a4b 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -514,7 +514,7 @@ void panfrost_flush(struct pipe_context *pipe, struct pipe_fence_handle **fence, bool panfrost_render_condition_check(struct panfrost_context *ctx); void panfrost_update_shader_variant(struct panfrost_context *ctx, - enum pipe_shader_type type); + mesa_shader_stage type); void panfrost_analyze_sysvals(struct panfrost_compiled_shader *ss); @@ -561,7 +561,7 @@ void panfrost_set_batch_masks_blend(struct panfrost_batch *batch); void panfrost_set_batch_masks_zs(struct panfrost_batch *batch); void panfrost_track_image_access(struct panfrost_batch *batch, - enum pipe_shader_type stage, + mesa_shader_stage stage, struct pipe_image_view *image); void panfrost_context_reinit(struct panfrost_context *ctx); diff --git a/src/gallium/drivers/panfrost/pan_csf.c b/src/gallium/drivers/panfrost/pan_csf.c index ac597ea2824..ba56aa54186 100644 --- a/src/gallium/drivers/panfrost/pan_csf.c +++ b/src/gallium/drivers/panfrost/pan_csf.c @@ -900,7 +900,7 @@ GENX(csf_emit_fragment_job)(struct panfrost_batch *batch, } static void -csf_emit_shader_regs(struct panfrost_batch *batch, enum pipe_shader_type stage, +csf_emit_shader_regs(struct panfrost_batch *batch, mesa_shader_stage stage, uint64_t shader) { uint64_t resources = panfrost_emit_resources(batch, stage); diff --git a/src/gallium/drivers/panfrost/pan_helpers.c b/src/gallium/drivers/panfrost/pan_helpers.c index 4dd8ebd617d..9e851cd6cc7 100644 --- a/src/gallium/drivers/panfrost/pan_helpers.c +++ b/src/gallium/drivers/panfrost/pan_helpers.c @@ -242,7 +242,7 @@ panfrost_set_batch_masks_zs(struct panfrost_batch *batch) void panfrost_track_image_access(struct panfrost_batch *batch, - enum pipe_shader_type stage, + mesa_shader_stage stage, struct pipe_image_view *image) { struct panfrost_resource *rsrc = pan_resource(image->resource); diff --git a/src/gallium/drivers/panfrost/pan_jm.c b/src/gallium/drivers/panfrost/pan_jm.c index a71c3096ee1..73953d54937 100644 --- a/src/gallium/drivers/panfrost/pan_jm.c +++ b/src/gallium/drivers/panfrost/pan_jm.c @@ -292,7 +292,7 @@ GENX(jm_emit_fragment_job)(struct panfrost_batch *batch, static void jm_emit_shader_env(struct panfrost_batch *batch, struct MALI_SHADER_ENVIRONMENT *cfg, - enum pipe_shader_type stage, uint64_t shader_ptr) + mesa_shader_stage stage, uint64_t shader_ptr) { cfg->resources = panfrost_emit_resources(batch, stage); cfg->thread_storage = batch->tls.gpu; @@ -451,7 +451,7 @@ jm_emit_tiler_desc(struct panfrost_batch *batch) #if PAN_ARCH <= 7 static inline void jm_emit_draw_descs(struct panfrost_batch *batch, struct MALI_DRAW *d, - enum pipe_shader_type st) + mesa_shader_stage st) { d->offset_start = batch->ctx->offset_start; d->instance_size = diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 017998827c4..0703b79b972 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -349,7 +349,7 @@ panfrost_batch_add_bo_old(struct panfrost_batch *batch, struct panfrost_bo *bo, } static uint32_t -panfrost_access_for_stage(enum pipe_shader_type stage) +panfrost_access_for_stage(mesa_shader_stage stage) { return (stage == MESA_SHADER_FRAGMENT) ? PAN_BO_ACCESS_FRAGMENT : PAN_BO_ACCESS_VERTEX_TILER; @@ -357,7 +357,7 @@ panfrost_access_for_stage(enum pipe_shader_type stage) void panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo, - enum pipe_shader_type stage) + mesa_shader_stage stage) { panfrost_batch_add_bo_old( batch, bo, PAN_BO_ACCESS_READ | panfrost_access_for_stage(stage)); @@ -365,7 +365,7 @@ panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo, void panfrost_batch_write_bo(struct panfrost_batch *batch, struct panfrost_bo *bo, - enum pipe_shader_type stage) + mesa_shader_stage stage) { panfrost_batch_add_bo_old( batch, bo, PAN_BO_ACCESS_WRITE | panfrost_access_for_stage(stage)); @@ -374,7 +374,7 @@ panfrost_batch_write_bo(struct panfrost_batch *batch, struct panfrost_bo *bo, void panfrost_batch_read_rsrc(struct panfrost_batch *batch, struct panfrost_resource *rsrc, - enum pipe_shader_type stage) + mesa_shader_stage stage) { uint32_t access = PAN_BO_ACCESS_READ | panfrost_access_for_stage(stage); @@ -393,7 +393,7 @@ panfrost_batch_read_rsrc(struct panfrost_batch *batch, void panfrost_batch_write_rsrc(struct panfrost_batch *batch, struct panfrost_resource *rsrc, - enum pipe_shader_type stage) + mesa_shader_stage stage) { uint32_t access = PAN_BO_ACCESS_WRITE | panfrost_access_for_stage(stage); @@ -411,7 +411,7 @@ panfrost_batch_write_rsrc(struct panfrost_batch *batch, struct panfrost_bo * panfrost_batch_create_bo(struct panfrost_batch *batch, size_t size, - uint32_t create_flags, enum pipe_shader_type stage, + uint32_t create_flags, mesa_shader_stage stage, const char *label) { struct panfrost_bo *bo; diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h index 99d4d51e69e..6f53f335637 100644 --- a/src/gallium/drivers/panfrost/pan_job.h +++ b/src/gallium/drivers/panfrost/pan_job.h @@ -203,19 +203,19 @@ panfrost_get_fresh_batch_for_fbo(struct panfrost_context *ctx, const char *reason); void panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo, - enum pipe_shader_type stage); + mesa_shader_stage stage); void panfrost_batch_write_bo(struct panfrost_batch *batch, struct panfrost_bo *bo, - enum pipe_shader_type stage); + mesa_shader_stage stage); void panfrost_batch_read_rsrc(struct panfrost_batch *batch, struct panfrost_resource *rsrc, - enum pipe_shader_type stage); + mesa_shader_stage stage); void panfrost_batch_write_rsrc(struct panfrost_batch *batch, struct panfrost_resource *rsrc, - enum pipe_shader_type stage); + mesa_shader_stage stage); bool panfrost_any_batch_reads_rsrc(struct panfrost_context *ctx, struct panfrost_resource *rsrc); @@ -225,7 +225,7 @@ bool panfrost_any_batch_writes_rsrc(struct panfrost_context *ctx, struct panfrost_bo *panfrost_batch_create_bo(struct panfrost_batch *batch, size_t size, uint32_t create_flags, - enum pipe_shader_type stage, + mesa_shader_stage stage, const char *label); void panfrost_flush_all_batches(struct panfrost_context *ctx, diff --git a/src/gallium/drivers/panfrost/pan_shader.c b/src/gallium/drivers/panfrost/pan_shader.c index f675d5b4f5c..93c48419d8e 100644 --- a/src/gallium/drivers/panfrost/pan_shader.c +++ b/src/gallium/drivers/panfrost/pan_shader.c @@ -388,7 +388,7 @@ panfrost_new_variant_locked(struct panfrost_context *ctx, static void panfrost_bind_shader_state(struct pipe_context *pctx, void *hwcso, - enum pipe_shader_type type) + mesa_shader_stage type) { struct panfrost_context *ctx = pan_context(pctx); ctx->uncompiled[type] = hwcso; @@ -403,7 +403,7 @@ panfrost_bind_shader_state(struct pipe_context *pctx, void *hwcso, void panfrost_update_shader_variant(struct panfrost_context *ctx, - enum pipe_shader_type type) + mesa_shader_stage type) { /* No shader variants for compute */ if (type == MESA_SHADER_COMPUTE) diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 3be4dca0677..0438f14a68d 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1519,7 +1519,7 @@ static void* } static void r300_bind_sampler_states(struct pipe_context* pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, void** states) { @@ -1573,7 +1573,7 @@ static uint32_t r300_assign_texture_cache_region(unsigned index, unsigned num) } static void r300_set_sampler_views(struct pipe_context* pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view** views) @@ -2062,7 +2062,7 @@ static void r300_delete_vs_state(struct pipe_context* pipe, void* shader) } static void r300_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index ac215f21052..e897cc8c598 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -4423,7 +4423,7 @@ static void evergreen_set_hw_atomic_buffers(struct pipe_context *ctx, } static void evergreen_set_shader_buffers(struct pipe_context *ctx, - enum pipe_shader_type shader, unsigned start_slot, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -4524,7 +4524,7 @@ static void evergreen_set_shader_buffers(struct pipe_context *ctx, } static void evergreen_set_shader_images(struct pipe_context *ctx, - enum pipe_shader_type shader, unsigned start_slot, + mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) { @@ -4738,7 +4738,7 @@ static void evergreen_set_shader_images(struct pipe_context *ctx, } static void evergreen_get_pipe_constant_buffer(struct r600_context *rctx, - enum pipe_shader_type shader, uint slot, + mesa_shader_stage shader, uint slot, struct pipe_constant_buffer *cbuf) { struct r600_constbuf_state *state = &rctx->constbuf_state[shader]; @@ -4752,7 +4752,7 @@ static void evergreen_get_pipe_constant_buffer(struct r600_context *rctx, } static void evergreen_get_shader_buffers(struct r600_context *rctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint start_slot, uint count, struct pipe_shader_buffer *sbuf) { diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 55479eaf665..8cf9f4c34cd 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -328,7 +328,7 @@ struct r600_pipe_shader_selector { unsigned num_shaders; - enum pipe_shader_type type; + mesa_shader_stage type; enum pipe_shader_ir ir_type; /* geometry shader properties */ @@ -1091,7 +1091,7 @@ void eg_dump_debug_state(struct pipe_context *ctx, FILE *f, struct r600_pipe_shader_selector *r600_create_shader_state_tokens(struct pipe_context *ctx, const void *tokens, enum pipe_shader_ir, - unsigned pipe_shader_type); + unsigned mesa_shader_stage); int r600_shader_select(struct pipe_context *ctx, struct r600_pipe_shader_selector* sel, bool *dirty, bool precompile); diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 97a4f34c012..22ecfc7edad 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -442,7 +442,7 @@ void r600_sampler_states_dirty(struct r600_context *rctx, } static void r600_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, void **states) { @@ -629,7 +629,7 @@ void r600_sampler_views_dirty(struct r600_context *rctx, } static void r600_set_sampler_views(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -740,7 +740,7 @@ static void r600_update_compressed_colortex_mask(struct r600_samplerview_state * } static int r600_get_hw_atomic_count(const struct pipe_context *ctx, - enum pipe_shader_type shader) + mesa_shader_stage shader) { const struct r600_context *rctx = (struct r600_context *)ctx; int value = 0; @@ -956,11 +956,11 @@ int r600_shader_select(struct pipe_context *ctx, struct r600_pipe_shader_selector *r600_create_shader_state_tokens(struct pipe_context *ctx, const void *prog, enum pipe_shader_ir ir, - unsigned pipe_shader_type) + unsigned mesa_shader_stage) { struct r600_pipe_shader_selector *sel = CALLOC_STRUCT(r600_pipe_shader_selector); - sel->type = pipe_shader_type; + sel->type = mesa_shader_stage; if (ir == PIPE_SHADER_IR_TGSI) { sel->tokens = tgsi_dup_tokens((const struct tgsi_token *)prog); tgsi_scan_shader(sel->tokens, &sel->info); @@ -974,21 +974,21 @@ struct r600_pipe_shader_selector *r600_create_shader_state_tokens(struct pipe_co static void *r600_create_shader_state(struct pipe_context *ctx, const struct pipe_shader_state *state, - unsigned pipe_shader_type) + unsigned mesa_shader_stage) { int i; struct r600_pipe_shader_selector *sel; if (state->type == PIPE_SHADER_IR_TGSI) - sel = r600_create_shader_state_tokens(ctx, state->tokens, state->type, pipe_shader_type); + sel = r600_create_shader_state_tokens(ctx, state->tokens, state->type, mesa_shader_stage); else if (state->type == PIPE_SHADER_IR_NIR) { - sel = r600_create_shader_state_tokens(ctx, state->ir.nir, state->type, pipe_shader_type); + sel = r600_create_shader_state_tokens(ctx, state->ir.nir, state->type, mesa_shader_stage); } else UNREACHABLE("Unknown shader type"); sel->so = state->stream_output; - switch (pipe_shader_type) { + switch (mesa_shader_stage) { case MESA_SHADER_GEOMETRY: sel->gs_output_prim = sel->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM]; @@ -1239,7 +1239,7 @@ void r600_constant_buffers_dirty(struct r600_context *rctx, struct r600_constbuf } static void r600_set_constant_buffer(struct pipe_context *ctx, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *input) { diff --git a/src/gallium/drivers/radeonsi/si_build_pm4.h b/src/gallium/drivers/radeonsi/si_build_pm4.h index 61577b1b717..e9620a1a951 100644 --- a/src/gallium/drivers/radeonsi/si_build_pm4.h +++ b/src/gallium/drivers/radeonsi/si_build_pm4.h @@ -546,7 +546,7 @@ static ALWAYS_INLINE unsigned si_get_user_data_base(enum amd_gfx_level gfx_level, enum si_has_tess has_tess, enum si_has_gs has_gs, enum si_has_ngg ngg, - enum pipe_shader_type shader) + mesa_shader_stage shader) { switch (shader) { case MESA_SHADER_VERTEX: diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index d230463c59a..b64a31516df 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -544,7 +544,7 @@ static void si_update_shader_needs_decompress_mask(struct si_context *sctx, unsi sctx->shader_has_depth_tex &= ~shader_bit; } -static void si_pipe_set_sampler_views(struct pipe_context *ctx, enum pipe_shader_type shader, +static void si_pipe_set_sampler_views(struct pipe_context *ctx, mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -808,7 +808,7 @@ static void si_set_shader_image(struct si_context *ctx, unsigned shader, unsigne RADEON_USAGE_READWRITE : RADEON_USAGE_READ, false); } -static void si_set_shader_images(struct pipe_context *pipe, enum pipe_shader_type shader, +static void si_set_shader_images(struct pipe_context *pipe, mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *views) @@ -958,7 +958,7 @@ void si_update_ps_colorbuf0_slot(struct si_context *sctx) /* SAMPLER STATES */ -static void si_bind_sampler_states(struct pipe_context *ctx, enum pipe_shader_type shader, +static void si_bind_sampler_states(struct pipe_context *ctx, mesa_shader_stage shader, unsigned start, unsigned count, void **states) { struct si_context *sctx = (struct si_context *)ctx; @@ -1179,7 +1179,7 @@ static void si_set_constant_buffer(struct si_context *sctx, struct si_buffer_res si_mark_atom_dirty(sctx, &sctx->atoms.s.gfx_shader_pointers); } -void si_get_inline_uniform_state(union si_shader_key *key, enum pipe_shader_type shader, +void si_get_inline_uniform_state(union si_shader_key *key, mesa_shader_stage shader, bool *inline_uniforms, uint32_t **inlined_values) { if (shader == MESA_SHADER_FRAGMENT) { @@ -1191,7 +1191,7 @@ void si_get_inline_uniform_state(union si_shader_key *key, enum pipe_shader_type } } -void si_invalidate_inlinable_uniforms(struct si_context *sctx, enum pipe_shader_type shader) +void si_invalidate_inlinable_uniforms(struct si_context *sctx, mesa_shader_stage shader) { if (shader == MESA_SHADER_COMPUTE) return; @@ -1211,7 +1211,7 @@ void si_invalidate_inlinable_uniforms(struct si_context *sctx, enum pipe_shader_ } } -static void si_pipe_set_constant_buffer(struct pipe_context *ctx, enum pipe_shader_type shader, +static void si_pipe_set_constant_buffer(struct pipe_context *ctx, mesa_shader_stage shader, uint slot, bool take_ownership, const struct pipe_constant_buffer *input) { @@ -1241,7 +1241,7 @@ static void si_pipe_set_constant_buffer(struct pipe_context *ctx, enum pipe_shad } static void si_set_inlinable_constants(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint num_values, uint32_t *values) { struct si_context *sctx = (struct si_context *)ctx; @@ -1333,7 +1333,7 @@ static void si_set_shader_buffer(struct si_context *sctx, struct si_buffer_resou sbuffer->buffer_offset + sbuffer->buffer_size); } -void si_set_shader_buffers(struct pipe_context *ctx, enum pipe_shader_type shader, +void si_set_shader_buffers(struct pipe_context *ctx, mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *sbuffers, unsigned writable_bitmask, bool internal_blit) @@ -1365,7 +1365,7 @@ void si_set_shader_buffers(struct pipe_context *ctx, enum pipe_shader_type shade } } -static void si_pipe_set_shader_buffers(struct pipe_context *ctx, enum pipe_shader_type shader, +static void si_pipe_set_shader_buffers(struct pipe_context *ctx, mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *sbuffers, unsigned writable_bitmask) @@ -1373,7 +1373,7 @@ static void si_pipe_set_shader_buffers(struct pipe_context *ctx, enum pipe_shade si_set_shader_buffers(ctx, shader, start_slot, count, sbuffers, writable_bitmask, false); } -void si_get_shader_buffers(struct si_context *sctx, enum pipe_shader_type shader, uint start_slot, +void si_get_shader_buffers(struct si_context *sctx, mesa_shader_stage shader, uint start_slot, uint count, struct pipe_shader_buffer *sbuf) { struct si_buffer_resources *buffers = &sctx->const_and_shader_buffers[shader]; diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 703e7a1b12e..59a2f346401 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -1195,7 +1195,7 @@ static void si_set_max_shader_compiler_threads(struct pipe_screen *screen, unsig } static bool si_is_parallel_shader_compilation_finished(struct pipe_screen *screen, void *shader, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { struct si_shader_selector *sel = (struct si_shader_selector *)shader; diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 09c0f3b4708..15ce24aff1a 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -556,7 +556,7 @@ struct si_screen { /* Force a single shader to use ACO, debug usage. */ blake3_hash *use_aco_shader_blakes; unsigned num_use_aco_shader_blakes; - enum pipe_shader_type use_aco_shader_type; + mesa_shader_stage use_aco_shader_type; struct { #define OPT_BOOL(name, dflt, description) bool name : 1; diff --git a/src/gallium/drivers/radeonsi/si_sqtt.c b/src/gallium/drivers/radeonsi/si_sqtt.c index 365d63e226d..ce3789bd2be 100644 --- a/src/gallium/drivers/radeonsi/si_sqtt.c +++ b/src/gallium/drivers/radeonsi/si_sqtt.c @@ -697,7 +697,7 @@ bool si_sqtt_pipeline_is_registered(struct ac_sqtt *sqtt, } static enum rgp_hardware_stages -si_sqtt_pipe_to_rgp_shader_stage(union si_shader_key *key, enum pipe_shader_type stage) +si_sqtt_pipe_to_rgp_shader_stage(union si_shader_key *key, mesa_shader_stage stage) { switch (stage) { case MESA_SHADER_VERTEX: diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 24463237010..92ca3b44033 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -576,7 +576,7 @@ struct si_buffer_resources { } while (0) /* si_descriptors.c */ -void si_get_inline_uniform_state(union si_shader_key *key, enum pipe_shader_type shader, +void si_get_inline_uniform_state(union si_shader_key *key, mesa_shader_stage shader, bool *inline_uniforms, uint32_t **inlined_values); void si_set_mutable_tex_desc_fields(struct si_screen *sscreen, struct si_texture *tex, const struct legacy_surf_level *base_level_info, @@ -585,14 +585,14 @@ void si_set_mutable_tex_desc_fields(struct si_screen *sscreen, struct si_texture bool is_stencil, uint16_t access, uint32_t * restrict state); void si_update_ps_colorbuf0_slot(struct si_context *sctx); void si_force_disable_ps_colorbuf0_slot(struct si_context *sctx); -void si_invalidate_inlinable_uniforms(struct si_context *sctx, enum pipe_shader_type shader); +void si_invalidate_inlinable_uniforms(struct si_context *sctx, mesa_shader_stage shader); void si_get_pipe_constant_buffer(struct si_context *sctx, uint shader, uint slot, struct pipe_constant_buffer *cbuf); -void si_set_shader_buffers(struct pipe_context *ctx, enum pipe_shader_type shader, +void si_set_shader_buffers(struct pipe_context *ctx, mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *sbuffers, unsigned writable_bitmask, bool internal_blit); -void si_get_shader_buffers(struct si_context *sctx, enum pipe_shader_type shader, uint start_slot, +void si_get_shader_buffers(struct si_context *sctx, mesa_shader_stage shader, uint start_slot, uint count, struct pipe_shader_buffer *sbuf); void si_set_ring_buffer(struct si_context *sctx, uint slot, struct pipe_resource *buffer, unsigned stride, unsigned num_records, bool add_tid, bool swizzle, @@ -679,7 +679,7 @@ bool si_update_spi_tmpring_size(struct si_context *sctx, unsigned bytes); bool si_set_tcs_to_fixed_func_shader(struct si_context *sctx); void si_update_tess_io_layout_state(struct si_context *sctx); void si_update_common_shader_state(struct si_context *sctx, struct si_shader_selector *sel, - enum pipe_shader_type type); + mesa_shader_stage type); /* si_state_draw.cpp */ void si_cp_dma_prefetch(struct si_context *sctx, struct pipe_resource *buf, diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index 86d84230ddd..9ade4bc19bc 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -3663,7 +3663,7 @@ static void si_update_rasterized_prim(struct si_context *sctx) } void si_update_common_shader_state(struct si_context *sctx, struct si_shader_selector *sel, - enum pipe_shader_type type) + mesa_shader_stage type) { si_set_active_descriptors_for_shader(sctx, sel); diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h index ebabb322ba8..d63c93ceecc 100644 --- a/src/gallium/drivers/softpipe/sp_state.h +++ b/src/gallium/drivers/softpipe/sp_state.h @@ -171,7 +171,7 @@ softpipe_update_derived(struct softpipe_context *softpipe, unsigned prim); void softpipe_set_sampler_views(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c index 195b9940488..11f8b4d88b0 100644 --- a/src/gallium/drivers/softpipe/sp_state_derived.c +++ b/src/gallium/drivers/softpipe/sp_state_derived.c @@ -281,7 +281,7 @@ compute_cliprect(struct softpipe_context *sp) static void set_shader_sampler(struct softpipe_context *softpipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, int max_sampler) { int i; diff --git a/src/gallium/drivers/softpipe/sp_state_image.c b/src/gallium/drivers/softpipe/sp_state_image.c index 7abbefc9db2..b87a811a917 100644 --- a/src/gallium/drivers/softpipe/sp_state_image.c +++ b/src/gallium/drivers/softpipe/sp_state_image.c @@ -27,7 +27,7 @@ #include "sp_buffer.h" static void softpipe_set_shader_images(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, @@ -61,7 +61,7 @@ static void softpipe_set_shader_images(struct pipe_context *pipe, } static void softpipe_set_shader_buffers(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, const struct pipe_shader_buffer *buffers, diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index b9ece79be80..fee36cd38a3 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -49,7 +49,7 @@ */ static void softpipe_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, void **samplers) @@ -97,7 +97,7 @@ softpipe_sampler_view_destroy(struct pipe_context *pipe, void softpipe_set_sampler_views(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, @@ -176,7 +176,7 @@ prepare_shader_sampling( struct softpipe_context *sp, unsigned num, struct pipe_sampler_view **views, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, struct pipe_resource *mapped_tex[PIPE_MAX_SHADER_SAMPLER_VIEWS]) { diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c index 74386028e33..0514ab0731d 100644 --- a/src/gallium/drivers/softpipe/sp_state_shader.c +++ b/src/gallium/drivers/softpipe/sp_state_shader.c @@ -356,7 +356,7 @@ softpipe_delete_gs_state(struct pipe_context *pipe, void *gs) static void softpipe_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c index 4adb6e37cd5..8956159db0f 100644 --- a/src/gallium/drivers/softpipe/sp_tex_sample.c +++ b/src/gallium/drivers/softpipe/sp_tex_sample.c @@ -675,7 +675,7 @@ compute_lambda_vert(const struct sp_sampler_view *sview, compute_lambda_from_grad_func softpipe_get_lambda_from_grad_func(const struct pipe_sampler_view *view, - enum pipe_shader_type shader) + mesa_shader_stage shader) { switch (view->target) { case PIPE_BUFFER: @@ -3554,7 +3554,7 @@ softpipe_create_sampler_state(struct pipe_context *pipe, compute_lambda_func softpipe_get_lambda_func(const struct pipe_sampler_view *view, - enum pipe_shader_type shader) + mesa_shader_stage shader) { if (shader != MESA_SHADER_FRAGMENT) return compute_lambda_vert; diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.h b/src/gallium/drivers/softpipe/sp_tex_sample.h index 4412a1c62f2..1226dbf0b85 100644 --- a/src/gallium/drivers/softpipe/sp_tex_sample.h +++ b/src/gallium/drivers/softpipe/sp_tex_sample.h @@ -163,11 +163,11 @@ struct sp_tgsi_sampler compute_lambda_func softpipe_get_lambda_func(const struct pipe_sampler_view *view, - enum pipe_shader_type shader); + mesa_shader_stage shader); compute_lambda_from_grad_func softpipe_get_lambda_from_grad_func(const struct pipe_sampler_view *view, - enum pipe_shader_type shader); + mesa_shader_stage shader); void * softpipe_create_sampler_state(struct pipe_context *pipe, diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h index d12711de5cc..bbb1d2ae5e9 100644 --- a/src/gallium/drivers/svga/svga_context.h +++ b/src/gallium/drivers/svga/svga_context.h @@ -1026,7 +1026,7 @@ svga_use_sampler_state_mapping(const struct svga_context *svga, static inline void svga_set_curr_shader_use_samplers_flag(struct svga_context *svga, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, bool use_samplers) { svga->curr.use_samplers[shader_type] = use_samplers; @@ -1035,7 +1035,7 @@ svga_set_curr_shader_use_samplers_flag(struct svga_context *svga, static inline bool svga_curr_shader_use_samplers(const struct svga_context *svga, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { return svga->curr.use_samplers[shader_type]; } diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index c4640423b25..ee8df352f11 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++ b/src/gallium/drivers/svga/svga_draw.c @@ -333,7 +333,7 @@ enum pipe_error svga_validate_sampler_resources(struct svga_context *svga, enum svga_pipe_type pipe_type) { - enum pipe_shader_type shader, first_shader, last_shader; + mesa_shader_stage shader, first_shader, last_shader; assert(svga_have_vgpu10(svga)); @@ -416,7 +416,7 @@ enum pipe_error svga_validate_constant_buffers(struct svga_context *svga, enum svga_pipe_type pipe_type) { - enum pipe_shader_type shader, first_shader, last_shader; + mesa_shader_stage shader, first_shader, last_shader; assert(svga_have_vgpu10(svga)); @@ -516,7 +516,7 @@ enum pipe_error svga_validate_image_views(struct svga_context *svga, enum svga_pipe_type pipe_type) { - enum pipe_shader_type shader, first_shader, last_shader; + mesa_shader_stage shader, first_shader, last_shader; bool rebind = svga->rebind.flags.images; enum pipe_error ret; @@ -555,7 +555,7 @@ enum pipe_error svga_validate_shader_buffers(struct svga_context *svga, enum svga_pipe_type pipe_type) { - enum pipe_shader_type shader, first_shader, last_shader; + mesa_shader_stage shader, first_shader, last_shader; bool rebind = svga->rebind.flags.shaderbufs; enum pipe_error ret; diff --git a/src/gallium/drivers/svga/svga_image_view.c b/src/gallium/drivers/svga/svga_image_view.c index cff08cf8957..ffa3dfc199b 100644 --- a/src/gallium/drivers/svga/svga_image_view.c +++ b/src/gallium/drivers/svga/svga_image_view.c @@ -99,7 +99,7 @@ svga_create_uav_image(struct svga_context *svga, */ static void svga_set_shader_images(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, diff --git a/src/gallium/drivers/svga/svga_pipe_constants.c b/src/gallium/drivers/svga/svga_pipe_constants.c index dd4dc7007cb..5cb4f057ee3 100644 --- a/src/gallium/drivers/svga/svga_pipe_constants.c +++ b/src/gallium/drivers/svga/svga_pipe_constants.c @@ -24,7 +24,7 @@ struct svga_constbuf static void svga_set_constant_buffer(struct pipe_context *pipe, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index 5b97dba5a6a..c098b4987e9 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -274,7 +274,7 @@ svga_create_sampler_state(struct pipe_context *pipe, static void svga_bind_sampler_states(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, void **samplers) @@ -389,7 +389,7 @@ svga_sampler_view_destroy(struct pipe_context *pipe, static void svga_set_sampler_views(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, unsigned unbind_num_trailing_slots, @@ -509,7 +509,7 @@ done: void svga_cleanup_sampler_state(struct svga_context *svga) { - enum pipe_shader_type shader; + mesa_shader_stage shader; for (shader = 0; shader <= MESA_SHADER_COMPUTE; shader++) { unsigned i; diff --git a/src/gallium/drivers/svga/svga_sampler_view.h b/src/gallium/drivers/svga/svga_sampler_view.h index 133e68147e8..41e0112a42a 100644 --- a/src/gallium/drivers/svga/svga_sampler_view.h +++ b/src/gallium/drivers/svga/svga_sampler_view.h @@ -84,11 +84,11 @@ svga_sampler_view_reference(struct svga_sampler_view **ptr, struct svga_sampler_ bool svga_check_sampler_view_resource_collision(const struct svga_context *svga, const struct svga_winsys_surface *res, - enum pipe_shader_type shader); + mesa_shader_stage shader); bool svga_check_sampler_framebuffer_resource_collision(struct svga_context *svga, - enum pipe_shader_type shader); + mesa_shader_stage shader); enum pipe_error svga_validate_pipe_sampler_view(struct svga_context *svga, diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 4ea8429f6b0..91f211d57a8 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -185,7 +185,7 @@ static const nir_shader_compiler_options svga_gl4_compiler_options = { static const struct nir_shader_compiler_options * svga_get_compiler_options(struct pipe_screen *pscreen, - enum pipe_shader_type shader) + mesa_shader_stage shader) { struct svga_screen *svgascreen = svga_screen(pscreen); struct svga_winsys_screen *sws = svgascreen->sws; diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c index 19fbe3b0734..293d82b467d 100644 --- a/src/gallium/drivers/svga/svga_shader.c +++ b/src/gallium/drivers/svga/svga_shader.c @@ -256,7 +256,7 @@ isValidSampleCFormat(enum pipe_format format) */ void svga_init_shader_key_common(const struct svga_context *svga, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, const struct svga_shader *shader, struct svga_compile_key *key) { @@ -771,7 +771,7 @@ svga_set_shader(struct svga_context *svga, struct svga_shader_variant * -svga_new_shader_variant(struct svga_context *svga, enum pipe_shader_type type) +svga_new_shader_variant(struct svga_context *svga, mesa_shader_stage type) { struct svga_shader_variant *variant; @@ -914,7 +914,7 @@ svga_rebind_shaders(struct svga_context *svga) struct svga_shader * svga_create_shader(struct pipe_context *pipe, const struct pipe_shader_state *templ, - enum pipe_shader_type stage, + mesa_shader_stage stage, unsigned shader_structlen) { struct svga_context *svga = svga_context(pipe); diff --git a/src/gallium/drivers/svga/svga_shader.h b/src/gallium/drivers/svga/svga_shader.h index 6eafa0ce1c4..ec81d7be335 100644 --- a/src/gallium/drivers/svga/svga_shader.h +++ b/src/gallium/drivers/svga/svga_shader.h @@ -339,7 +339,7 @@ struct svga_shader_info struct svga_shader { enum pipe_shader_ir type; /* IR type */ - enum pipe_shader_type stage; /* shader stage */ + mesa_shader_stage stage; /* shader stage */ struct svga_shader_info info; /* shader info */ @@ -461,7 +461,7 @@ svga_remap_generic_index(int8_t remap_table[MAX_GENERIC_VARYING], void svga_init_shader_key_common(const struct svga_context *svga, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, const struct svga_shader *shader, struct svga_compile_key *key); @@ -476,7 +476,7 @@ svga_search_shader_token_key(struct svga_shader *shader, struct svga_shader * svga_create_shader(struct pipe_context *pipe, const struct pipe_shader_state *templ, - enum pipe_shader_type stage, + mesa_shader_stage stage, unsigned len); enum pipe_error @@ -495,7 +495,7 @@ svga_set_shader(struct svga_context *svga, struct svga_shader_variant *variant); struct svga_shader_variant * -svga_new_shader_variant(struct svga_context *svga, enum pipe_shader_type type); +svga_new_shader_variant(struct svga_context *svga, mesa_shader_stage type); void svga_destroy_shader_variant(struct svga_context *svga, @@ -529,7 +529,7 @@ svga_shader_too_large(const struct svga_context *svga, * Convert from PIPE_SHADER_* to SVGA3D_SHADERTYPE_* */ static inline SVGA3dShaderType -svga_shader_type(enum pipe_shader_type shader) +svga_shader_type(mesa_shader_stage shader) { switch (shader) { case MESA_SHADER_VERTEX: diff --git a/src/gallium/drivers/svga/svga_shader_buffer.c b/src/gallium/drivers/svga/svga_shader_buffer.c index aed21bb6db8..577d9222d60 100644 --- a/src/gallium/drivers/svga/svga_shader_buffer.c +++ b/src/gallium/drivers/svga/svga_shader_buffer.c @@ -65,7 +65,7 @@ svga_create_uav_buffer(struct svga_context *svga, */ static void svga_set_shader_buffers(struct pipe_context *pipe, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned num, const struct pipe_shader_buffer *buffers, unsigned writeable_bitmask) @@ -334,7 +334,7 @@ svga_validate_shader_buffer_resources(struct svga_context *svga, */ bool svga_shader_buffer_can_use_srv(struct svga_context *svga, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned index, struct svga_shader_buffer *buf) { @@ -355,7 +355,7 @@ svga_shader_buffer_can_use_srv(struct svga_context *svga, */ enum pipe_error svga_shader_buffer_bind_srv(struct svga_context *svga, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned index, struct svga_shader_buffer *buf) { @@ -377,7 +377,7 @@ svga_shader_buffer_bind_srv(struct svga_context *svga, */ enum pipe_error svga_shader_buffer_unbind_srv(struct svga_context *svga, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned index, struct svga_shader_buffer *buf) { diff --git a/src/gallium/drivers/svga/svga_shader_buffer.h b/src/gallium/drivers/svga/svga_shader_buffer.h index ea05d1f7518..a6c4774ae97 100644 --- a/src/gallium/drivers/svga/svga_shader_buffer.h +++ b/src/gallium/drivers/svga/svga_shader_buffer.h @@ -39,26 +39,26 @@ svga_uav_cache_purge_buffers(struct svga_context *svga); bool svga_shader_buffer_can_use_srv(struct svga_context *svga, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned index, struct svga_shader_buffer *buffer); enum pipe_error svga_shader_buffer_bind_srv(struct svga_context *svga, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned index, struct svga_shader_buffer *buffer); enum pipe_error svga_shader_buffer_unbind_srv(struct svga_context *svga, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned index, struct svga_shader_buffer *buffer); enum pipe_error svga_emit_rawbuf(struct svga_context *svga, unsigned slot, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned buffer_offset, unsigned buffer_size, void *buffer); diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c index 8b250b27bac..6ebdf88160d 100644 --- a/src/gallium/drivers/svga/svga_state_constants.c +++ b/src/gallium/drivers/svga/svga_state_constants.c @@ -26,7 +26,7 @@ static unsigned svga_get_image_size_constant(const struct svga_context *svga, float **dest, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned num_image_views, const struct svga_image_view images[MESA_SHADER_STAGES][SVGA_MAX_IMAGES]) { @@ -84,7 +84,7 @@ svga_get_image_size_constant(const struct svga_context *svga, float **dest, static unsigned svga_get_extra_constants_common(const struct svga_context *svga, const struct svga_shader_variant *variant, - enum pipe_shader_type shader, float *dest) + mesa_shader_stage shader, float *dest) { uint32_t *dest_u = (uint32_t *) dest; // uint version of dest unsigned count = 0; @@ -400,7 +400,7 @@ svga_get_extra_cs_constants(struct svga_context *svga, float *dest) */ static enum pipe_error emit_const_range(struct svga_context *svga, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned offset, unsigned count, const float (*values)[4]) @@ -522,7 +522,7 @@ emit_const_range(struct svga_context *svga, * On VGPU10, emit_consts_vgpu10 is used instead. */ static enum pipe_error -emit_consts_vgpu9(struct svga_context *svga, enum pipe_shader_type shader) +emit_consts_vgpu9(struct svga_context *svga, mesa_shader_stage shader) { const struct pipe_constant_buffer *cbuf; struct pipe_transfer *transfer = NULL; @@ -625,7 +625,7 @@ svga_destroy_rawbuf_srv(struct svga_context *svga) enum pipe_error svga_emit_rawbuf(struct svga_context *svga, unsigned slot, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned buffer_offset, unsigned buffer_size, void *buffer) @@ -723,7 +723,7 @@ done: static enum pipe_error emit_constbuf(struct svga_context *svga, unsigned slot, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned buffer_offset, unsigned buffer_size, const void *buffer, @@ -875,7 +875,7 @@ emit_constbuf(struct svga_context *svga, /* For constbuf 0 */ static enum pipe_error -emit_consts_vgpu10(struct svga_context *svga, enum pipe_shader_type shader) +emit_consts_vgpu10(struct svga_context *svga, mesa_shader_stage shader) { const struct pipe_constant_buffer *cbuf; enum pipe_error ret = PIPE_OK; @@ -952,7 +952,7 @@ emit_consts_vgpu10(struct svga_context *svga, enum pipe_shader_type shader) static enum pipe_error -emit_constbuf_vgpu10(struct svga_context *svga, enum pipe_shader_type shader) +emit_constbuf_vgpu10(struct svga_context *svga, mesa_shader_stage shader) { enum pipe_error ret = PIPE_OK; unsigned dirty_constbufs; @@ -1418,7 +1418,7 @@ struct svga_tracked_state svga_hw_cs_constbufs = * A helper function to update the rawbuf for constbuf mask */ static void -update_rawbuf_mask(struct svga_context *svga, enum pipe_shader_type shader) +update_rawbuf_mask(struct svga_context *svga, mesa_shader_stage shader) { unsigned dirty_constbufs; unsigned enabled_constbufs; @@ -1457,7 +1457,7 @@ update_rawbuf(struct svga_context *svga, uint64 dirty) SVGA_NEW_TES_RAW_BUFFER, /* MESA_SHADER_TESS_EVAL */ }; - for (enum pipe_shader_type shader = MESA_SHADER_VERTEX; + for (mesa_shader_stage shader = MESA_SHADER_VERTEX; shader < MESA_SHADER_COMPUTE; shader++) { unsigned rawbuf_mask = svga->state.raw_constbufs[shader]; unsigned rawbuf_sbuf_mask = svga->state.raw_shaderbufs[shader]; diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index 07b8d23a2f3..1b1274ad7cf 100644 --- a/src/gallium/drivers/svga/svga_state_fs.c +++ b/src/gallium/drivers/svga/svga_state_fs.c @@ -101,7 +101,7 @@ make_fs_key(const struct svga_context *svga, struct svga_fragment_shader *fs, struct svga_compile_key *key) { - const enum pipe_shader_type shader = MESA_SHADER_FRAGMENT; + const mesa_shader_stage shader = MESA_SHADER_FRAGMENT; unsigned i; memset(key, 0, sizeof *key); diff --git a/src/gallium/drivers/svga/svga_state_sampler.c b/src/gallium/drivers/svga/svga_state_sampler.c index c70aa39b1e6..708a80ff71d 100644 --- a/src/gallium/drivers/svga/svga_state_sampler.c +++ b/src/gallium/drivers/svga/svga_state_sampler.c @@ -49,7 +49,7 @@ svga_resource_handle(struct pipe_resource *res) bool svga_check_sampler_view_resource_collision(const struct svga_context *svga, const struct svga_winsys_surface *res, - enum pipe_shader_type shader) + mesa_shader_stage shader) { struct pipe_screen *screen = svga->pipe.screen; unsigned i; @@ -80,7 +80,7 @@ svga_check_sampler_view_resource_collision(const struct svga_context *svga, */ bool svga_check_sampler_framebuffer_resource_collision(struct svga_context *svga, - enum pipe_shader_type shader) + mesa_shader_stage shader) { struct svga_surface *surf; unsigned i; @@ -227,7 +227,7 @@ static enum pipe_error update_sampler_resources(struct svga_context *svga, uint64_t dirty) { enum pipe_error ret = PIPE_OK; - enum pipe_shader_type shader; + mesa_shader_stage shader; assert(svga_have_vgpu10(svga)); @@ -378,7 +378,7 @@ static enum pipe_error update_samplers(struct svga_context *svga, uint64_t dirty ) { enum pipe_error ret = PIPE_OK; - enum pipe_shader_type shader; + mesa_shader_stage shader; assert(svga_have_vgpu10(svga)); @@ -527,7 +527,7 @@ static enum pipe_error update_cs_sampler_resources(struct svga_context *svga, uint64_t dirty) { enum pipe_error ret = PIPE_OK; - enum pipe_shader_type shader = MESA_SHADER_COMPUTE; + mesa_shader_stage shader = MESA_SHADER_COMPUTE; assert(svga_have_sm5(svga)); @@ -649,7 +649,7 @@ static enum pipe_error update_cs_samplers(struct svga_context *svga, uint64_t dirty ) { enum pipe_error ret = PIPE_OK; - enum pipe_shader_type shader = MESA_SHADER_COMPUTE; + mesa_shader_stage shader = MESA_SHADER_COMPUTE; assert(svga_have_sm5(svga)); diff --git a/src/gallium/drivers/svga/svga_state_tgsi_transform.c b/src/gallium/drivers/svga/svga_state_tgsi_transform.c index 551ee94ffd9..0497de7a4c5 100644 --- a/src/gallium/drivers/svga/svga_state_tgsi_transform.c +++ b/src/gallium/drivers/svga/svga_state_tgsi_transform.c @@ -46,7 +46,7 @@ insert_at_head(struct svga_shader *head, struct svga_shader *shader) */ static void bind_shader(struct svga_context *svga, - const enum pipe_shader_type shader_type, + const mesa_shader_stage shader_type, struct svga_shader *shader) { switch (shader_type) { @@ -82,7 +82,7 @@ bind_shader(struct svga_context *svga, */ static void * create_shader(struct svga_context *svga, - const enum pipe_shader_type shader_type, + const mesa_shader_stage shader_type, struct pipe_shader_state *state) { switch (shader_type) { diff --git a/src/gallium/drivers/svga/svga_state_tss.c b/src/gallium/drivers/svga/svga_state_tss.c index 04f0c910e7d..1644dacf379 100644 --- a/src/gallium/drivers/svga/svga_state_tss.c +++ b/src/gallium/drivers/svga/svga_state_tss.c @@ -25,7 +25,7 @@ void svga_cleanup_tss_binding(struct svga_context *svga) { - const enum pipe_shader_type shader = MESA_SHADER_FRAGMENT; + const mesa_shader_stage shader = MESA_SHADER_FRAGMENT; unsigned i; for (i = 0; i < ARRAY_SIZE(svga->state.hw_draw.views); i++) { @@ -123,7 +123,7 @@ emit_tex_binding_unit(struct svga_context *svga, static enum pipe_error update_tss_binding(struct svga_context *svga, uint64_t dirty ) { - const enum pipe_shader_type shader = MESA_SHADER_FRAGMENT; + const mesa_shader_stage shader = MESA_SHADER_FRAGMENT; bool reemit = svga->rebind.flags.texture_samplers; unsigned i; unsigned count = MAX2(svga->curr.num_sampler_views[shader], @@ -365,7 +365,7 @@ emit_tss_unit(struct svga_context *svga, unsigned unit, static enum pipe_error update_tss(struct svga_context *svga, uint64_t dirty ) { - const enum pipe_shader_type shader = MESA_SHADER_FRAGMENT; + const mesa_shader_stage shader = MESA_SHADER_FRAGMENT; unsigned i; struct ts_queue queue; diff --git a/src/gallium/drivers/svga/svga_state_uav.c b/src/gallium/drivers/svga/svga_state_uav.c index d18819fa4f3..e437b00075e 100644 --- a/src/gallium/drivers/svga/svga_state_uav.c +++ b/src/gallium/drivers/svga/svga_state_uav.c @@ -335,7 +335,7 @@ svga_create_uav_list(struct svga_context *svga, SVGA3dUAViewId *uaViewIds, struct svga_winsys_surface **uaViews) { - enum pipe_shader_type first_shader, last_shader; + mesa_shader_stage first_shader, last_shader; struct svga_uav *uav; int uav_index = -1; @@ -350,7 +350,7 @@ svga_create_uav_list(struct svga_context *svga, last_shader = first_shader + 1; } - for (enum pipe_shader_type shader = first_shader; + for (mesa_shader_stage shader = first_shader; shader < last_shader; shader++) { unsigned num_image_views = svga->curr.num_image_views[shader]; @@ -589,7 +589,7 @@ svga_save_uav_state(struct svga_context *svga, SVGA3dUAViewId *uaViewIds, struct svga_winsys_surface **uaViews) { - enum pipe_shader_type first_shader, last_shader; + mesa_shader_stage first_shader, last_shader; unsigned i; if (pipe_type == SVGA_PIPE_GRAPHICS) { @@ -600,7 +600,7 @@ svga_save_uav_state(struct svga_context *svga, last_shader = first_shader + 1; } - for (enum pipe_shader_type shader = first_shader; + for (mesa_shader_stage shader = first_shader; shader < last_shader; shader++) { /** @@ -702,7 +702,7 @@ need_to_set_uav(struct svga_context *svga, return true; /* If image views are different */ - for (enum pipe_shader_type shader = MESA_SHADER_VERTEX; + for (mesa_shader_stage shader = MESA_SHADER_VERTEX; shader < MESA_SHADER_COMPUTE; shader++) { unsigned num_image_views = svga->curr.num_image_views[shader]; if ((num_image_views != svga->state.hw_draw.num_image_views[shader]) || @@ -811,7 +811,7 @@ need_to_set_cs_uav(struct svga_context *svga, SVGA3dUAViewId *uaViewIds, struct svga_winsys_surface **uaViews) { - enum pipe_shader_type shader = MESA_SHADER_COMPUTE; + mesa_shader_stage shader = MESA_SHADER_COMPUTE; if (svga->state.hw_draw.num_cs_uavs != num_uavs) return true; diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index d100a8dcccc..119457592c6 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -506,7 +506,7 @@ struct pipe_surface * svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s) { enum pipe_error ret = PIPE_OK; - enum pipe_shader_type shader; + mesa_shader_stage shader; assert(svga_have_vgpu10(svga)); assert(s); diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c index 202af324fe2..769e2da0550 100644 --- a/src/gallium/drivers/svga/svga_tgsi.c +++ b/src/gallium/drivers/svga/svga_tgsi.c @@ -150,7 +150,7 @@ struct svga_shader_variant * svga_tgsi_vgpu9_translate(struct svga_context *svga, const struct svga_shader *shader, const struct svga_compile_key *key, - enum pipe_shader_type unit) + mesa_shader_stage unit) { struct svga_shader_variant *variant = NULL; struct svga_shader_emitter emit; diff --git a/src/gallium/drivers/svga/svga_tgsi.h b/src/gallium/drivers/svga/svga_tgsi.h index c71e71463e7..69989326031 100644 --- a/src/gallium/drivers/svga/svga_tgsi.h +++ b/src/gallium/drivers/svga/svga_tgsi.h @@ -48,13 +48,13 @@ struct svga_shader_variant * svga_tgsi_vgpu9_translate(struct svga_context *svga, const struct svga_shader *shader, const struct svga_compile_key *key, - enum pipe_shader_type unit); + mesa_shader_stage unit); struct svga_shader_variant * svga_tgsi_vgpu10_translate(struct svga_context *svga, const struct svga_shader *shader, const struct svga_compile_key *key, - enum pipe_shader_type unit); + mesa_shader_stage unit); bool svga_shader_verify(const uint32_t *tokens, unsigned nr_tokens); diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 0a62793e325..f2bf09058f8 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -12822,7 +12822,7 @@ transform_fs_aapoint(struct svga_context *svga, static void compute_input_mapping(struct svga_context *svga, struct svga_shader_emitter_v10 *emit, - enum pipe_shader_type unit) + mesa_shader_stage unit) { struct svga_shader *prevShader = NULL; /* shader in the previous stage */ @@ -12911,7 +12911,7 @@ struct svga_shader_variant * svga_tgsi_vgpu10_translate(struct svga_context *svga, const struct svga_shader *shader, const struct svga_compile_key *key, - enum pipe_shader_type unit) + mesa_shader_stage unit) { struct svga_screen *svgascreen = svga_screen(svga->pipe.screen); struct svga_shader_variant *variant = NULL; diff --git a/src/gallium/drivers/tegra/tegra_context.c b/src/gallium/drivers/tegra/tegra_context.c index a1402db41d5..7f5e6294be4 100644 --- a/src/gallium/drivers/tegra/tegra_context.c +++ b/src/gallium/drivers/tegra/tegra_context.c @@ -210,7 +210,7 @@ tegra_create_sampler_state(struct pipe_context *pcontext, } static void -tegra_bind_sampler_states(struct pipe_context *pcontext, enum pipe_shader_type shader, +tegra_bind_sampler_states(struct pipe_context *pcontext, mesa_shader_stage shader, unsigned start_slot, unsigned num_samplers, void **samplers) { @@ -475,7 +475,7 @@ tegra_set_clip_state(struct pipe_context *pcontext, } static void -tegra_set_constant_buffer(struct pipe_context *pcontext, enum pipe_shader_type shader, +tegra_set_constant_buffer(struct pipe_context *pcontext, mesa_shader_stage shader, unsigned int index, bool take_ownership, const struct pipe_constant_buffer *buf) { @@ -543,7 +543,7 @@ tegra_set_viewport_states(struct pipe_context *pcontext, unsigned start_slot, } static void -tegra_set_sampler_views(struct pipe_context *pcontext, enum pipe_shader_type shader, +tegra_set_sampler_views(struct pipe_context *pcontext, mesa_shader_stage shader, unsigned start_slot, unsigned num_views, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **pviews) @@ -593,7 +593,7 @@ tegra_set_debug_callback(struct pipe_context *pcontext, } static void -tegra_set_shader_buffers(struct pipe_context *pcontext, enum pipe_shader_type shader, +tegra_set_shader_buffers(struct pipe_context *pcontext, mesa_shader_stage shader, unsigned start, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -605,7 +605,7 @@ tegra_set_shader_buffers(struct pipe_context *pcontext, enum pipe_shader_type sh } static void -tegra_set_shader_images(struct pipe_context *pcontext, enum pipe_shader_type shader, +tegra_set_shader_images(struct pipe_context *pcontext, mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index d747aa0b13b..5ab43581f49 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -236,7 +236,7 @@ v3d_ensure_prim_counts_allocated(struct v3d_context *ctx) void v3d_flag_dirty_sampler_state(struct v3d_context *v3d, - enum pipe_shader_type shader) + mesa_shader_stage shader) { switch (shader) { case MESA_SHADER_VERTEX: diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index eae0fa0cee5..460decd397c 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -805,7 +805,7 @@ void v3d_set_shader_uniform_dirty_flags(struct v3d_compiled_shader *shader); struct v3d_cl_reloc v3d_write_uniforms(struct v3d_context *v3d, struct v3d_job *job, struct v3d_compiled_shader *shader, - enum pipe_shader_type stage); + mesa_shader_stage stage); void v3d_flush(struct pipe_context *pctx); void v3d_job_init(struct v3d_context *v3d); @@ -885,7 +885,7 @@ float v3d_get_real_line_width(struct v3d_context *v3d); void v3d_ensure_prim_counts_allocated(struct v3d_context *ctx); void v3d_flag_dirty_sampler_state(struct v3d_context *v3d, - enum pipe_shader_type shader); + mesa_shader_stage shader); void v3d_get_tile_buffer_size(const struct v3d_device_info *devinfo, bool is_msaa, diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index fc26cdb89ea..ed0455f1fba 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -537,7 +537,7 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen, static const struct nir_shader_compiler_options * v3d_screen_get_compiler_options(struct pipe_screen *pscreen, - enum pipe_shader_type shader) + mesa_shader_stage shader) { struct v3d_screen *screen = v3d_screen(pscreen); const struct v3d_device_info *devinfo = &screen->devinfo; diff --git a/src/gallium/drivers/v3d/v3d_uniforms.c b/src/gallium/drivers/v3d/v3d_uniforms.c index 9a3fdea82a8..eb8c1c58923 100644 --- a/src/gallium/drivers/v3d/v3d_uniforms.c +++ b/src/gallium/drivers/v3d/v3d_uniforms.c @@ -215,7 +215,7 @@ write_tmu_p1(struct v3d_job *job, struct v3d_cl_reloc v3d_write_uniforms(struct v3d_context *v3d, struct v3d_job *job, struct v3d_compiled_shader *shader, - enum pipe_shader_type stage) + mesa_shader_stage stage) { struct v3d_device_info *devinfo = &v3d->screen->devinfo; struct v3d_constbuf_stateobj *cb = &v3d->constbuf[stage]; diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 139f15e7fc4..dfb30359864 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -129,7 +129,7 @@ v3d_start_draw(struct v3d_context *v3d) static void v3d_predraw_check_stage_inputs(struct pipe_context *pctx, - enum pipe_shader_type s) + mesa_shader_stage s) { struct v3d_context *v3d = v3d_context(pctx); unsigned i; @@ -224,7 +224,7 @@ v3d_predraw_check_outputs(struct pipe_context *pctx) static bool v3d_state_reads_resource(struct v3d_context *v3d, struct pipe_resource *prsc, - enum pipe_shader_type s) + mesa_shader_stage s) { struct v3d_resource *rsc = v3d_resource(prsc); unsigned i; diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index 979a48a8f72..e8b0034c57a 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -483,7 +483,7 @@ v3d_vertex_state_bind(struct pipe_context *pctx, void *hwcso) } static void -v3d_set_constant_buffer(struct pipe_context *pctx, enum pipe_shader_type shader, uint index, +v3d_set_constant_buffer(struct pipe_context *pctx, mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -809,7 +809,7 @@ v3d_create_sampler_state(struct pipe_context *pctx, static void v3d_sampler_states_bind(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned nr, void **hwcso) { struct v3d_context *v3d = v3d_context(pctx); @@ -1182,7 +1182,7 @@ v3d_sampler_view_destroy(struct pipe_context *pctx, static void v3d_set_sampler_views(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) @@ -1296,7 +1296,7 @@ v3d_set_stream_output_targets(struct pipe_context *pctx, static void v3d_set_shader_buffers(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -1381,7 +1381,7 @@ v3d_create_image_view_texture_shader_state(struct v3d_context *v3d, static void v3d_set_shader_images(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index cfa487e4bff..2aacd0bcd98 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -2187,7 +2187,7 @@ static const nir_shader_compiler_options nir_options = { const struct nir_shader_compiler_options * vc4_screen_get_compiler_options(struct pipe_screen *pscreen, - enum pipe_shader_type shader) + mesa_shader_stage shader) { return &nir_options; } diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h index 633f1cb15a1..f8a89d87986 100644 --- a/src/gallium/drivers/vc4/vc4_screen.h +++ b/src/gallium/drivers/vc4/vc4_screen.h @@ -122,7 +122,7 @@ struct pipe_screen *vc4_screen_create(int fd, const struct nir_shader_compiler_options * vc4_screen_get_compiler_options(struct pipe_screen *pscreen, - enum pipe_shader_type shader); + mesa_shader_stage shader); void vc4_fence_screen_init(struct vc4_screen *screen); diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index 370c6a0a4ca..e677969c87e 100644 --- a/src/gallium/drivers/vc4/vc4_state.c +++ b/src/gallium/drivers/vc4/vc4_state.c @@ -372,7 +372,7 @@ vc4_vertex_state_bind(struct pipe_context *pctx, void *hwcso) static void vc4_set_constant_buffer(struct pipe_context *pctx, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *cb) { @@ -433,7 +433,7 @@ vc4_set_framebuffer_state(struct pipe_context *pctx, } static struct vc4_texture_stateobj * -vc4_get_stage_tex(struct vc4_context *vc4, enum pipe_shader_type shader) +vc4_get_stage_tex(struct vc4_context *vc4, mesa_shader_stage shader) { switch (shader) { case MESA_SHADER_FRAGMENT: @@ -512,7 +512,7 @@ vc4_create_sampler_state(struct pipe_context *pctx, static void vc4_sampler_states_bind(struct pipe_context *pctx, - enum pipe_shader_type shader, unsigned start, + mesa_shader_stage shader, unsigned start, unsigned nr, void **hwcso) { struct vc4_context *vc4 = vc4_context(pctx); @@ -636,7 +636,7 @@ vc4_sampler_view_destroy(struct pipe_context *pctx, static void vc4_set_sampler_views(struct pipe_context *pctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start, unsigned nr, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views) diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 24376590e63..89582c882cc 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -122,7 +122,7 @@ virgl_rebind_resource(struct virgl_context *vctx, if (bind_history & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_SHADER_BUFFER | PIPE_BIND_SHADER_IMAGE)) { - enum pipe_shader_type shader_type; + mesa_shader_stage shader_type; for (shader_type = 0; shader_type < MESA_SHADER_STAGES; shader_type++) { const struct virgl_shader_binding_state *binding = &vctx->shader_bindings[shader_type]; @@ -193,7 +193,7 @@ static void virgl_attach_res_framebuffer(struct virgl_context *vctx) } static void virgl_attach_res_sampler_views(struct virgl_context *vctx, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; const struct virgl_shader_binding_state *binding = @@ -245,7 +245,7 @@ static void virgl_attach_res_so_targets(struct virgl_context *vctx) } static void virgl_attach_res_uniform_buffers(struct virgl_context *vctx, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; const struct virgl_shader_binding_state *binding = @@ -262,7 +262,7 @@ static void virgl_attach_res_uniform_buffers(struct virgl_context *vctx, } static void virgl_attach_res_shader_buffers(struct virgl_context *vctx, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; const struct virgl_shader_binding_state *binding = @@ -279,7 +279,7 @@ static void virgl_attach_res_shader_buffers(struct virgl_context *vctx, } static void virgl_attach_res_shader_images(struct virgl_context *vctx, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; const struct virgl_shader_binding_state *binding = @@ -315,7 +315,7 @@ static void virgl_attach_res_atomic_buffers(struct virgl_context *vctx) */ static void virgl_reemit_draw_resources(struct virgl_context *vctx) { - enum pipe_shader_type shader_type; + mesa_shader_stage shader_type; /* reattach any flushed resources */ /* framebuffer, sampler views, vertex/index/uniform/stream buffers */ @@ -637,7 +637,7 @@ static void virgl_hw_set_index_buffer(struct virgl_context *vctx, } static void virgl_set_constant_buffer(struct pipe_context *ctx, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *buf) { @@ -1163,7 +1163,7 @@ static struct pipe_sampler_view *virgl_create_sampler_view(struct pipe_context * } static void virgl_set_sampler_views(struct pipe_context *ctx, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, unsigned start_slot, unsigned num_views, unsigned unbind_num_trailing_slots, @@ -1240,7 +1240,7 @@ static void virgl_delete_sampler_state(struct pipe_context *ctx, } static void virgl_bind_sampler_states(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned num_samplers, void **samplers) @@ -1385,7 +1385,7 @@ static void virgl_set_hw_atomic_buffers(struct pipe_context *ctx, } static void virgl_set_shader_buffers(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask) @@ -1443,7 +1443,7 @@ static void virgl_fence_server_sync(struct pipe_context *ctx, } static void virgl_set_shader_images(struct pipe_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images) @@ -1564,7 +1564,7 @@ static void virgl_launch_grid(struct pipe_context *ctx, static void virgl_release_shader_binding(struct virgl_context *vctx, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { struct virgl_shader_binding_state *binding = &vctx->shader_bindings[shader_type]; @@ -1604,7 +1604,7 @@ virgl_context_destroy( struct pipe_context *ctx ) { struct virgl_context *vctx = virgl_context(ctx); struct virgl_screen *rs = virgl_screen(ctx->screen); - enum pipe_shader_type shader_type; + mesa_shader_stage shader_type; struct virgl_framebuffer_state *fb = &vctx->framebuffer; for (unsigned i = 0; i < fb->base.nr_cbufs; i++) { diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index 487d4265882..d6b0c3bf9f2 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -749,7 +749,7 @@ static void virgl_emit_shader_streamout(struct virgl_context *ctx, int virgl_encode_shader_state(struct virgl_context *ctx, uint32_t handle, - enum pipe_shader_type type, + mesa_shader_stage type, const struct pipe_stream_output_info *so_info, uint32_t cs_req_local_mem, const struct tgsi_token *tokens) @@ -1192,7 +1192,7 @@ int virgl_encode_sampler_view(struct virgl_context *ctx, } int virgl_encode_set_sampler_views(struct virgl_context *ctx, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, uint32_t start_slot, uint32_t num_views, struct virgl_sampler_view **views) @@ -1209,7 +1209,7 @@ int virgl_encode_set_sampler_views(struct virgl_context *ctx, } int virgl_encode_bind_sampler_states(struct virgl_context *ctx, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, uint32_t start_slot, uint32_t num_handles, uint32_t *handles) @@ -1224,7 +1224,7 @@ int virgl_encode_bind_sampler_states(struct virgl_context *ctx, } int virgl_encoder_write_constant_buffer(struct virgl_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint32_t index, uint32_t size, const void *data) @@ -1238,7 +1238,7 @@ int virgl_encoder_write_constant_buffer(struct virgl_context *ctx, } int virgl_encoder_set_uniform_buffer(struct virgl_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint32_t index, uint32_t offset, uint32_t length, @@ -1489,7 +1489,7 @@ int virgl_encode_link_shader(struct virgl_context *ctx, uint32_t *handles) int virgl_encode_bind_shader(struct virgl_context *ctx, uint32_t handle, - enum pipe_shader_type type) + mesa_shader_stage type) { virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_BIND_SHADER, 0, 2)); virgl_encoder_write_dword(ctx->cbuf, handle); @@ -1511,7 +1511,7 @@ int virgl_encode_set_tess_state(struct virgl_context *ctx, } int virgl_encode_set_shader_buffers(struct virgl_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers) { @@ -1567,7 +1567,7 @@ int virgl_encode_set_hw_atomic_buffers(struct virgl_context *ctx, } int virgl_encode_set_shader_images(struct virgl_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_image_view *images) { diff --git a/src/gallium/drivers/virgl/virgl_encode.h b/src/gallium/drivers/virgl/virgl_encode.h index d0808d393a0..54dcb94fa9c 100644 --- a/src/gallium/drivers/virgl/virgl_encode.h +++ b/src/gallium/drivers/virgl/virgl_encode.h @@ -83,7 +83,7 @@ extern int virgl_encode_rasterizer_state(struct virgl_context *ctx, extern int virgl_encode_shader_state(struct virgl_context *ctx, uint32_t handle, - enum pipe_shader_type type, + mesa_shader_stage type, const struct pipe_stream_output_info *so_info, uint32_t cs_req_local_mem, const struct tgsi_token *tokens); @@ -160,13 +160,13 @@ int virgl_encode_sampler_view(struct virgl_context *ctx, const struct pipe_sampler_view *state); int virgl_encode_set_sampler_views(struct virgl_context *ctx, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, uint32_t start_slot, uint32_t num_views, struct virgl_sampler_view **views); int virgl_encode_bind_sampler_states(struct virgl_context *ctx, - enum pipe_shader_type shader_type, + mesa_shader_stage shader_type, uint32_t start_slot, uint32_t num_handles, uint32_t *handles); @@ -177,13 +177,13 @@ int virgl_encoder_set_index_buffer(struct virgl_context *ctx, uint32_t virgl_object_assign_handle(void); int virgl_encoder_write_constant_buffer(struct virgl_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint32_t index, uint32_t size, const void *data); int virgl_encoder_set_uniform_buffer(struct virgl_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint32_t index, uint32_t offset, uint32_t length, @@ -254,18 +254,18 @@ int virgl_encode_link_shader(struct virgl_context *ctx, uint32_t *handles); int virgl_encode_bind_shader(struct virgl_context *ctx, uint32_t handle, - enum pipe_shader_type type); + mesa_shader_stage type); int virgl_encode_set_tess_state(struct virgl_context *ctx, const float outer[4], const float inner[2]); int virgl_encode_set_shader_buffers(struct virgl_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers); int virgl_encode_set_shader_images(struct virgl_context *ctx, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_image_view *images); int virgl_encode_set_hw_atomic_buffers(struct virgl_context *ctx, diff --git a/src/gallium/drivers/virgl/virgl_screen.h b/src/gallium/drivers/virgl/virgl_screen.h index fa36439dbcc..d29572529c0 100644 --- a/src/gallium/drivers/virgl/virgl_screen.h +++ b/src/gallium/drivers/virgl/virgl_screen.h @@ -90,7 +90,7 @@ virgl_has_scanout_format(struct virgl_screen *vscreen, bool may_emulate_bgra); static inline enum virgl_shader_stage -virgl_shader_stage_convert(enum pipe_shader_type type) +virgl_shader_stage_convert(mesa_shader_stage type) { switch (type) { case MESA_SHADER_VERTEX: diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index 4e39dd462e5..6cbbd7e5203 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -2559,7 +2559,7 @@ zink_set_primitive_emulation_keys(struct zink_context *ctx) if (lower_line_stipple || lower_line_smooth || lower_edge_flags || lower_quad_prim || lower_pv_mode || zink_get_gs_key(ctx)->lower_gl_point) { - enum pipe_shader_type prev_vertex_stage = + mesa_shader_stage prev_vertex_stage = ctx->gfx_stages[MESA_SHADER_TESS_EVAL] ? MESA_SHADER_TESS_EVAL : MESA_SHADER_VERTEX; enum zink_rast_prim zink_prim_type = diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index b6692b09119..b289ad2aafe 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -248,7 +248,7 @@ zink_set_max_shader_compiler_threads(struct pipe_screen *pscreen, unsigned max_t } static bool -zink_is_parallel_shader_compilation_finished(struct pipe_screen *screen, void *shader, enum pipe_shader_type shader_type) +zink_is_parallel_shader_compilation_finished(struct pipe_screen *screen, void *shader, mesa_shader_stage shader_type) { if (shader_type == MESA_SHADER_COMPUTE) { struct zink_program *pg = shader; diff --git a/src/gallium/frontends/d3d10umd/Shader.cpp b/src/gallium/frontends/d3d10umd/Shader.cpp index b2fa899341d..5f9171af156 100644 --- a/src/gallium/frontends/d3d10umd/Shader.cpp +++ b/src/gallium/frontends/d3d10umd/Shader.cpp @@ -57,7 +57,7 @@ void * CreateEmptyShader(Device *pDevice, - enum pipe_shader_type processor) + mesa_shader_stage processor) { struct pipe_context *pipe = pDevice->pipe; struct ureg_program *ureg; @@ -119,7 +119,7 @@ CreateEmptyShader(Device *pDevice, void DeleteEmptyShader(Device *pDevice, - enum pipe_shader_type processor, void *handle) + mesa_shader_stage processor, void *handle) { struct pipe_context *pipe = pDevice->pipe; @@ -156,7 +156,7 @@ DeleteEmptyShader(Device *pDevice, */ static void -SetConstantBuffers(enum pipe_shader_type shader_type, // IN +SetConstantBuffers(mesa_shader_stage shader_type, // IN D3D10DDI_HDEVICE hDevice, // IN UINT StartBuffer, // IN UINT NumBuffers, // IN @@ -191,7 +191,7 @@ SetConstantBuffers(enum pipe_shader_type shader_type, // IN */ static void -SetSamplers(enum pipe_shader_type shader_type, // IN +SetSamplers(mesa_shader_stage shader_type, // IN D3D10DDI_HDEVICE hDevice, // IN UINT Offset, // IN UINT NumSamplers, // IN @@ -221,7 +221,7 @@ SetSamplers(enum pipe_shader_type shader_type, // IN */ static void -SetShaderResources(enum pipe_shader_type shader_type, // IN +SetShaderResources(mesa_shader_stage shader_type, // IN D3D10DDI_HDEVICE hDevice, // IN UINT Offset, // IN UINT NumViews, // IN diff --git a/src/gallium/frontends/d3d10umd/Shader.h b/src/gallium/frontends/d3d10umd/Shader.h index ac64f3681a1..0da65301f52 100644 --- a/src/gallium/frontends/d3d10umd/Shader.h +++ b/src/gallium/frontends/d3d10umd/Shader.h @@ -40,11 +40,11 @@ struct Shader; void * CreateEmptyShader(Device *pDevice, - enum pipe_shader_type processor); + mesa_shader_stage processor); void DeleteEmptyShader(Device *pDevice, - enum pipe_shader_type processor, void *handle); + mesa_shader_stage processor, void *handle); unsigned ShaderFindOutputMapping(Shader *shader, unsigned registerIndex); diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index d8815c9debb..22b0f9463aa 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -308,7 +308,7 @@ assert_memhandle_type(VkExternalMemoryHandleTypeFlags types) } static unsigned min_shader_cap(struct pipe_screen *pscreen, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned cap_offset) { unsigned val = UINT_MAX; diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index dcbebe99333..76d7b149dc9 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -284,7 +284,7 @@ static void finish_fence(struct rendering_state *state) } static unsigned -get_pcbuf_size(struct rendering_state *state, enum pipe_shader_type pstage) +get_pcbuf_size(struct rendering_state *state, mesa_shader_stage pstage) { enum lvp_pipeline_type type = ffs(lvp_pipeline_types_from_shader_stages(mesa_to_vk_shader_stage(pstage))) - 1; @@ -292,8 +292,8 @@ get_pcbuf_size(struct rendering_state *state, enum pipe_shader_type pstage) } static void -update_pcbuf(struct rendering_state *state, enum pipe_shader_type pstage, - enum pipe_shader_type api_stage) +update_pcbuf(struct rendering_state *state, mesa_shader_stage pstage, + mesa_shader_stage api_stage) { unsigned size = get_pcbuf_size(state, api_stage); if (size) { diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs index 457162ba9c2..4d5d1a6bd16 100644 --- a/src/gallium/frontends/rusticl/core/device.rs +++ b/src/gallium/frontends/rusticl/core/device.rs @@ -113,7 +113,7 @@ impl DeviceCaps { } fn shader_caps(screen: &PipeScreen) -> &pipe_shader_caps { - screen.shader_caps(pipe_shader_type::MESA_SHADER_COMPUTE) + screen.shader_caps(mesa_shader_stage::MESA_SHADER_COMPUTE) } } @@ -777,7 +777,7 @@ impl DeviceBase { fn shader_caps(&self) -> &pipe_shader_caps { self.screen - .shader_caps(pipe_shader_type::MESA_SHADER_COMPUTE) + .shader_caps(mesa_shader_stage::MESA_SHADER_COMPUTE) } pub fn address_bits(&self) -> cl_uint { @@ -892,7 +892,7 @@ impl DeviceBase { unsafe { *self .screen - .nir_shader_compiler_options(pipe_shader_type::MESA_SHADER_COMPUTE) + .nir_shader_compiler_options(mesa_shader_stage::MESA_SHADER_COMPUTE) } } @@ -1351,7 +1351,7 @@ impl Device { fn check_valid(screen: &PipeScreen) -> bool { if !screen.caps().compute || screen - .shader_caps(pipe_shader_type::MESA_SHADER_COMPUTE) + .shader_caps(mesa_shader_stage::MESA_SHADER_COMPUTE) .supported_irs & (1 << (pipe_shader_ir::PIPE_SHADER_IR_NIR as i32)) == 0 @@ -1362,7 +1362,7 @@ impl Device { // CL_DEVICE_MAX_PARAMETER_SIZE // For this minimum value, only a maximum of 128 arguments can be passed to a kernel if screen - .shader_caps(pipe_shader_type::MESA_SHADER_COMPUTE) + .shader_caps(mesa_shader_stage::MESA_SHADER_COMPUTE) .max_const_buffer0_size < 128 { diff --git a/src/gallium/frontends/rusticl/core/kernel.rs b/src/gallium/frontends/rusticl/core/kernel.rs index 16a998bf42c..43a0e0d3531 100644 --- a/src/gallium/frontends/rusticl/core/kernel.rs +++ b/src/gallium/frontends/rusticl/core/kernel.rs @@ -553,7 +553,7 @@ impl CompilationResult { let nir = NirShader::deserialize( reader, d.screen() - .nir_shader_compiler_options(pipe_shader_type::MESA_SHADER_COMPUTE), + .nir_shader_compiler_options(mesa_shader_stage::MESA_SHADER_COMPUTE), )?; let compiled_args = CompiledKernelArg::deserialize(reader)?; @@ -573,7 +573,7 @@ fn opt_nir(nir: &mut NirShader, dev: &Device, has_explicit_types: bool) { let nir_options = unsafe { &*dev .screen - .nir_shader_compiler_options(pipe_shader_type::MESA_SHADER_COMPUTE) + .nir_shader_compiler_options(mesa_shader_stage::MESA_SHADER_COMPUTE) }; while { @@ -813,7 +813,7 @@ fn compile_nir_variant( let nir_options = unsafe { &*dev .screen - .nir_shader_compiler_options(pipe_shader_type::MESA_SHADER_COMPUTE) + .nir_shader_compiler_options(mesa_shader_stage::MESA_SHADER_COMPUTE) }; if variant == NirKernelVariant::Optimized { diff --git a/src/gallium/frontends/rusticl/core/program.rs b/src/gallium/frontends/rusticl/core/program.rs index 29435f4bc0e..78b9063aa8e 100644 --- a/src/gallium/frontends/rusticl/core/program.rs +++ b/src/gallium/frontends/rusticl/core/program.rs @@ -214,7 +214,7 @@ impl ProgramBuild { let nir = info.spirv.as_ref().unwrap().to_nir( kernel, d.screen - .nir_shader_compiler_options(pipe_shader_type::MESA_SHADER_COMPUTE), + .nir_shader_compiler_options(mesa_shader_stage::MESA_SHADER_COMPUTE), &d.spirv_caps, &d.lib_clc, &mut spec_constants, diff --git a/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs b/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs index 8e54b391a8d..22860cfa483 100644 --- a/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs +++ b/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs @@ -350,7 +350,8 @@ impl SPIRVBin { } pub fn get_lib_clc(screen: &PipeScreen, spirv_caps: &spirv_capabilities) -> Option { - let nir_options = screen.nir_shader_compiler_options(pipe_shader_type::MESA_SHADER_COMPUTE); + let nir_options = + screen.nir_shader_compiler_options(mesa_shader_stage::MESA_SHADER_COMPUTE); let address_bits = screen.compute_caps().address_bits; let spirv_options = Self::get_spirv_options(false, ptr::null(), address_bits, spirv_caps, None); diff --git a/src/gallium/frontends/rusticl/mesa/pipe/context.rs b/src/gallium/frontends/rusticl/mesa/pipe/context.rs index 57b4726644b..dd5f752c5bb 100644 --- a/src/gallium/frontends/rusticl/mesa/pipe/context.rs +++ b/src/gallium/frontends/rusticl/mesa/pipe/context.rs @@ -394,7 +394,7 @@ impl PipeContext { unsafe { self.pipe.as_ref().bind_sampler_states.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, 0, samplers.len() as u32, samplers.as_mut_ptr(), @@ -407,7 +407,7 @@ impl PipeContext { unsafe { self.pipe.as_ref().bind_sampler_states.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, 0, count, samplers.as_mut_ptr(), @@ -429,7 +429,7 @@ impl PipeContext { unsafe { self.pipe.as_ref().set_constant_buffer.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, idx, false, &cb, @@ -447,7 +447,7 @@ impl PipeContext { unsafe { self.pipe.as_ref().set_constant_buffer.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, idx, false, if data.is_empty() { ptr::null() } else { &cb }, @@ -484,7 +484,7 @@ impl PipeContext { self.pipe.as_ref().set_constant_buffer.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, idx, true, &cb, @@ -544,7 +544,7 @@ impl PipeContext { unsafe { self.pipe.as_ref().set_sampler_views.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, 0, views.len() as u32, unbind_trailing, @@ -558,7 +558,7 @@ impl PipeContext { unsafe { self.pipe.as_ref().set_sampler_views.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, 0, count, 0, @@ -572,7 +572,7 @@ impl PipeContext { unsafe { self.pipe.as_ref().set_shader_images.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, 0, images.len() as u32, unbind_trailing, @@ -585,7 +585,7 @@ impl PipeContext { unsafe { self.pipe.as_ref().set_shader_images.unwrap()( self.pipe.as_ptr(), - pipe_shader_type::MESA_SHADER_COMPUTE, + mesa_shader_stage::MESA_SHADER_COMPUTE, 0, count, 0, diff --git a/src/gallium/frontends/rusticl/mesa/pipe/screen.rs b/src/gallium/frontends/rusticl/mesa/pipe/screen.rs index 42320905991..7139bcf7582 100644 --- a/src/gallium/frontends/rusticl/mesa/pipe/screen.rs +++ b/src/gallium/frontends/rusticl/mesa/pipe/screen.rs @@ -293,7 +293,7 @@ impl PipeScreen { } } - pub fn shader_caps(&self, t: pipe_shader_type) -> &pipe_shader_caps { + pub fn shader_caps(&self, t: mesa_shader_stage) -> &pipe_shader_caps { &self.screen().shader_caps[t as usize] } @@ -412,7 +412,7 @@ impl PipeScreen { pub fn nir_shader_compiler_options( &self, - shader: pipe_shader_type, + shader: mesa_shader_stage, ) -> *const nir_shader_compiler_options { self.screen().nir_options[shader as usize] } diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index df88099590f..79a9d5124c3 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -367,7 +367,7 @@ struct pipe_context { void * (*create_sampler_state)(struct pipe_context *, const struct pipe_sampler_state *); void (*bind_sampler_states)(struct pipe_context *, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned num_samplers, void **samplers); void (*delete_sampler_state)(struct pipe_context *, void *); @@ -465,7 +465,7 @@ struct pipe_context { * \param buf Constant buffer parameters */ void (*set_constant_buffer)(struct pipe_context *, - enum pipe_shader_type shader, uint index, + mesa_shader_stage shader, uint index, bool take_ownership, const struct pipe_constant_buffer *buf); @@ -486,7 +486,7 @@ struct pipe_context { * fields if they don't want this or if they don't implement this. */ void (*set_inlinable_constants)(struct pipe_context *, - enum pipe_shader_type shader, + mesa_shader_stage shader, uint num_values, uint32_t *values); void (*set_framebuffer_state)(struct pipe_context *, @@ -538,7 +538,7 @@ struct pipe_context { const struct pipe_viewport_state *); void (*set_sampler_views)(struct pipe_context *, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned num_views, unsigned unbind_num_trailing_slots, struct pipe_sampler_view **views); @@ -575,7 +575,7 @@ struct pipe_context { * used with loads. If unsure, set to ~0. */ void (*set_shader_buffers)(struct pipe_context *, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, const struct pipe_shader_buffer *buffers, unsigned writable_bitmask); @@ -612,7 +612,7 @@ struct pipe_context { * be bound. */ void (*set_shader_images)(struct pipe_context *, - enum pipe_shader_type shader, + mesa_shader_stage shader, unsigned start_slot, unsigned count, unsigned unbind_num_trailing_slots, const struct pipe_image_view *images); diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index aecfdec1298..4f1c9d5a5da 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -583,7 +583,7 @@ struct pipe_screen { */ bool (*is_parallel_shader_compilation_finished)(struct pipe_screen *screen, void *shader, - enum pipe_shader_type shader_type); + mesa_shader_stage shader_type); void (*driver_thread_add_job)(struct pipe_screen *screen, void *job, diff --git a/src/mesa/state_tracker/st_atom_atomicbuf.c b/src/mesa/state_tracker/st_atom_atomicbuf.c index 97a8b368f26..72ee15e6161 100644 --- a/src/mesa/state_tracker/st_atom_atomicbuf.c +++ b/src/mesa/state_tracker/st_atom_atomicbuf.c @@ -69,7 +69,7 @@ st_bind_atomics(struct st_context *st, struct gl_program *prog, mesa_shader_stage stage) { unsigned i; - enum pipe_shader_type shader_type = pipe_shader_type_from_mesa(stage); + mesa_shader_stage shader_type = pipe_shader_type_from_mesa(stage); if (!prog || !st->pipe->set_shader_buffers || st->has_hw_atomics) return; diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 65ab497b53b..d79444a3b45 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -52,7 +52,7 @@ * dangling pointers to old (potentially deleted) shaders in the driver. */ static void -st_unbind_unused_cb0(struct st_context *st, enum pipe_shader_type shader_type) +st_unbind_unused_cb0(struct st_context *st, mesa_shader_stage shader_type) { if (st->state.constbuf0_enabled_shader_mask & (1 << shader_type)) { struct pipe_context *pipe = st->pipe; @@ -69,7 +69,7 @@ st_unbind_unused_cb0(struct st_context *st, enum pipe_shader_type shader_type) void st_upload_constants(struct st_context *st, struct gl_program *prog, mesa_shader_stage stage) { - enum pipe_shader_type shader_type = pipe_shader_type_from_mesa(stage); + mesa_shader_stage shader_type = pipe_shader_type_from_mesa(stage); if (!prog) { st_unbind_unused_cb0(st, shader_type); return; @@ -266,7 +266,7 @@ st_update_cs_constants(struct st_context *st) static void st_bind_ubos(struct st_context *st, struct gl_program *prog, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { unsigned i; struct pipe_constant_buffer cb = { 0 }; diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c index cde0e3cf4a4..a7b102ee744 100644 --- a/src/mesa/state_tracker/st_atom_image.c +++ b/src/mesa/state_tracker/st_atom_image.c @@ -149,7 +149,7 @@ st_convert_image_from_unit(const struct st_context *st, static void st_bind_images(struct st_context *st, struct gl_program *prog, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { unsigned i; struct pipe_image_view images[MAX_IMAGE_UNIFORMS]; diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index ada28200a32..cf041c6412c 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -213,7 +213,7 @@ st_convert_sampler_from_unit(const struct st_context *st, */ static void update_shader_samplers(struct st_context *st, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, const struct gl_program *prog, struct pipe_sampler_state *samplers, unsigned *out_num_samplers) diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c b/src/mesa/state_tracker/st_atom_storagebuf.c index f4e960ac563..7f8e2b07a0d 100644 --- a/src/mesa/state_tracker/st_atom_storagebuf.c +++ b/src/mesa/state_tracker/st_atom_storagebuf.c @@ -40,7 +40,7 @@ static void st_bind_ssbos(struct st_context *st, struct gl_program *prog, - enum pipe_shader_type shader_type) + mesa_shader_stage shader_type) { unsigned i; struct pipe_shader_buffer buffers[MAX_SHADER_STORAGE_BUFFERS]; diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index ff07bb44068..8cfd54779cb 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -88,7 +88,7 @@ st_update_single_texture(struct st_context *st, unsigned st_get_sampler_views(struct st_context *st, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, const struct gl_program *prog, struct pipe_sampler_view **sampler_views, unsigned *extra_sampler_views) @@ -312,7 +312,7 @@ st_get_sampler_views(struct st_context *st, static void update_textures(struct st_context *st, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, const struct gl_program *prog) { struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS]; diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 0d398d1af37..558a3b2228b 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -209,7 +209,7 @@ st_save_zombie_sampler_view(struct st_context *st, */ void st_save_zombie_shader(struct st_context *st, - enum pipe_shader_type type, + mesa_shader_stage type, struct pipe_shader_state *shader) { struct st_zombie_shader_node *entry; diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 7c32bd3a908..d76c4fe3ffb 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -117,7 +117,7 @@ struct st_zombie_sampler_view_node struct st_zombie_shader_node { void *shader; - enum pipe_shader_type type; + mesa_shader_stage type; struct list_head node; }; @@ -477,7 +477,7 @@ st_save_zombie_sampler_view(struct st_context *st, extern void st_save_zombie_shader(struct st_context *st, - enum pipe_shader_type type, + mesa_shader_stage type, struct pipe_shader_state *shader); diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index ddfa5786cde..c7f3b47fd0b 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -599,7 +599,7 @@ st_link_glsl_to_nir(struct gl_context *ctx, if (shader) { struct gl_program *p = shader->Program; if (p && p->variants) { - enum pipe_shader_type type = pipe_shader_type_from_mesa(shader->Stage); + mesa_shader_stage type = pipe_shader_type_from_mesa(shader->Stage); driver_handles[type] = p->variants->driver_shader; } } diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 037b6db41e4..bdc7b8794fb 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -456,7 +456,7 @@ st_create_color_map_texture(struct gl_context *ctx) */ static void st_destroy_bound_texture_handles_per_stage(struct st_context *st, - enum pipe_shader_type shader) + mesa_shader_stage shader) { struct st_bound_handles *bound_handles = &st->bound_texture_handles[shader]; struct pipe_context *pipe = st->pipe; @@ -496,7 +496,7 @@ st_destroy_bound_texture_handles(struct st_context *st) */ static void st_destroy_bound_image_handles_per_stage(struct st_context *st, - enum pipe_shader_type shader) + mesa_shader_stage shader) { struct st_bound_handles *bound_handles = &st->bound_image_handles[shader]; struct pipe_context *pipe = st->pipe; @@ -581,7 +581,7 @@ void st_make_bound_samplers_resident(struct st_context *st, struct gl_program *prog) { - enum pipe_shader_type shader = pipe_shader_type_from_mesa(prog->info.stage); + mesa_shader_stage shader = pipe_shader_type_from_mesa(prog->info.stage); struct st_bound_handles *bound_handles = &st->bound_texture_handles[shader]; struct pipe_context *pipe = st->pipe; GLuint64 handle; @@ -628,7 +628,7 @@ void st_make_bound_images_resident(struct st_context *st, struct gl_program *prog) { - enum pipe_shader_type shader = pipe_shader_type_from_mesa(prog->info.stage); + mesa_shader_stage shader = pipe_shader_type_from_mesa(prog->info.stage); struct st_bound_handles *bound_handles = &st->bound_image_handles[shader]; struct pipe_context *pipe = st->pipe; GLuint64 handle; diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index be837747b8a..e5734c6931b 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -254,7 +254,7 @@ st_update_single_texture(struct st_context *st, unsigned st_get_sampler_views(struct st_context *st, - enum pipe_shader_type shader_stage, + mesa_shader_stage shader_stage, const struct gl_program *prog, struct pipe_sampler_view **sampler_views, unsigned *extra_sampler_views);