all: rename pipe_shader_type to mesa_shader_stage

Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\benum pipe_shader_type\b/mesa_shader_stage/g' {} +
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\bpipe_shader_type\b/mesa_shader_stage/g' {} +

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569>
This commit is contained in:
Qiang Yu 2025-08-05 16:16:03 +08:00
parent 196569b1a4
commit f972e76148
174 changed files with 529 additions and 529 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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',

View file

@ -49,8 +49,7 @@ extern "C" {
* The GLSL linker assumes that if i<j, then the j-th shader is
* executed later than the i-th shader.
*/
typedef enum pipe_shader_type
{
typedef enum mesa_shader_stage {
MESA_SHADER_NONE = -1,
MESA_SHADER_VERTEX = 0,
PIPE_SHADER_VERTEX = MESA_SHADER_VERTEX,

View file

@ -96,7 +96,7 @@ uint32_t ir3_nir_scan_driver_consts(struct ir3_compiler *compiler,
void ir3_alloc_driver_params(struct ir3_const_allocations *const_alloc,
uint32_t *num_driver_params,
struct ir3_compiler *compiler,
enum pipe_shader_type shader_type);
mesa_shader_stage shader_type);
bool ir3_nir_lower_load_constant(nir_shader *nir, struct ir3_shader_variant *v);
void ir3_nir_analyze_ubo_ranges(nir_shader *nir, struct ir3_shader_variant *v);
bool ir3_nir_lower_ubo_loads(nir_shader *nir, struct ir3_shader_variant *v);

View file

@ -363,7 +363,7 @@ cso_unbind_context(struct cso_context *cso)
static struct pipe_shader_buffer ssbos[PIPE_MAX_SHADER_BUFFERS] = { 0 };
static void *zeros[PIPE_MAX_SAMPLERS] = { NULL };
struct pipe_screen *scr = ctx->base.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)
{

View file

@ -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,

View file

@ -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,

View file

@ -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);

View file

@ -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++) {

View file

@ -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,

View file

@ -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)

View file

@ -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

View file

@ -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;

View file

@ -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];

View file

@ -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;
}

View file

@ -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)

View file

@ -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)

View file

@ -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);
}

View file

@ -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;

View file

@ -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);

View file

@ -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

View file

@ -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;

View file

@ -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 ***/

View file

@ -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;

View file

@ -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 *

View file

@ -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) {

View file

@ -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) {

View file

@ -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)

View file

@ -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(

View file

@ -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;

View file

@ -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,

View file

@ -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];

View file

@ -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;
}
/**

View file

@ -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;

View file

@ -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);

View file

@ -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 *

View file

@ -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)

View file

@ -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;

View file

@ -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

View file

@ -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++],

View file

@ -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];

View file

@ -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;

View file

@ -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);

View file

@ -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)

View file

@ -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

View file

@ -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];

View file

@ -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_ */

View file

@ -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)

View file

@ -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];

View file

@ -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_ */

View file

@ -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)

View file

@ -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 <chip CHIP>
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)

View file

@ -14,7 +14,7 @@
template <chip CHIP>
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);

View file

@ -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);

View file

@ -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

View file

@ -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) {

View file

@ -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;

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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);

View file

@ -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];

View file

@ -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;

View file

@ -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;

View file

@ -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)

View file

@ -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 */

View file

@ -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;
}
/**

View file

@ -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);

View file

@ -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;

View file

@ -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:

View file

@ -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);

View file

@ -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)

View file

@ -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);
}

View file

@ -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

View file

@ -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];

View file

@ -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)
{

View file

@ -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));

View file

@ -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)

View file

@ -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)
{

View file

@ -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) {

View file

@ -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)

View file

@ -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)

View file

@ -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];

View file

@ -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;

View file

@ -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)

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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 =

View file

@ -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;

View file

@ -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,

View file

@ -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)

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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);

View file

@ -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)
{

Some files were not shown because too many files have changed in this diff Show more