all: rename PIPE_SHADER_GEOMETRY to MESA_SHADER_GEOMETRY

Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/PIPE_SHADER_GEOMETRY/MESA_SHADER_GEOMETRY/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 13:45:49 +08:00
parent 197c183d2d
commit f83e801fc0
106 changed files with 300 additions and 300 deletions

View file

@ -312,7 +312,7 @@ cso_create_context(struct pipe_context *pipe, unsigned flags)
/* Enable for testing: */
if (0) cso_set_maximum_cache_size(&ctx->cache, 4);
if (pipe->screen->shader_caps[PIPE_SHADER_GEOMETRY].max_instructions > 0) {
if (pipe->screen->shader_caps[MESA_SHADER_GEOMETRY].max_instructions > 0) {
ctx->has_geometry_shader = true;
}
if (pipe->screen->shader_caps[MESA_SHADER_TESS_CTRL].max_instructions > 0) {
@ -366,7 +366,7 @@ cso_unbind_context(struct cso_context *cso)
enum pipe_shader_type sh;
for (sh = 0; sh < PIPE_SHADER_MESH_TYPES; sh++) {
switch (sh) {
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
if (!ctx->has_geometry_shader)
continue;
break;

View file

@ -460,7 +460,7 @@ draw_set_mapped_constant_buffer(struct draw_context *draw,
unsigned size)
{
assert(shader_type == MESA_SHADER_VERTEX ||
shader_type == PIPE_SHADER_GEOMETRY ||
shader_type == MESA_SHADER_GEOMETRY ||
shader_type == MESA_SHADER_TESS_CTRL ||
shader_type == MESA_SHADER_TESS_EVAL);
assert(slot < PIPE_MAX_CONSTANT_BUFFERS);
@ -479,7 +479,7 @@ draw_set_mapped_shader_buffer(struct draw_context *draw,
unsigned size)
{
assert(shader_type == MESA_SHADER_VERTEX ||
shader_type == PIPE_SHADER_GEOMETRY ||
shader_type == MESA_SHADER_GEOMETRY ||
shader_type == MESA_SHADER_TESS_CTRL ||
shader_type == MESA_SHADER_TESS_EVAL);
assert(slot < PIPE_MAX_SHADER_BUFFERS);
@ -763,7 +763,7 @@ draw_texture_sampler(struct draw_context *draw,
case MESA_SHADER_VERTEX:
draw->vs.tgsi.sampler = sampler;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
draw->gs.tgsi.sampler = sampler;
break;
default:
@ -787,7 +787,7 @@ draw_image(struct draw_context *draw,
case MESA_SHADER_VERTEX:
draw->vs.tgsi.image = image;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
draw->gs.tgsi.image = image;
break;
default:
@ -811,7 +811,7 @@ draw_buffer(struct draw_context *draw,
case MESA_SHADER_VERTEX:
draw->vs.tgsi.buffer = buffer;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
draw->gs.tgsi.buffer = buffer;
break;
default:

View file

@ -748,7 +748,7 @@ bool
draw_gs_init(struct draw_context *draw)
{
if (!draw->llvm) {
draw->gs.tgsi.machine = tgsi_exec_machine_create(PIPE_SHADER_GEOMETRY);
draw->gs.tgsi.machine = tgsi_exec_machine_create(MESA_SHADER_GEOMETRY);
for (unsigned i = 0; i < TGSI_MAX_VERTEX_STREAMS; i++) {
draw->gs.tgsi.machine->Primitives[i] = align_malloc(
@ -916,7 +916,7 @@ draw_create_geometry_shader(struct draw_context *draw,
gs->run = llvm_gs_run;
gs->jit_context = &draw->llvm->gs_jit_context;
gs->jit_resources = &draw->llvm->jit_resources[PIPE_SHADER_GEOMETRY];
gs->jit_resources = &draw->llvm->jit_resources[MESA_SHADER_GEOMETRY];
llvm_gs->variant_key_size =
draw_gs_llvm_variant_key_size(

View file

@ -2623,11 +2623,11 @@ draw_gs_llvm_make_variant_key(struct draw_llvm *llvm, char *store)
for (unsigned i = 0 ; i < key->nr_samplers; i++) {
lp_sampler_static_sampler_state(&draw_sampler[i].sampler_state,
llvm->draw->samplers[PIPE_SHADER_GEOMETRY][i]);
llvm->draw->samplers[MESA_SHADER_GEOMETRY][i]);
}
for (unsigned i = 0 ; i < key->nr_sampler_views; i++) {
lp_sampler_static_texture_state(&draw_sampler[i].texture_state,
llvm->draw->sampler_views[PIPE_SHADER_GEOMETRY][i]);
llvm->draw->sampler_views[MESA_SHADER_GEOMETRY][i]);
}
draw_image = draw_gs_llvm_variant_key_images(key);
@ -2635,7 +2635,7 @@ draw_gs_llvm_make_variant_key(struct draw_llvm *llvm, char *store)
key->nr_images * sizeof *draw_image);
for (unsigned i = 0; i < key->nr_images; i++) {
lp_sampler_static_texture_state_image(&draw_image[i].image_state,
llvm->draw->images[PIPE_SHADER_GEOMETRY][i]);
llvm->draw->images[MESA_SHADER_GEOMETRY][i]);
}
return key;
}

View file

@ -55,7 +55,7 @@ struct gallivm_state;
* The max stage the draw stores resources for.
* i.e. vs, tcs, tes, gs. no fs/cs/ms/ts.
*/
#define DRAW_MAX_SHADER_STAGE (PIPE_SHADER_GEOMETRY + 1)
#define DRAW_MAX_SHADER_STAGE (MESA_SHADER_GEOMETRY + 1)
/**
* The largest possible index of a vertex that can be fetched.

View file

@ -285,7 +285,7 @@ fetch_pipeline_generic(struct draw_pt_middle_end *middle,
if ((fpme->opt & PT_SHADE) && gshader) {
draw_geometry_shader_run(gshader,
draw->pt.user.constants[PIPE_SHADER_GEOMETRY],
draw->pt.user.constants[MESA_SHADER_GEOMETRY],
vert_info,
prim_info,
&vshader->info,

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 <= PIPE_SHADER_GEOMETRY; shader_type++) {
for (enum pipe_shader_type 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
@ -645,7 +645,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
if ((opt & PT_SHADE) && gshader) {
struct draw_vertex_shader *vshader = draw->vs.vertex_shader;
draw_geometry_shader_run(gshader,
draw->pt.user.constants[PIPE_SHADER_GEOMETRY],
draw->pt.user.constants[MESA_SHADER_GEOMETRY],
vert_info,
prim_info,
tes_shader ? &tes_shader->info : &vshader->info,

View file

@ -155,8 +155,8 @@ dd_num_active_viewports(struct dd_draw_state *dstate)
struct tgsi_shader_info info;
const struct tgsi_token *tokens;
if (dstate->shaders[PIPE_SHADER_GEOMETRY])
tokens = dstate->shaders[PIPE_SHADER_GEOMETRY]->state.shader.tokens;
if (dstate->shaders[MESA_SHADER_GEOMETRY])
tokens = dstate->shaders[MESA_SHADER_GEOMETRY]->state.shader.tokens;
else if (dstate->shaders[MESA_SHADER_TESS_EVAL])
tokens = dstate->shaders[MESA_SHADER_TESS_EVAL]->state.shader.tokens;
else if (dstate->shaders[MESA_SHADER_VERTEX])
@ -267,7 +267,7 @@ dd_dump_shader(struct dd_draw_state *dstate, enum pipe_shader_type sh, FILE *f)
shader_str[MESA_SHADER_VERTEX] = "VERTEX";
shader_str[MESA_SHADER_TESS_CTRL] = "TESS_CTRL";
shader_str[MESA_SHADER_TESS_EVAL] = "TESS_EVAL";
shader_str[PIPE_SHADER_GEOMETRY] = "GEOMETRY";
shader_str[MESA_SHADER_GEOMETRY] = "GEOMETRY";
shader_str[PIPE_SHADER_FRAGMENT] = "FRAGMENT";
shader_str[PIPE_SHADER_COMPUTE] = "COMPUTE";

View file

@ -313,7 +313,7 @@ iter_declaration(
* two dimensional
*/
if (decl->Declaration.File == TGSI_FILE_INPUT &&
(iter->processor.Processor == PIPE_SHADER_GEOMETRY ||
(iter->processor.Processor == MESA_SHADER_GEOMETRY ||
(!patch &&
(iter->processor.Processor == MESA_SHADER_TESS_CTRL ||
iter->processor.Processor == MESA_SHADER_TESS_EVAL)))) {

View file

@ -1069,7 +1069,7 @@ tgsi_exec_machine_bind_shader(
for (k = 0; k < TGSI_SEMANTIC_COUNT; k++)
mach->SysSemanticToIndex[k] = -1;
if (mach->ShaderType == PIPE_SHADER_GEOMETRY &&
if (mach->ShaderType == MESA_SHADER_GEOMETRY &&
!mach->UsedGeometryShader) {
struct tgsi_exec_vector *inputs;
struct tgsi_exec_vector *outputs;
@ -1184,7 +1184,7 @@ tgsi_exec_machine_bind_shader(
break;
case TGSI_TOKEN_TYPE_PROPERTY:
if (mach->ShaderType == PIPE_SHADER_GEOMETRY) {
if (mach->ShaderType == MESA_SHADER_GEOMETRY) {
if (parse.FullToken.FullProperty.Property.PropertyName == TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES) {
mach->MaxOutputVertices = parse.FullToken.FullProperty.u[0].Data;
}
@ -1421,7 +1421,7 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach,
case TGSI_FILE_INPUT:
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
/*
if (PIPE_SHADER_GEOMETRY == mach->ShaderType) {
if (MESA_SHADER_GEOMETRY == mach->ShaderType) {
debug_printf("Fetching Input[%d] (2d=%d, 1d=%d)\n",
index2D->i[i] * TGSI_EXEC_MAX_INPUT_ATTRIBS + index->i[i],
index2D->i[i], index->i[i]);
@ -1690,7 +1690,7 @@ store_dest_dstret(struct tgsi_exec_machine *mach,
debug_printf("NumOutputs = %d, TEMP_O_C/I = %d, redindex = %d\n",
mach->NumOutputs, mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0],
reg->Register.Index);
if (PIPE_SHADER_GEOMETRY == mach->ShaderType) {
if (MESA_SHADER_GEOMETRY == mach->ShaderType) {
debug_printf("STORING OUT[%d] mask(%d), = (", offset + index, execmask);
for (i = 0; i < TGSI_QUAD_SIZE; i++)
if (execmask & (1 << i))
@ -1881,7 +1881,7 @@ emit_primitive(struct tgsi_exec_machine *mach,
static void
conditional_emit_primitive(struct tgsi_exec_machine *mach)
{
if (PIPE_SHADER_GEOMETRY == mach->ShaderType) {
if (MESA_SHADER_GEOMETRY == mach->ShaderType) {
int emitted_verts = mach->Primitives[0][mach->OutputPrimCount[0]];
if (emitted_verts) {
emit_primitive(mach, NULL);
@ -5953,7 +5953,7 @@ tgsi_exec_machine_setup_masks(struct tgsi_exec_machine *mach)
mach->KillMask = 0;
mach->OutputVertexOffset = 0;
if (mach->ShaderType == PIPE_SHADER_GEOMETRY) {
if (mach->ShaderType == MESA_SHADER_GEOMETRY) {
for (unsigned i = 0; i < TGSI_MAX_VERTEX_STREAMS; i++) {
mach->OutputPrimCount[i] = 0;
mach->Primitives[i][0] = 0;

View file

@ -65,7 +65,7 @@ pipe_shader_type_from_mesa(gl_shader_stage stage)
STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_FRAGMENT == PIPE_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 == PIPE_SHADER_GEOMETRY);
STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_GEOMETRY == MESA_SHADER_GEOMETRY);
STATIC_ASSERT((enum pipe_shader_type) MESA_SHADER_COMPUTE == PIPE_SHADER_COMPUTE);
return (enum pipe_shader_type)stage;
}

View file

@ -416,7 +416,7 @@ iter_declaration(
decl->Semantic.Name == TGSI_SEMANTIC_TESSOUTER ||
decl->Semantic.Name == TGSI_SEMANTIC_TESSINNER;
if (file == TGSI_FILE_INPUT && !patch && (
processor == PIPE_SHADER_GEOMETRY ||
processor == MESA_SHADER_GEOMETRY ||
processor == MESA_SHADER_TESS_CTRL ||
processor == MESA_SHADER_TESS_EVAL)) {
unsigned vert;
@ -487,7 +487,7 @@ iter_property(
{
struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
if (iter->processor.Processor == PIPE_SHADER_GEOMETRY &&
if (iter->processor.Processor == MESA_SHADER_GEOMETRY &&
prop->Property.PropertyName == TGSI_PROPERTY_GS_INPUT_PRIM) {
ctx->implied_array_size = mesa_vertices_per_prim(prop->u[0].Data);
}

View file

@ -612,13 +612,13 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
procType = parse.FullHeader.Processor.Processor;
assert(procType == PIPE_SHADER_FRAGMENT ||
procType == MESA_SHADER_VERTEX ||
procType == PIPE_SHADER_GEOMETRY ||
procType == MESA_SHADER_GEOMETRY ||
procType == MESA_SHADER_TESS_CTRL ||
procType == MESA_SHADER_TESS_EVAL ||
procType == PIPE_SHADER_COMPUTE);
info->processor = procType;
if (procType == PIPE_SHADER_GEOMETRY)
if (procType == MESA_SHADER_GEOMETRY)
info->properties[TGSI_PROPERTY_GS_INVOCATIONS] = 1;
/**
@ -652,7 +652,7 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
/* The dimensions of the IN decleration in geometry shader have
* to be deduced from the type of the input primitive.
*/
if (procType == PIPE_SHADER_GEOMETRY) {
if (procType == MESA_SHADER_GEOMETRY) {
unsigned input_primitive =
info->properties[TGSI_PROPERTY_GS_INPUT_PRIM];
int num_verts = mesa_vertices_per_prim(input_primitive);

View file

@ -337,7 +337,7 @@ static bool parse_header( struct translate_ctx *ctx )
else if (str_match_nocase_whole( &ctx->cur, "VERT" ))
processor = MESA_SHADER_VERTEX;
else if (str_match_nocase_whole( &ctx->cur, "GEOM" ))
processor = PIPE_SHADER_GEOMETRY;
processor = MESA_SHADER_GEOMETRY;
else if (str_match_nocase_whole( &ctx->cur, "TESS_CTRL" ))
processor = MESA_SHADER_TESS_CTRL;
else if (str_match_nocase_whole( &ctx->cur, "TESS_EVAL" ))
@ -730,7 +730,7 @@ parse_register_dcl(
* the second bracket */
/* tessellation has similar constraints to geometry shader */
if ((ctx->processor == PIPE_SHADER_GEOMETRY && is_in) ||
if ((ctx->processor == MESA_SHADER_GEOMETRY && is_in) ||
(ctx->processor == MESA_SHADER_TESS_EVAL && is_in) ||
(ctx->processor == MESA_SHADER_TESS_CTRL && (is_in || is_out))) {
brackets[0] = brackets[1];
@ -1482,7 +1482,7 @@ static bool parse_declaration( struct translate_ctx *ctx )
cur = ctx->cur;
eat_opt_white( &cur );
if (*cur == ',' &&
file == TGSI_FILE_OUTPUT && ctx->processor == PIPE_SHADER_GEOMETRY) {
file == TGSI_FILE_OUTPUT && ctx->processor == MESA_SHADER_GEOMETRY) {
cur++;
eat_opt_white(&cur);
if (str_match_nocase_whole(&cur, "STREAM")) {
@ -1756,7 +1756,7 @@ static bool parse_property( struct translate_ctx *ctx )
return false;
}
if (property_name == TGSI_PROPERTY_GS_INPUT_PRIM &&
ctx->processor == PIPE_SHADER_GEOMETRY) {
ctx->processor == MESA_SHADER_GEOMETRY) {
ctx->implied_array_size = mesa_vertices_per_prim(values[0]);
}
break;

View file

@ -2188,7 +2188,7 @@ void *ureg_create_shader( struct ureg_program *ureg,
return pipe->create_tcs_state(pipe, &state);
case MESA_SHADER_TESS_EVAL:
return pipe->create_tes_state(pipe, &state);
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return pipe->create_gs_state(pipe, &state);
case PIPE_SHADER_FRAGMENT:
return pipe->create_fs_state(pipe, &state);

View file

@ -190,7 +190,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
ctx->base.saved_num_so_targets = ~0;
ctx->has_geometry_shader =
pipe->screen->shader_caps[PIPE_SHADER_GEOMETRY].max_instructions > 0;
pipe->screen->shader_caps[MESA_SHADER_GEOMETRY].max_instructions > 0;
ctx->has_tessellation =
pipe->screen->shader_caps[MESA_SHADER_TESS_CTRL].max_instructions > 0;

View file

@ -104,7 +104,7 @@ util_live_shader_cache_get(struct pipe_context *ctx,
_mesa_sha1_update(&sha1_ctx, ir_binary, ir_size);
if ((stage == MESA_SHADER_VERTEX ||
stage == MESA_SHADER_TESS_EVAL ||
stage == PIPE_SHADER_GEOMETRY) &&
stage == MESA_SHADER_GEOMETRY) &&
state->stream_output.num_outputs) {
_mesa_sha1_update(&sha1_ctx, &state->stream_output,
sizeof(state->stream_output));

View file

@ -172,9 +172,9 @@ u_init_pipe_screen_caps(struct pipe_screen *pscreen, int accel)
caps->hardware_gl_select =
!!accel && debug_get_bool_option("MESA_HW_ACCEL_SELECT", accel > 0) &&
/* internal geometry shader need indirect array access */
pscreen->shader_caps[PIPE_SHADER_GEOMETRY].indirect_temp_addr &&
pscreen->shader_caps[MESA_SHADER_GEOMETRY].indirect_temp_addr &&
/* internal geometry shader need SSBO support */
pscreen->shader_caps[PIPE_SHADER_GEOMETRY].max_shader_buffers;
pscreen->shader_caps[MESA_SHADER_GEOMETRY].max_shader_buffers;
caps->query_timestamp_bits = 64;

View file

@ -928,7 +928,7 @@ util_make_geometry_passthrough_shader(struct pipe_context *pipe,
unsigned i;
ureg = ureg_create(PIPE_SHADER_GEOMETRY);
ureg = ureg_create(MESA_SHADER_GEOMETRY);
if (!ureg)
return NULL;

View file

@ -918,7 +918,7 @@ tc_add_all_gfx_bindings_to_buffer_list(struct threaded_context *tc)
if (tc->seen_tes)
tc_add_shader_bindings_to_buffer_list(tc, buffer_list, MESA_SHADER_TESS_EVAL);
if (tc->seen_gs)
tc_add_shader_bindings_to_buffer_list(tc, buffer_list, PIPE_SHADER_GEOMETRY);
tc_add_shader_bindings_to_buffer_list(tc, buffer_list, MESA_SHADER_GEOMETRY);
tc->add_all_gfx_bindings_to_buffer_list = false;
}
@ -962,7 +962,7 @@ tc_rebind_buffer(struct threaded_context *tc, uint32_t old_id, uint32_t new_id,
if (tc->seen_tes)
rebound += tc_rebind_shader_bindings(tc, old_id, new_id, MESA_SHADER_TESS_EVAL, rebind_mask);
if (tc->seen_gs)
rebound += tc_rebind_shader_bindings(tc, old_id, new_id, PIPE_SHADER_GEOMETRY, rebind_mask);
rebound += tc_rebind_shader_bindings(tc, old_id, new_id, MESA_SHADER_GEOMETRY, rebind_mask);
rebound += tc_rebind_shader_bindings(tc, old_id, new_id, PIPE_SHADER_COMPUTE, rebind_mask);
@ -1020,7 +1020,7 @@ tc_is_buffer_bound_for_write(struct threaded_context *tc, uint32_t id)
return true;
if (tc->seen_gs &&
tc_is_buffer_shader_bound_for_write(tc, id, PIPE_SHADER_GEOMETRY))
tc_is_buffer_shader_bound_for_write(tc, id, MESA_SHADER_GEOMETRY))
return true;
return false;

View file

@ -465,7 +465,7 @@ agx_blitter_save(struct agx_context *ctx, struct blitter_context *blitter,
util_blitter_save_tesseval_shader(blitter,
ctx->stage[MESA_SHADER_TESS_EVAL].shader);
util_blitter_save_geometry_shader(blitter,
ctx->stage[PIPE_SHADER_GEOMETRY].shader);
ctx->stage[MESA_SHADER_GEOMETRY].shader);
util_blitter_save_so_targets(blitter, ctx->streamout.num_targets,
ctx->streamout.targets, MESA_PRIM_UNKNOWN);
util_blitter_save_vertex_buffers(blitter, ctx->vertex_buffers,

View file

@ -119,7 +119,7 @@ read_shader(struct agx_screen *screen, struct blob_reader *blob,
blob_copy_bytes(blob, binary->push,
sizeof(binary->push[0]) * binary->push_range_count);
if (is_root && uncompiled->type == PIPE_SHADER_GEOMETRY) {
if (is_root && uncompiled->type == MESA_SHADER_GEOMETRY) {
blob_copy_bytes(blob, &binary->gs, sizeof(binary->gs));
binary->pre_gs = read_shader(screen, blob, uncompiled, false);
@ -155,7 +155,7 @@ agx_disk_cache_store(struct disk_cache *cache,
struct blob blob;
blob_init(&blob);
write_shader(&blob, binary, uncompiled->type == PIPE_SHADER_GEOMETRY);
write_shader(&blob, binary, uncompiled->type == MESA_SHADER_GEOMETRY);
disk_cache_put(cache, cache_key, blob.data, blob.size, NULL);
blob_finish(&blob);

View file

@ -1679,7 +1679,7 @@ agx_compile_variant(struct agx_device *dev, struct pipe_context *pctx,
NIR_PASS(_, gs_copy, agx_nir_lower_uvs, &uvs);
compiled->gs_copy =
agx_compile_nir(dev, gs_copy, &pctx->debug, PIPE_SHADER_GEOMETRY,
agx_compile_nir(dev, gs_copy, &pctx->debug, MESA_SHADER_GEOMETRY,
false, true, false, 0, NULL);
compiled->gs_copy->so = so;
compiled->gs_copy->stage = so->type;
@ -1948,7 +1948,7 @@ agx_create_shader_state(struct pipe_context *pctx,
* acceptable for now.
*/
if ((so->type == MESA_SHADER_TESS_CTRL) ||
(so->type == PIPE_SHADER_GEOMETRY) ||
(so->type == MESA_SHADER_GEOMETRY) ||
(so->type == PIPE_SHADER_FRAGMENT && !so->info.uses_fbfetch)) {
union asahi_shader_key key = {0};
agx_get_shader_variant(agx_screen(pctx->screen), pctx, so, &key);
@ -2163,14 +2163,14 @@ agx_update_vs(struct agx_batch *batch, unsigned index_size_B)
*/
if (!((ctx->dirty & (AGX_DIRTY_VS_PROG | AGX_DIRTY_VERTEX | AGX_DIRTY_XFB)) ||
ctx->stage[MESA_SHADER_TESS_EVAL].dirty ||
ctx->stage[PIPE_SHADER_GEOMETRY].dirty ||
ctx->stage[MESA_SHADER_GEOMETRY].dirty ||
ctx->stage[MESA_SHADER_TESS_EVAL].shader ||
ctx->stage[PIPE_SHADER_GEOMETRY].shader || ctx->in_tess))
ctx->stage[MESA_SHADER_GEOMETRY].shader || ctx->in_tess))
return false;
struct asahi_vs_shader_key key = {
.hw = !((ctx->stage[MESA_SHADER_TESS_EVAL].shader && !ctx->in_tess) ||
ctx->stage[PIPE_SHADER_GEOMETRY].shader),
ctx->stage[MESA_SHADER_GEOMETRY].shader),
};
agx_update_shader(ctx, &ctx->vs, MESA_SHADER_VERTEX,
@ -2226,7 +2226,7 @@ agx_update_gs(struct agx_context *ctx, const struct pipe_draw_info *info,
/* Only proceed if there is a geometry shader. Due to input assembly
* dependence, we don't bother to dirty track right now.
*/
if (!ctx->stage[PIPE_SHADER_GEOMETRY].shader) {
if (!ctx->stage[MESA_SHADER_GEOMETRY].shader) {
ctx->gs = NULL;
return false;
}
@ -2234,7 +2234,7 @@ agx_update_gs(struct agx_context *ctx, const struct pipe_draw_info *info,
/* Transform feedback always happens via the geometry shader, so look there
* to get the XFB strides.
*/
struct agx_uncompiled_shader *gs = ctx->stage[PIPE_SHADER_GEOMETRY].shader;
struct agx_uncompiled_shader *gs = ctx->stage[MESA_SHADER_GEOMETRY].shader;
for (unsigned i = 0; i < ctx->streamout.num_targets; ++i) {
struct agx_streamout_target *tgt =
@ -2245,7 +2245,7 @@ agx_update_gs(struct agx_context *ctx, const struct pipe_draw_info *info,
}
ctx->gs = _mesa_hash_table_next_entry(
ctx->stage[PIPE_SHADER_GEOMETRY].shader->variants, NULL)
ctx->stage[MESA_SHADER_GEOMETRY].shader->variants, NULL)
->data;
return true;
}
@ -2421,7 +2421,7 @@ agx_bind_fs_state(struct pipe_context *pctx, void *cso)
static void
agx_bind_gs_state(struct pipe_context *pctx, void *cso)
{
agx_bind_shader_state(pctx, cso, PIPE_SHADER_GEOMETRY);
agx_bind_shader_state(pctx, cso, MESA_SHADER_GEOMETRY);
}
static void
@ -3860,7 +3860,7 @@ agx_ia_update(struct agx_batch *batch, const struct pipe_draw_info *info,
* geometry/tessellation shader. Without a geometry/tessellation shader,
* they are written along with IA.
*/
if (ctx->stage[PIPE_SHADER_GEOMETRY].shader ||
if (ctx->stage[MESA_SHADER_GEOMETRY].shader ||
ctx->stage[MESA_SHADER_TESS_EVAL].shader) {
c_prims = AGX_SCRATCH_PAGE_ADDRESS;
@ -4065,7 +4065,7 @@ agx_launch_gs_prerast(struct agx_batch *batch,
struct agx_device *dev = agx_device(ctx->base.screen);
struct agx_compiled_shader *gs = ctx->gs;
if (ctx->stage[PIPE_SHADER_GEOMETRY].shader->is_xfb_passthrough)
if (ctx->stage[MESA_SHADER_GEOMETRY].shader->is_xfb_passthrough)
perf_debug(dev, "Transform feedbck");
else
perf_debug(dev, "Geometry shader");
@ -4144,7 +4144,7 @@ agx_launch_gs_prerast(struct agx_batch *batch,
PIPE_STAT_QUERY_C_INVOCATIONS,
};
bool xfb_or_queries = ctx->stage[PIPE_SHADER_GEOMETRY].shader->has_xfb_info;
bool xfb_or_queries = ctx->stage[MESA_SHADER_GEOMETRY].shader->has_xfb_info;
for (unsigned i = 0; i < ARRAY_SIZE(gs_queries); ++i) {
xfb_or_queries |= (ctx->pipeline_statistics[gs_queries[i]] != NULL);
@ -4157,7 +4157,7 @@ agx_launch_gs_prerast(struct agx_batch *batch,
/* If there is a count shader, launch it and prefix sum the results. */
if (gs->gs_count && xfb_or_queries) {
perf_debug(dev, "Geometry shader count");
agx_launch(batch, grid_gs, wg, gs->gs_count, NULL, PIPE_SHADER_GEOMETRY,
agx_launch(batch, grid_gs, wg, gs->gs_count, NULL, MESA_SHADER_GEOMETRY,
0);
}
@ -4174,7 +4174,7 @@ agx_launch_gs_prerast(struct agx_batch *batch,
}
/* Pre-rast geometry shader */
agx_launch(batch, grid_gs, wg, gs, NULL, PIPE_SHADER_GEOMETRY, 0);
agx_launch(batch, grid_gs, wg, gs, NULL, MESA_SHADER_GEOMETRY, 0);
}
static void
@ -4271,7 +4271,7 @@ agx_needs_passthrough_gs(struct agx_context *ctx,
/* If there is already a geometry shader in the pipeline, we do not need to
* apply a passthrough GS of our own.
*/
if (ctx->stage[PIPE_SHADER_GEOMETRY].shader)
if (ctx->stage[MESA_SHADER_GEOMETRY].shader)
return false;
/* Rendering adjacency requires a GS, add a passthrough since we don't have
@ -4388,7 +4388,7 @@ agx_apply_passthrough_gs(struct agx_context *ctx,
: MESA_SHADER_VERTEX;
struct agx_uncompiled_shader *prev_cso = ctx->stage[prev_stage].shader;
assert(ctx->stage[PIPE_SHADER_GEOMETRY].shader == NULL);
assert(ctx->stage[MESA_SHADER_GEOMETRY].shader == NULL);
/* Draw with passthrough */
ctx->base.bind_gs_state(
@ -4703,7 +4703,7 @@ agx_draw_patches(struct agx_context *ctx, const struct pipe_draw_info *info,
/* If there's a geometry shader, it will increment the clipper stats.
* Otherwise, we do when tessellating.
*/
if (ctx->stage[PIPE_SHADER_GEOMETRY].shader) {
if (ctx->stage[MESA_SHADER_GEOMETRY].shader) {
c_prims = AGX_SCRATCH_PAGE_ADDRESS;
c_invs = AGX_SCRATCH_PAGE_ADDRESS;
}
@ -4959,7 +4959,7 @@ agx_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
((ctx->pipeline_statistics[PIPE_STAT_QUERY_C_PRIMITIVES] ||
ctx->pipeline_statistics[PIPE_STAT_QUERY_C_INVOCATIONS]) &&
!ctx->stage[MESA_SHADER_TESS_EVAL].shader &&
!ctx->stage[PIPE_SHADER_GEOMETRY].shader))) {
!ctx->stage[MESA_SHADER_GEOMETRY].shader))) {
uint64_t ptr;
if (indirect) {
@ -4980,13 +4980,13 @@ agx_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
/* Only the rasterization stream counts */
if (ctx->active_queries && ctx->prims_generated[0] &&
!ctx->stage[PIPE_SHADER_GEOMETRY].shader) {
!ctx->stage[MESA_SHADER_GEOMETRY].shader) {
assert(!indirect && "we force a passthrough GS for this");
agx_primitives_update_direct(ctx, info, draws);
}
if (ctx->stage[PIPE_SHADER_GEOMETRY].shader && info->primitive_restart &&
if (ctx->stage[MESA_SHADER_GEOMETRY].shader && info->primitive_restart &&
info->index_size) {
agx_draw_without_restart(batch, info, drawid_offset, indirect, draws);

View file

@ -94,7 +94,7 @@ static_assert(AGX_SYSVAL_STAGE(MESA_SHADER_TESS_CTRL) == AGX_SYSVAL_TABLE_TCS,
"fixed enum orderings");
static_assert(AGX_SYSVAL_STAGE(MESA_SHADER_TESS_EVAL) == AGX_SYSVAL_TABLE_TES,
"fixed enum orderings");
static_assert(AGX_SYSVAL_STAGE(PIPE_SHADER_GEOMETRY) == AGX_SYSVAL_TABLE_GS,
static_assert(AGX_SYSVAL_STAGE(MESA_SHADER_GEOMETRY) == AGX_SYSVAL_TABLE_GS,
"fixed enum orderings");
static_assert(AGX_SYSVAL_STAGE(PIPE_SHADER_FRAGMENT) == AGX_SYSVAL_TABLE_FS,
"fixed enum orderings");

View file

@ -167,7 +167,7 @@ agx_primitives_update_direct(struct agx_context *ctx,
const struct pipe_draw_start_count_bias *draw)
{
assert(ctx->active_queries && ctx->prims_generated[0] && "precondition");
assert(!ctx->stage[PIPE_SHADER_GEOMETRY].shader &&
assert(!ctx->stage[MESA_SHADER_GEOMETRY].shader &&
"Geometry shaders use their own counting");
agx_query_increment_cpu(ctx, ctx->prims_generated[0],

View file

@ -151,7 +151,7 @@ crocus_init_shader_caps(struct crocus_screen *screen)
if (devinfo->ver == 6 &&
i != MESA_SHADER_VERTEX &&
i != PIPE_SHADER_FRAGMENT &&
i != PIPE_SHADER_GEOMETRY)
i != MESA_SHADER_GEOMETRY)
continue;
caps->max_instructions = i == MESA_SHADER_FRAGMENT ? 1024 : 16384;

View file

@ -272,7 +272,7 @@ util_blit_save_state(struct d3d12_context *ctx)
util_blitter_save_rasterizer(ctx->blitter, ctx->gfx_pipeline_state.rast);
util_blitter_save_fragment_shader(ctx->blitter, ctx->gfx_stages[PIPE_SHADER_FRAGMENT]);
util_blitter_save_vertex_shader(ctx->blitter, ctx->gfx_stages[MESA_SHADER_VERTEX]);
util_blitter_save_geometry_shader(ctx->blitter, ctx->gfx_stages[PIPE_SHADER_GEOMETRY]);
util_blitter_save_geometry_shader(ctx->blitter, ctx->gfx_stages[MESA_SHADER_GEOMETRY]);
util_blitter_save_tessctrl_shader(ctx->blitter, ctx->gfx_stages[MESA_SHADER_TESS_CTRL]);
util_blitter_save_tesseval_shader(ctx->blitter, ctx->gfx_stages[MESA_SHADER_TESS_EVAL]);

View file

@ -327,8 +327,8 @@ fill_mode_lowered(struct d3d12_context *ctx, const struct pipe_draw_info *dinfo)
{
struct d3d12_shader_selector *vs = ctx->gfx_stages[MESA_SHADER_VERTEX];
if ((ctx->gfx_stages[PIPE_SHADER_GEOMETRY] != NULL &&
!ctx->gfx_stages[PIPE_SHADER_GEOMETRY]->is_variant) ||
if ((ctx->gfx_stages[MESA_SHADER_GEOMETRY] != NULL &&
!ctx->gfx_stages[MESA_SHADER_GEOMETRY]->is_variant) ||
ctx->gfx_pipeline_state.rast == NULL ||
(dinfo->mode != MESA_PRIM_TRIANGLES &&
dinfo->mode != MESA_PRIM_TRIANGLE_STRIP))
@ -352,7 +352,7 @@ fill_mode_lowered(struct d3d12_context *ctx, const struct pipe_draw_info *dinfo)
static bool
has_stream_out_for_streams(struct d3d12_context *ctx)
{
unsigned mask = ctx->gfx_stages[PIPE_SHADER_GEOMETRY]->initial->info.gs.active_stream_mask & ~1;
unsigned mask = ctx->gfx_stages[MESA_SHADER_GEOMETRY]->initial->info.gs.active_stream_mask & ~1;
for (unsigned i = 0; i < ctx->gfx_pipeline_state.so_info.num_outputs; ++i) {
unsigned stream = ctx->gfx_pipeline_state.so_info.output[i].stream;
if (((1 << stream) & mask) &&
@ -366,7 +366,7 @@ static bool
needs_point_sprite_lowering(struct d3d12_context *ctx, const struct pipe_draw_info *dinfo)
{
struct d3d12_shader_selector *vs = ctx->gfx_stages[MESA_SHADER_VERTEX];
struct d3d12_shader_selector *gs = ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
struct d3d12_shader_selector *gs = ctx->gfx_stages[MESA_SHADER_GEOMETRY];
if (gs != NULL && !gs->is_variant) {
/* There is an user GS; Check if it outputs points with PSIZE */
@ -390,8 +390,8 @@ needs_point_sprite_lowering(struct d3d12_context *ctx, const struct pipe_draw_in
static unsigned
cull_mode_lowered(struct d3d12_context *ctx, unsigned fill_mode)
{
if ((ctx->gfx_stages[PIPE_SHADER_GEOMETRY] != NULL &&
!ctx->gfx_stages[PIPE_SHADER_GEOMETRY]->is_variant) ||
if ((ctx->gfx_stages[MESA_SHADER_GEOMETRY] != NULL &&
!ctx->gfx_stages[MESA_SHADER_GEOMETRY]->is_variant) ||
ctx->gfx_pipeline_state.rast == NULL ||
ctx->gfx_pipeline_state.rast->base.cull_face == PIPE_FACE_NONE)
return PIPE_FACE_NONE;
@ -408,12 +408,12 @@ get_provoking_vertex(struct d3d12_selection_context *sel_ctx, bool *alternate, c
}
struct d3d12_shader_selector *vs = sel_ctx->ctx->gfx_stages[MESA_SHADER_VERTEX];
struct d3d12_shader_selector *gs = sel_ctx->ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
struct d3d12_shader_selector *gs = sel_ctx->ctx->gfx_stages[MESA_SHADER_GEOMETRY];
struct d3d12_shader_selector *last_vertex_stage = gs && !gs->is_variant ? gs : vs;
enum mesa_prim mode;
switch (last_vertex_stage->stage) {
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
mode = (enum mesa_prim)last_vertex_stage->initial->info.gs.output_primitive;
break;
case MESA_SHADER_VERTEX:
@ -624,7 +624,7 @@ static void
validate_geometry_shader_variant(struct d3d12_selection_context *sel_ctx)
{
struct d3d12_context *ctx = sel_ctx->ctx;
d3d12_shader_selector *gs = ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
d3d12_shader_selector *gs = ctx->gfx_stages[MESA_SHADER_GEOMETRY];
/* Nothing to do if there is a user geometry shader bound */
if (gs != NULL && !gs->is_variant)
@ -662,7 +662,7 @@ validate_geometry_shader_variant(struct d3d12_selection_context *sel_ctx)
}
key.varyings = vs->initial_output_vars;
gs = d3d12_get_gs_variant(ctx, &key);
ctx->gfx_stages[PIPE_SHADER_GEOMETRY] = gs;
ctx->gfx_stages[MESA_SHADER_GEOMETRY] = gs;
}
static void
@ -717,7 +717,7 @@ d3d12_compare_shader_keys(struct d3d12_selection_context* sel_ctx, const d3d12_s
return false;
}
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
if (expect->gs.all != have->gs.all)
return false;
break;
@ -805,7 +805,7 @@ d3d12_shader_key_hash(const d3d12_shader_key *key)
* the rest of the the format_conversion data is large. Don't bother
* hashing for now until this is shown to be worthwhile. */
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
hash += static_cast<uint32_t>(key->gs.all);
break;
case PIPE_SHADER_FRAGMENT:
@ -849,7 +849,7 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx,
case PIPE_SHADER_FRAGMENT:
key->fs.all = 0;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
key->gs.all = 0;
break;
case MESA_SHADER_TESS_CTRL:
@ -902,7 +902,7 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx,
key->next_varying_frac_inputs = next->varying_frac_inputs;
}
if (stage == PIPE_SHADER_GEOMETRY ||
if (stage == MESA_SHADER_GEOMETRY ||
((stage == MESA_SHADER_VERTEX || stage == MESA_SHADER_TESS_EVAL) &&
(!next || next->stage == PIPE_SHADER_FRAGMENT))) {
key->last_vertex_processing_stage = 1;
@ -914,7 +914,7 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx,
key->next_varying_inputs |= VARYING_BIT_POS;
}
if (stage == PIPE_SHADER_GEOMETRY && sel_ctx->ctx->gfx_pipeline_state.rast) {
if (stage == MESA_SHADER_GEOMETRY && sel_ctx->ctx->gfx_pipeline_state.rast) {
struct pipe_rasterizer_state *rast = &sel_ctx->ctx->gfx_pipeline_state.rast->base;
if (sel_ctx->needs_point_sprite_lowering) {
key->gs.writes_psize = 1;
@ -1030,9 +1030,9 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx,
}
if (stage == PIPE_SHADER_FRAGMENT &&
sel_ctx->ctx->gfx_stages[PIPE_SHADER_GEOMETRY] &&
sel_ctx->ctx->gfx_stages[PIPE_SHADER_GEOMETRY]->is_variant &&
sel_ctx->ctx->gfx_stages[PIPE_SHADER_GEOMETRY]->gs_key.has_front_face) {
sel_ctx->ctx->gfx_stages[MESA_SHADER_GEOMETRY] &&
sel_ctx->ctx->gfx_stages[MESA_SHADER_GEOMETRY]->is_variant &&
sel_ctx->ctx->gfx_stages[MESA_SHADER_GEOMETRY]->gs_key.has_front_face) {
key->fs.remap_front_facing = 1;
}
@ -1075,7 +1075,7 @@ select_shader_variant(struct d3d12_selection_context *sel_ctx, d3d12_shader_sele
new_nir_variant = nir_shader_clone(sel, sel->initial);
/* Apply any needed lowering passes */
if (key.stage == PIPE_SHADER_GEOMETRY) {
if (key.stage == MESA_SHADER_GEOMETRY) {
if (key.gs.writes_psize) {
NIR_PASS(_, new_nir_variant, d3d12_lower_point_sprite,
!key.gs.sprite_origin_upper_left,
@ -1203,10 +1203,10 @@ get_prev_shader(struct d3d12_context *ctx, pipe_shader_type current)
case MESA_SHADER_VERTEX:
return NULL;
case PIPE_SHADER_FRAGMENT:
if (ctx->gfx_stages[PIPE_SHADER_GEOMETRY])
return ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
if (ctx->gfx_stages[MESA_SHADER_GEOMETRY])
return ctx->gfx_stages[MESA_SHADER_GEOMETRY];
FALLTHROUGH;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
if (ctx->gfx_stages[MESA_SHADER_TESS_EVAL])
return ctx->gfx_stages[MESA_SHADER_TESS_EVAL];
FALLTHROUGH;
@ -1234,10 +1234,10 @@ get_next_shader(struct d3d12_context *ctx, pipe_shader_type current)
return ctx->gfx_stages[MESA_SHADER_TESS_EVAL];
FALLTHROUGH;
case MESA_SHADER_TESS_EVAL:
if (ctx->gfx_stages[PIPE_SHADER_GEOMETRY])
return ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
if (ctx->gfx_stages[MESA_SHADER_GEOMETRY])
return ctx->gfx_stages[MESA_SHADER_GEOMETRY];
FALLTHROUGH;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return ctx->gfx_stages[PIPE_SHADER_FRAGMENT];
case PIPE_SHADER_FRAGMENT:
return NULL;
@ -1495,12 +1495,12 @@ d3d12_select_shader_variants(struct d3d12_context *ctx, const struct pipe_draw_i
sel_ctx.frag_result_color_lowering = frag_result_color_lowering(ctx);
sel_ctx.manual_depth_range = ctx->manual_depth_range;
d3d12_shader_selector* gs = ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
d3d12_shader_selector* gs = ctx->gfx_stages[MESA_SHADER_GEOMETRY];
if (gs == nullptr || gs->is_variant) {
if (sel_ctx.fill_mode_lowered != PIPE_POLYGON_MODE_FILL || sel_ctx.needs_point_sprite_lowering || sel_ctx.needs_vertex_reordering)
validate_geometry_shader_variant(&sel_ctx);
else if (gs != nullptr) {
ctx->gfx_stages[PIPE_SHADER_GEOMETRY] = NULL;
ctx->gfx_stages[MESA_SHADER_GEOMETRY] = NULL;
}
}
@ -1523,10 +1523,10 @@ d3d12_select_shader_variants(struct d3d12_context *ctx, const struct pipe_draw_i
next = get_next_shader(ctx, MESA_SHADER_TESS_EVAL);
select_shader_variant(&sel_ctx, stages[MESA_SHADER_TESS_EVAL], prev, next);
}
if (stages[PIPE_SHADER_GEOMETRY]) {
prev = get_prev_shader(ctx, PIPE_SHADER_GEOMETRY);
next = get_next_shader(ctx, PIPE_SHADER_GEOMETRY);
select_shader_variant(&sel_ctx, stages[PIPE_SHADER_GEOMETRY], prev, next);
if (stages[MESA_SHADER_GEOMETRY]) {
prev = get_prev_shader(ctx, MESA_SHADER_GEOMETRY);
next = get_next_shader(ctx, MESA_SHADER_GEOMETRY);
select_shader_variant(&sel_ctx, stages[MESA_SHADER_GEOMETRY], prev, next);
}
if (stages[PIPE_SHADER_FRAGMENT]) {
prev = get_prev_shader(ctx, PIPE_SHADER_FRAGMENT);

View file

@ -1124,20 +1124,20 @@ static void *
d3d12_create_gs_state(struct pipe_context *pctx,
const struct pipe_shader_state *shader)
{
return d3d12_create_shader(d3d12_context(pctx), PIPE_SHADER_GEOMETRY, shader);
return d3d12_create_shader(d3d12_context(pctx), MESA_SHADER_GEOMETRY, shader);
}
static void
d3d12_bind_gs_state(struct pipe_context *pctx, void *gss)
{
bind_stage(d3d12_context(pctx), PIPE_SHADER_GEOMETRY,
bind_stage(d3d12_context(pctx), MESA_SHADER_GEOMETRY,
(struct d3d12_shader_selector *) gss);
}
static void
d3d12_delete_gs_state(struct pipe_context *pctx, void *gs)
{
delete_shader(d3d12_context(pctx), PIPE_SHADER_GEOMETRY,
delete_shader(d3d12_context(pctx), MESA_SHADER_GEOMETRY,
(struct d3d12_shader_selector *) gs);
}
@ -1952,7 +1952,7 @@ d3d12_clear_render_target(struct pipe_context *pctx,
util_blitter_save_rasterizer(ctx->blitter, ctx->gfx_pipeline_state.rast);
util_blitter_save_fragment_shader(ctx->blitter, ctx->gfx_stages[PIPE_SHADER_FRAGMENT]);
util_blitter_save_vertex_shader(ctx->blitter, ctx->gfx_stages[MESA_SHADER_VERTEX]);
util_blitter_save_geometry_shader(ctx->blitter, ctx->gfx_stages[PIPE_SHADER_GEOMETRY]);
util_blitter_save_geometry_shader(ctx->blitter, ctx->gfx_stages[MESA_SHADER_GEOMETRY]);
util_blitter_save_tessctrl_shader(ctx->blitter, ctx->gfx_stages[MESA_SHADER_TESS_CTRL]);
util_blitter_save_tesseval_shader(ctx->blitter, ctx->gfx_stages[MESA_SHADER_TESS_EVAL]);

View file

@ -614,8 +614,8 @@ validate_stream_output_targets(struct d3d12_context *ctx)
unsigned factor = 0;
if (ctx->gfx_pipeline_state.num_so_targets &&
ctx->gfx_pipeline_state.stages[PIPE_SHADER_GEOMETRY])
factor = ctx->gfx_pipeline_state.stages[PIPE_SHADER_GEOMETRY]->key.gs.stream_output_factor;
ctx->gfx_pipeline_state.stages[MESA_SHADER_GEOMETRY])
factor = ctx->gfx_pipeline_state.stages[MESA_SHADER_GEOMETRY]->key.gs.stream_output_factor;
if (factor > 1)
return d3d12_enable_fake_so_buffers(ctx, factor);
@ -743,7 +743,7 @@ prim_supported(enum mesa_prim prim_type)
static inline struct d3d12_shader_selector *
d3d12_last_vertex_stage(struct d3d12_context *ctx)
{
struct d3d12_shader_selector *sel = ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
struct d3d12_shader_selector *sel = ctx->gfx_stages[MESA_SHADER_GEOMETRY];
if (!sel || sel->is_variant)
sel = ctx->gfx_stages[MESA_SHADER_TESS_EVAL];
if (!sel)

View file

@ -151,7 +151,7 @@ d3d12_make_passthrough_gs(struct d3d12_context *ctx, struct d3d12_gs_variant_key
templ.ir.nir = nir;
templ.stream_output.num_outputs = 0;
gs = d3d12_create_shader(ctx, PIPE_SHADER_GEOMETRY, &templ);
gs = d3d12_create_shader(ctx, MESA_SHADER_GEOMETRY, &templ);
return gs;
}
@ -344,7 +344,7 @@ d3d12_finish_emit_primitives_gs(struct emit_primitives_context *emit_ctx, bool e
templ.ir.nir = nir;
templ.stream_output.num_outputs = 0;
return d3d12_create_shader(emit_ctx->ctx, PIPE_SHADER_GEOMETRY, &templ);
return d3d12_create_shader(emit_ctx->ctx, MESA_SHADER_GEOMETRY, &templ);
}
static d3d12_shader_selector*

View file

@ -301,8 +301,8 @@ create_gfx_pipeline_state(struct d3d12_context *ctx)
last_vertex_stage_nir = shader->nir;
}
if (state->stages[PIPE_SHADER_GEOMETRY]) {
auto shader = state->stages[PIPE_SHADER_GEOMETRY];
if (state->stages[MESA_SHADER_GEOMETRY]) {
auto shader = state->stages[MESA_SHADER_GEOMETRY];
pso_desc.GS = D3D12_SHADER_BYTECODE{ shader->bytecode, shader->bytecode_length };
last_vertex_stage_nir = shader->nir;
}

View file

@ -323,7 +323,7 @@ subquery_should_be_active(struct d3d12_context *ctx, struct d3d12_query *q, unsi
switch (q->type) {
case PIPE_QUERY_PRIMITIVES_GENERATED: {
bool has_xfb = !!ctx->gfx_pipeline_state.num_so_targets;
struct d3d12_shader_selector *gs = ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
struct d3d12_shader_selector *gs = ctx->gfx_stages[MESA_SHADER_GEOMETRY];
bool has_gs = gs && !gs->is_variant;
switch (sub_query) {
case 0: return has_xfb;

View file

@ -45,7 +45,7 @@ get_shader_visibility(enum pipe_shader_type stage)
return D3D12_SHADER_VISIBILITY_VERTEX;
case PIPE_SHADER_FRAGMENT:
return D3D12_SHADER_VISIBILITY_PIXEL;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return D3D12_SHADER_VISIBILITY_GEOMETRY;
case MESA_SHADER_TESS_CTRL:
return D3D12_SHADER_VISIBILITY_HULL;

View file

@ -146,7 +146,7 @@ d3d12_init_shader_caps(struct d3d12_screen *screen)
caps->max_inputs = D3D12_PS_INPUT_REGISTER_COUNT;
caps->max_outputs = D3D12_PS_OUTPUT_REGISTER_COUNT;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
caps->max_inputs = D3D12_GS_INPUT_REGISTER_COUNT;
caps->max_outputs = D3D12_GS_OUTPUT_REGISTER_COUNT;
break;

View file

@ -355,7 +355,7 @@ fd6_build_user_consts(struct fd6_emit *emit)
emit_user_consts<CHIP>(emit->ds, constobj, &ctx->constbuf[MESA_SHADER_TESS_EVAL]);
}
if (emit->gs) {
emit_user_consts<CHIP>(emit->gs, constobj, &ctx->constbuf[PIPE_SHADER_GEOMETRY]);
emit_user_consts<CHIP>(emit->gs, constobj, &ctx->constbuf[MESA_SHADER_GEOMETRY]);
}
}
emit_user_consts<CHIP>(emit->fs, constobj, &ctx->constbuf[PIPE_SHADER_FRAGMENT]);

View file

@ -183,7 +183,7 @@ setup_state_map(struct fd_context *ctx)
BIT(FD6_GROUP_HS_TEX));
fd_context_add_shader_map(ctx, MESA_SHADER_TESS_EVAL, FD_DIRTY_SHADER_TEX,
BIT(FD6_GROUP_DS_TEX));
fd_context_add_shader_map(ctx, PIPE_SHADER_GEOMETRY, FD_DIRTY_SHADER_TEX,
fd_context_add_shader_map(ctx, MESA_SHADER_GEOMETRY, FD_DIRTY_SHADER_TEX,
BIT(FD6_GROUP_GS_TEX));
fd_context_add_shader_map(ctx, PIPE_SHADER_FRAGMENT, FD_DIRTY_SHADER_TEX,
BIT(FD6_GROUP_FS_TEX));
@ -199,7 +199,7 @@ setup_state_map(struct fd_context *ctx)
fd_context_add_shader_map(ctx, MESA_SHADER_TESS_EVAL,
FD_DIRTY_SHADER_SSBO | FD_DIRTY_SHADER_IMAGE,
BIT(FD6_GROUP_DS_BINDLESS));
fd_context_add_shader_map(ctx, PIPE_SHADER_GEOMETRY,
fd_context_add_shader_map(ctx, MESA_SHADER_GEOMETRY,
FD_DIRTY_SHADER_SSBO | FD_DIRTY_SHADER_IMAGE,
BIT(FD6_GROUP_GS_BINDLESS));
/* NOTE: FD6_GROUP_FS_BINDLESS has a weak dependency on the program

View file

@ -671,7 +671,7 @@ fd6_emit_3d_state(struct fd_ringbuffer *ring, struct fd6_emit *emit)
fd6_state_take_group(&emit->state, state, FD6_GROUP_DS_BINDLESS);
break;
case FD6_GROUP_GS_BINDLESS:
state = fd6_build_bindless_state<CHIP>(ctx, PIPE_SHADER_GEOMETRY, false);
state = fd6_build_bindless_state<CHIP>(ctx, MESA_SHADER_GEOMETRY, false);
fd6_state_take_group(&emit->state, state, FD6_GROUP_GS_BINDLESS);
break;
case FD6_GROUP_FS_BINDLESS:
@ -705,7 +705,7 @@ fd6_emit_3d_state(struct fd_ringbuffer *ring, struct fd6_emit *emit)
fd6_state_take_group(&emit->state, state, FD6_GROUP_DS_TEX);
break;
case FD6_GROUP_GS_TEX:
state = tex_state(ctx, PIPE_SHADER_GEOMETRY);
state = tex_state(ctx, MESA_SHADER_GEOMETRY);
fd6_state_take_group(&emit->state, state, FD6_GROUP_GS_TEX);
break;
case FD6_GROUP_FS_TEX:

View file

@ -631,7 +631,7 @@ build_texture_state(struct fd_context *ctx, enum pipe_shader_type type,
tex_const_reg = REG_A6XX_SP_DS_TEXMEMOBJ_BASE;
tex_count_reg = REG_A6XX_SP_DS_TSIZE;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
sb = SB6_GS_TEX;
opcode = CP_LOAD_STATE6_GEOM;
tex_samp_reg = REG_A6XX_SP_GS_SAMPLER_BASE;

View file

@ -99,8 +99,8 @@ fd_gs_state_bind(struct pipe_context *pctx, void *hwcso) in_dt
{
struct fd_context *ctx = fd_context(pctx);
ctx->prog.gs = hwcso;
fd_context_dirty_shader(ctx, PIPE_SHADER_GEOMETRY, FD_DIRTY_SHADER_PROG);
update_bound_stage(ctx, PIPE_SHADER_GEOMETRY, !!hwcso);
fd_context_dirty_shader(ctx, MESA_SHADER_GEOMETRY, FD_DIRTY_SHADER_PROG);
update_bound_stage(ctx, MESA_SHADER_GEOMETRY, !!hwcso);
}
static void

View file

@ -210,7 +210,7 @@ fd_init_shader_caps(struct fd_screen *screen)
switch (i) {
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
if (!is_a6xx(screen))
continue;
if (screen->info->a6xx.is_a702)
@ -231,7 +231,7 @@ fd_init_shader_caps(struct fd_screen *screen)
caps->max_control_flow_depth = 8; /* XXX */
caps->max_inputs = is_a6xx(screen) && i != PIPE_SHADER_GEOMETRY ?
caps->max_inputs = is_a6xx(screen) && i != MESA_SHADER_GEOMETRY ?
screen->info->a6xx.vs_max_inputs_count : 16;
caps->max_outputs =
@ -573,7 +573,7 @@ fd_init_screen_caps(struct fd_screen *screen)
* the frontend clip-plane lowering. So we handle this in the backend
*
*/
screen->base.shader_caps[PIPE_SHADER_GEOMETRY].max_instructions ? 1 :
screen->base.shader_caps[MESA_SHADER_GEOMETRY].max_instructions ? 1 :
/* On a3xx, there is HW support for GL user clip planes that
* occasionally has to fall back to shader key-based lowering to clip
* distances in the VS, and we don't support clip distances so that is

View file

@ -38,7 +38,7 @@ ir3_shader_descriptor_set(enum pipe_shader_type shader)
case MESA_SHADER_VERTEX: return 0;
case MESA_SHADER_TESS_CTRL: return 1;
case MESA_SHADER_TESS_EVAL: return 2;
case PIPE_SHADER_GEOMETRY: return 3;
case MESA_SHADER_GEOMETRY: return 3;
case PIPE_SHADER_FRAGMENT: return 4;
case PIPE_SHADER_COMPUTE: return 0;
case MESA_SHADER_KERNEL: return 0;

View file

@ -728,7 +728,7 @@ i915_set_constant_buffer(struct pipe_context *pipe,
bool diff = true;
/* XXX don't support geom shaders now */
if (shader == PIPE_SHADER_GEOMETRY)
if (shader == MESA_SHADER_GEOMETRY)
return;
if (cb && cb->user_buffer) {

View file

@ -110,8 +110,8 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
lp->num_sampler_views[MESA_SHADER_VERTEX],
lp->sampler_views[MESA_SHADER_VERTEX]);
llvmpipe_prepare_geometry_sampling(lp,
lp->num_sampler_views[PIPE_SHADER_GEOMETRY],
lp->sampler_views[PIPE_SHADER_GEOMETRY]);
lp->num_sampler_views[MESA_SHADER_GEOMETRY],
lp->sampler_views[MESA_SHADER_GEOMETRY]);
llvmpipe_prepare_tess_ctrl_sampling(lp,
lp->num_sampler_views[MESA_SHADER_TESS_CTRL],
lp->sampler_views[MESA_SHADER_TESS_CTRL]);
@ -123,8 +123,8 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
lp->num_images[MESA_SHADER_VERTEX],
lp->images[MESA_SHADER_VERTEX]);
llvmpipe_prepare_geometry_images(lp,
lp->num_images[PIPE_SHADER_GEOMETRY],
lp->images[PIPE_SHADER_GEOMETRY]);
lp->num_images[MESA_SHADER_GEOMETRY],
lp->images[MESA_SHADER_GEOMETRY]);
llvmpipe_prepare_tess_ctrl_images(lp,
lp->num_images[MESA_SHADER_TESS_CTRL],
lp->images[MESA_SHADER_TESS_CTRL]);
@ -169,12 +169,12 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
}
llvmpipe_cleanup_stage_sampling(lp, MESA_SHADER_VERTEX);
llvmpipe_cleanup_stage_sampling(lp, PIPE_SHADER_GEOMETRY);
llvmpipe_cleanup_stage_sampling(lp, MESA_SHADER_GEOMETRY);
llvmpipe_cleanup_stage_sampling(lp, MESA_SHADER_TESS_CTRL);
llvmpipe_cleanup_stage_sampling(lp, MESA_SHADER_TESS_EVAL);
llvmpipe_cleanup_stage_images(lp, MESA_SHADER_VERTEX);
llvmpipe_cleanup_stage_images(lp, PIPE_SHADER_GEOMETRY);
llvmpipe_cleanup_stage_images(lp, MESA_SHADER_GEOMETRY);
llvmpipe_cleanup_stage_images(lp, MESA_SHADER_TESS_CTRL);
llvmpipe_cleanup_stage_images(lp, MESA_SHADER_TESS_EVAL);

View file

@ -136,7 +136,7 @@ llvmpipe_init_shader_caps(struct pipe_screen *screen)
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
case MESA_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
draw_init_shader_caps(caps);
if (debug_get_bool_option("DRAW_USE_LLVM", true)) {

View file

@ -4245,7 +4245,7 @@ llvmpipe_set_constant_buffer(struct pipe_context *pipe,
switch (shader) {
case MESA_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL: {
const unsigned size = cb ? cb->buffer_size : 0;
@ -4302,7 +4302,7 @@ llvmpipe_set_shader_buffers(struct pipe_context *pipe,
switch (shader) {
case MESA_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL: {
const unsigned size = buffer ? buffer->buffer_size : 0;
@ -4362,7 +4362,7 @@ llvmpipe_set_shader_images(struct pipe_context *pipe,
llvmpipe->num_images[shader] = start_slot + count;
switch (shader) {
case MESA_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
draw_set_images(llvmpipe->draw, shader, llvmpipe->images[shader],

View file

@ -98,7 +98,7 @@ llvmpipe_bind_sampler_states(struct pipe_context *pipe,
switch (shader) {
case MESA_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
draw_set_samplers(llvmpipe->draw,
@ -181,7 +181,7 @@ llvmpipe_set_sampler_views(struct pipe_context *pipe,
switch (shader) {
case MESA_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
draw_set_sampler_views(llvmpipe->draw,
@ -402,7 +402,7 @@ llvmpipe_prepare_geometry_sampling(struct llvmpipe_context *lp,
unsigned num,
struct pipe_sampler_view **views)
{
prepare_shader_sampling(lp, num, views, PIPE_SHADER_GEOMETRY);
prepare_shader_sampling(lp, num, views, MESA_SHADER_GEOMETRY);
}
@ -561,7 +561,7 @@ llvmpipe_prepare_geometry_images(struct llvmpipe_context *lp,
unsigned num,
struct pipe_image_view *views)
{
prepare_shader_images(lp, num, views, PIPE_SHADER_GEOMETRY);
prepare_shader_images(lp, num, views, MESA_SHADER_GEOMETRY);
}

View file

@ -1246,7 +1246,7 @@ nv50_ir_init_prog_info(struct nv50_ir_prog_info *info,
info_out->prop.tp.domain = MESA_PRIM_COUNT;
info_out->prop.tp.outputPrim = MESA_PRIM_COUNT;
}
if (info->type == PIPE_SHADER_GEOMETRY) {
if (info->type == MESA_SHADER_GEOMETRY) {
info_out->prop.gp.instanceCount = 1;
info_out->prop.gp.maxVertices = 1;
}

View file

@ -992,7 +992,7 @@ nv50_ir_prog_info_out_print(struct nv50_ir_prog_info_out *info_out)
INFO(" \"domain\":\"%d\"\n", info_out->prop.tp.domain);
INFO(" \"outputPrim\":\"%d\"\n", info_out->prop.tp.outputPrim);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
INFO(" \"gp\":{\n");
INFO(" \"outputPrim\":\"%d\"\n", info_out->prop.gp.outputPrim);
INFO(" \"instancesCount\":\"%d\"\n", info_out->prop.gp.instanceCount);

View file

@ -116,7 +116,7 @@ nv50_ir_prog_info_out_serialize(struct blob *blob,
case MESA_SHADER_TESS_EVAL:
blob_write_bytes(blob, &info_out->prop.tp, sizeof(info_out->prop.tp));
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
blob_write_bytes(blob, &info_out->prop.gp, sizeof(info_out->prop.gp));
break;
case PIPE_SHADER_FRAGMENT:
@ -236,7 +236,7 @@ nv50_ir_prog_info_out_deserialize(void *data, size_t size, size_t offset,
case MESA_SHADER_TESS_EVAL:
blob_copy_bytes(&reader, &info_out->prop.tp, sizeof(info_out->prop.tp));
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
blob_copy_bytes(&reader, &info_out->prop.gp, sizeof(info_out->prop.gp));
break;
case PIPE_SHADER_FRAGMENT:

View file

@ -249,7 +249,7 @@ nv50_context_shader_stage(unsigned pipe)
switch (pipe) {
case MESA_SHADER_VERTEX: return NV50_SHADER_STAGE_VERTEX;
case PIPE_SHADER_FRAGMENT: return NV50_SHADER_STAGE_FRAGMENT;
case PIPE_SHADER_GEOMETRY: return NV50_SHADER_STAGE_GEOMETRY;
case MESA_SHADER_GEOMETRY: return NV50_SHADER_STAGE_GEOMETRY;
case PIPE_SHADER_COMPUTE: return NV50_SHADER_STAGE_COMPUTE;
default:
assert(!"invalid/unhandled shader type");

View file

@ -258,7 +258,7 @@ nv50_program_assign_varying_slots(struct nv50_ir_prog_info_out *info)
switch (info->type) {
case MESA_SHADER_VERTEX:
return nv50_vertprog_assign_slots(info);
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return nv50_vertprog_assign_slots(info);
case PIPE_SHADER_FRAGMENT:
return nv50_fragprog_assign_slots(info);
@ -414,7 +414,7 @@ nv50_program_translate(struct nv50_program *prog, uint16_t chipset,
if (info_out.prop.fp.usesDiscard)
prog->fp.flags[0] |= NV50_3D_FP_CONTROL_USES_KIL;
} else
if (prog->type == PIPE_SHADER_GEOMETRY) {
if (prog->type == MESA_SHADER_GEOMETRY) {
switch (info_out.prop.gp.outputPrim) {
case MESA_PRIM_LINE_STRIP:
prog->gp.prim_type = NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE_LINE_STRIP;
@ -466,7 +466,7 @@ nv50_program_upload_code(struct nv50_context *nv50, struct nv50_program *prog)
switch (prog->type) {
case MESA_SHADER_VERTEX: heap = nv50->screen->vp_code_heap; break;
case PIPE_SHADER_GEOMETRY: heap = nv50->screen->gp_code_heap; break;
case MESA_SHADER_GEOMETRY: heap = nv50->screen->gp_code_heap; break;
case PIPE_SHADER_FRAGMENT: heap = nv50->screen->fp_code_heap; break;
case PIPE_SHADER_COMPUTE: heap = nv50->screen->fp_code_heap; break;
default:

View file

@ -814,7 +814,7 @@ static void *
nv50_gp_state_create(struct pipe_context *pipe,
const struct pipe_shader_state *cso)
{
return nv50_sp_state_create(pipe, cso, PIPE_SHADER_GEOMETRY);
return nv50_sp_state_create(pipe, cso, MESA_SHADER_GEOMETRY);
}
static void

View file

@ -299,7 +299,7 @@ nvc0_shader_stage(unsigned pipe)
case MESA_SHADER_VERTEX: return 0;
case MESA_SHADER_TESS_CTRL: return 1;
case MESA_SHADER_TESS_EVAL: return 2;
case PIPE_SHADER_GEOMETRY: return 3;
case MESA_SHADER_GEOMETRY: return 3;
case PIPE_SHADER_FRAGMENT: return 4;
case PIPE_SHADER_COMPUTE: return 5;
default:

View file

@ -699,7 +699,7 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
case MESA_SHADER_TESS_EVAL:
ret = nvc0_tep_gen_header(prog, &info_out);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
ret = nvc0_gp_gen_header(prog, &info_out);
break;
case PIPE_SHADER_FRAGMENT:

View file

@ -671,7 +671,7 @@ static void *
nvc0_gp_state_create(struct pipe_context *pipe,
const struct pipe_shader_state *cso)
{
return nvc0_sp_state_create(pipe, cso, PIPE_SHADER_GEOMETRY);
return nvc0_sp_state_create(pipe, cso, MESA_SHADER_GEOMETRY);
}
static void

View file

@ -2369,7 +2369,7 @@ static void evergreen_emit_vs_constant_buffers(struct r600_context *rctx, struct
static void evergreen_emit_gs_constant_buffers(struct r600_context *rctx, struct r600_atom *atom)
{
evergreen_emit_constant_buffers(rctx, &rctx->constbuf_state[PIPE_SHADER_GEOMETRY],
evergreen_emit_constant_buffers(rctx, &rctx->constbuf_state[MESA_SHADER_GEOMETRY],
EG_FETCH_CONSTANTS_OFFSET_GS,
R_0281C0_ALU_CONST_BUFFER_SIZE_GS_0,
R_0289C0_ALU_CONST_CACHE_GS_0,
@ -2487,7 +2487,7 @@ static void evergreen_emit_vs_sampler_views(struct r600_context *rctx, struct r6
static void evergreen_emit_gs_sampler_views(struct r600_context *rctx, struct r600_atom *atom)
{
evergreen_emit_sampler_views(rctx, &rctx->samplers[PIPE_SHADER_GEOMETRY].views,
evergreen_emit_sampler_views(rctx, &rctx->samplers[MESA_SHADER_GEOMETRY].views,
EG_FETCH_CONSTANTS_OFFSET_GS + R600_MAX_CONST_BUFFERS, 0);
}
@ -2856,7 +2856,7 @@ static void evergreen_emit_vs_sampler_states(struct r600_context *rctx, struct r
static void evergreen_emit_gs_sampler_states(struct r600_context *rctx, struct r600_atom *atom)
{
evergreen_emit_sampler_states(rctx, &rctx->samplers[PIPE_SHADER_GEOMETRY], 36,
evergreen_emit_sampler_states(rctx, &rctx->samplers[MESA_SHADER_GEOMETRY], 36,
R_00A428_TD_GS_SAMPLER0_BORDER_INDEX, 0);
}
@ -4819,7 +4819,7 @@ void evergreen_init_state_functions(struct r600_context *rctx)
r600_init_atom(rctx, &rctx->compute_buffers.atom, id++, evergreen_emit_compute_buffer_state, 0);
/* shader const */
r600_init_atom(rctx, &rctx->constbuf_state[MESA_SHADER_VERTEX].atom, id++, evergreen_emit_vs_constant_buffers, 0);
r600_init_atom(rctx, &rctx->constbuf_state[PIPE_SHADER_GEOMETRY].atom, id++, evergreen_emit_gs_constant_buffers, 0);
r600_init_atom(rctx, &rctx->constbuf_state[MESA_SHADER_GEOMETRY].atom, id++, evergreen_emit_gs_constant_buffers, 0);
r600_init_atom(rctx, &rctx->constbuf_state[PIPE_SHADER_FRAGMENT].atom, id++, evergreen_emit_ps_constant_buffers, 0);
r600_init_atom(rctx, &rctx->constbuf_state[MESA_SHADER_TESS_CTRL].atom, id++, evergreen_emit_tcs_constant_buffers, 0);
r600_init_atom(rctx, &rctx->constbuf_state[MESA_SHADER_TESS_EVAL].atom, id++, evergreen_emit_tes_constant_buffers, 0);
@ -4828,7 +4828,7 @@ void evergreen_init_state_functions(struct r600_context *rctx)
r600_init_atom(rctx, &rctx->cs_shader_state.atom, id++, evergreen_emit_cs_shader, 0);
/* sampler */
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_VERTEX].states.atom, id++, evergreen_emit_vs_sampler_states, 0);
r600_init_atom(rctx, &rctx->samplers[PIPE_SHADER_GEOMETRY].states.atom, id++, evergreen_emit_gs_sampler_states, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_GEOMETRY].states.atom, id++, evergreen_emit_gs_sampler_states, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_TESS_CTRL].states.atom, id++, evergreen_emit_tcs_sampler_states, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_TESS_EVAL].states.atom, id++, evergreen_emit_tes_sampler_states, 0);
r600_init_atom(rctx, &rctx->samplers[PIPE_SHADER_FRAGMENT].states.atom, id++, evergreen_emit_ps_sampler_states, 0);
@ -4837,7 +4837,7 @@ void evergreen_init_state_functions(struct r600_context *rctx)
r600_init_atom(rctx, &rctx->vertex_buffer_state.atom, id++, evergreen_fs_emit_vertex_buffers, 0);
r600_init_atom(rctx, &rctx->cs_vertex_buffer_state.atom, id++, evergreen_cs_emit_vertex_buffers, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_VERTEX].views.atom, id++, evergreen_emit_vs_sampler_views, 0);
r600_init_atom(rctx, &rctx->samplers[PIPE_SHADER_GEOMETRY].views.atom, id++, evergreen_emit_gs_sampler_views, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_GEOMETRY].views.atom, id++, evergreen_emit_gs_sampler_views, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_TESS_CTRL].views.atom, id++, evergreen_emit_tcs_sampler_views, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_TESS_EVAL].views.atom, id++, evergreen_emit_tes_sampler_views, 0);
r600_init_atom(rctx, &rctx->samplers[PIPE_SHADER_FRAGMENT].views.atom, id++, evergreen_emit_ps_sampler_views, 0);

View file

@ -50,7 +50,7 @@ struct u_log_context;
/* Debug flags. */
#define DBG_VS (1 << MESA_SHADER_VERTEX)
#define DBG_PS (1 << PIPE_SHADER_FRAGMENT)
#define DBG_GS (1 << PIPE_SHADER_GEOMETRY)
#define DBG_GS (1 << MESA_SHADER_GEOMETRY)
#define DBG_TCS (1 << MESA_SHADER_TESS_CTRL)
#define DBG_TES (1 << MESA_SHADER_TESS_EVAL)
#define DBG_CS (1 << PIPE_SHADER_COMPUTE)

View file

@ -236,7 +236,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
else
evergreen_update_vs_state(ctx, shader);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
if (rctx->b.gfx_level >= EVERGREEN) {
evergreen_update_gs_state(ctx, shader);
evergreen_update_vs_state(ctx, shader->gs_copy_shader);

View file

@ -1743,7 +1743,7 @@ static void r600_emit_vs_constant_buffers(struct r600_context *rctx, struct r600
static void r600_emit_gs_constant_buffers(struct r600_context *rctx, struct r600_atom *atom)
{
r600_emit_constant_buffers(rctx, &rctx->constbuf_state[PIPE_SHADER_GEOMETRY],
r600_emit_constant_buffers(rctx, &rctx->constbuf_state[MESA_SHADER_GEOMETRY],
R600_FETCH_CONSTANTS_OFFSET_GS,
R_0281C0_ALU_CONST_BUFFER_SIZE_GS_0,
R_0289C0_ALU_CONST_CACHE_GS_0);
@ -1795,7 +1795,7 @@ static void r600_emit_vs_sampler_views(struct r600_context *rctx, struct r600_at
static void r600_emit_gs_sampler_views(struct r600_context *rctx, struct r600_atom *atom)
{
r600_emit_sampler_views(rctx, &rctx->samplers[PIPE_SHADER_GEOMETRY].views, R600_FETCH_CONSTANTS_OFFSET_GS + R600_MAX_CONST_BUFFERS);
r600_emit_sampler_views(rctx, &rctx->samplers[MESA_SHADER_GEOMETRY].views, R600_FETCH_CONSTANTS_OFFSET_GS + R600_MAX_CONST_BUFFERS);
}
static void r600_emit_ps_sampler_views(struct r600_context *rctx, struct r600_atom *atom)
@ -1878,7 +1878,7 @@ static void r600_emit_vs_sampler_states(struct r600_context *rctx, struct r600_a
static void r600_emit_gs_sampler_states(struct r600_context *rctx, struct r600_atom *atom)
{
r600_emit_sampler_states(rctx, &rctx->samplers[PIPE_SHADER_GEOMETRY], 36, R_00A800_TD_GS_SAMPLER0_BORDER_RED);
r600_emit_sampler_states(rctx, &rctx->samplers[MESA_SHADER_GEOMETRY], 36, R_00A800_TD_GS_SAMPLER0_BORDER_RED);
}
static void r600_emit_ps_sampler_states(struct r600_context *rctx, struct r600_atom *atom)
@ -3066,18 +3066,18 @@ void r600_init_state_functions(struct r600_context *rctx)
/* shader const */
r600_init_atom(rctx, &rctx->constbuf_state[MESA_SHADER_VERTEX].atom, id++, r600_emit_vs_constant_buffers, 0);
r600_init_atom(rctx, &rctx->constbuf_state[PIPE_SHADER_GEOMETRY].atom, id++, r600_emit_gs_constant_buffers, 0);
r600_init_atom(rctx, &rctx->constbuf_state[MESA_SHADER_GEOMETRY].atom, id++, r600_emit_gs_constant_buffers, 0);
r600_init_atom(rctx, &rctx->constbuf_state[PIPE_SHADER_FRAGMENT].atom, id++, r600_emit_ps_constant_buffers, 0);
/* sampler must be emitted before TA_CNTL_AUX otherwise DISABLE_CUBE_WRAP change
* does not take effect (TA_CNTL_AUX emitted by r600_emit_seamless_cube_map)
*/
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_VERTEX].states.atom, id++, r600_emit_vs_sampler_states, 0);
r600_init_atom(rctx, &rctx->samplers[PIPE_SHADER_GEOMETRY].states.atom, id++, r600_emit_gs_sampler_states, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_GEOMETRY].states.atom, id++, r600_emit_gs_sampler_states, 0);
r600_init_atom(rctx, &rctx->samplers[PIPE_SHADER_FRAGMENT].states.atom, id++, r600_emit_ps_sampler_states, 0);
/* resource */
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_VERTEX].views.atom, id++, r600_emit_vs_sampler_views, 0);
r600_init_atom(rctx, &rctx->samplers[PIPE_SHADER_GEOMETRY].views.atom, id++, r600_emit_gs_sampler_views, 0);
r600_init_atom(rctx, &rctx->samplers[MESA_SHADER_GEOMETRY].views.atom, id++, r600_emit_gs_sampler_views, 0);
r600_init_atom(rctx, &rctx->samplers[PIPE_SHADER_FRAGMENT].views.atom, id++, r600_emit_ps_sampler_views, 0);
r600_init_atom(rctx, &rctx->vertex_buffer_state.atom, id++, r600_emit_vertex_buffers, 0);

View file

@ -265,7 +265,7 @@ static void r600_set_clip_state(struct pipe_context *ctx,
rctx->clip_state.state = *state;
r600_mark_atom_dirty(rctx, &rctx->clip_state.atom);
rctx->driver_consts[MESA_SHADER_VERTEX].vs_ucp_dirty = true;
rctx->driver_consts[PIPE_SHADER_GEOMETRY].vs_ucp_dirty = true;
rctx->driver_consts[MESA_SHADER_GEOMETRY].vs_ucp_dirty = true;
if (rctx->b.family >= CHIP_CEDAR)
rctx->driver_consts[MESA_SHADER_TESS_EVAL].vs_ucp_dirty = true;
}
@ -752,7 +752,7 @@ static int r600_get_hw_atomic_count(const struct pipe_context *ctx,
case MESA_SHADER_VERTEX:
value = rctx->ps_shader->info.file_count[TGSI_FILE_HW_ATOMIC];
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
value = rctx->ps_shader->info.file_count[TGSI_FILE_HW_ATOMIC] +
rctx->vs_shader->info.file_count[TGSI_FILE_HW_ATOMIC];
break;
@ -811,8 +811,8 @@ static inline void r600_shader_selector_key(const struct pipe_context *ctx,
key->vs.first_atomic_counter = r600_get_hw_atomic_count(ctx, MESA_SHADER_VERTEX);
break;
}
case PIPE_SHADER_GEOMETRY:
key->gs.first_atomic_counter = r600_get_hw_atomic_count(ctx, PIPE_SHADER_GEOMETRY);
case MESA_SHADER_GEOMETRY:
key->gs.first_atomic_counter = r600_get_hw_atomic_count(ctx, MESA_SHADER_GEOMETRY);
key->gs.tri_strip_adj_fix = rctx->gs_tri_strip_adj_fix;
break;
case PIPE_SHADER_FRAGMENT: {
@ -863,7 +863,7 @@ r600_shader_precompile_key(const struct pipe_context *ctx,
*/
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
break;
case PIPE_SHADER_FRAGMENT:
@ -989,7 +989,7 @@ static void *r600_create_shader_state(struct pipe_context *ctx,
sel->so = state->stream_output;
switch (pipe_shader_type) {
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
sel->gs_output_prim =
sel->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM];
sel->gs_max_out_vertices =
@ -1047,7 +1047,7 @@ static void *r600_create_vs_state(struct pipe_context *ctx,
static void *r600_create_gs_state(struct pipe_context *ctx,
const struct pipe_shader_state *state)
{
return r600_create_shader_state(ctx, state, PIPE_SHADER_GEOMETRY);
return r600_create_shader_state(ctx, state, MESA_SHADER_GEOMETRY);
}
static void *r600_create_tcs_state(struct pipe_context *ctx,
@ -1330,7 +1330,7 @@ void r600_update_driver_const_buffers(struct r600_context *rctx, bool compute_on
if (rctx->tes_shader)
last_vertex_stage = MESA_SHADER_TESS_EVAL;
if (rctx->gs_shader)
last_vertex_stage = PIPE_SHADER_GEOMETRY;
last_vertex_stage = MESA_SHADER_GEOMETRY;
for (sh = start; sh < end; sh++) {
struct r600_shader_driver_constants_info *info = &rctx->driver_consts[sh];
@ -1345,7 +1345,7 @@ void r600_update_driver_const_buffers(struct r600_context *rctx, bool compute_on
size = info->alloc_size;
if (info->vs_ucp_dirty) {
assert(sh == MESA_SHADER_VERTEX ||
sh == PIPE_SHADER_GEOMETRY ||
sh == MESA_SHADER_GEOMETRY ||
sh == MESA_SHADER_TESS_EVAL);
if (!size) {
ptr = rctx->clip_state.state.ucp;
@ -1598,7 +1598,7 @@ static void update_gs_block_state(struct r600_context *rctx, unsigned enable)
}
if (enable) {
r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_GEOMETRY,
r600_set_constant_buffer(&rctx->b.b, MESA_SHADER_GEOMETRY,
R600_GS_RING_CONST_BUFFER, false, &rctx->gs_rings.esgs_ring);
if (rctx->tes_shader) {
r600_set_constant_buffer(&rctx->b.b, MESA_SHADER_TESS_EVAL,
@ -1608,7 +1608,7 @@ static void update_gs_block_state(struct r600_context *rctx, unsigned enable)
R600_GS_RING_CONST_BUFFER, false, &rctx->gs_rings.gsvs_ring);
}
} else {
r600_set_constant_buffer(&rctx->b.b, PIPE_SHADER_GEOMETRY,
r600_set_constant_buffer(&rctx->b.b, MESA_SHADER_GEOMETRY,
R600_GS_RING_CONST_BUFFER, false, NULL);
r600_set_constant_buffer(&rctx->b.b, MESA_SHADER_VERTEX,
R600_GS_RING_CONST_BUFFER, false, NULL);
@ -2019,9 +2019,9 @@ static bool r600_update_derived_state(struct r600_context *rctx)
need_buf_const = rctx->gs_shader->current->shader.uses_tex_buffers || rctx->gs_shader->current->shader.has_txq_cube_array_z_comp;
if (need_buf_const) {
if (rctx->b.gfx_level < EVERGREEN)
r600_setup_buffer_constants(rctx, PIPE_SHADER_GEOMETRY);
r600_setup_buffer_constants(rctx, MESA_SHADER_GEOMETRY);
else
eg_setup_buffer_constants(rctx, PIPE_SHADER_GEOMETRY);
eg_setup_buffer_constants(rctx, MESA_SHADER_GEOMETRY);
}
}

View file

@ -375,7 +375,7 @@ GeometryShader::do_finalize()
void
GeometryShader::do_get_shader_info(r600_shader *sh_info)
{
sh_info->processor_type = PIPE_SHADER_GEOMETRY;
sh_info->processor_type = MESA_SHADER_GEOMETRY;
sh_info->ring_item_sizes[0] = m_ring_item_sizes[0];
sh_info->cc_dist_mask = m_cc_dist_mask;
sh_info->clip_dist_write = m_clip_dist_write;

View file

@ -596,7 +596,7 @@ si_get_user_data_base(enum amd_gfx_level gfx_level, enum si_has_tess has_tess,
return 0;
}
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
if (gfx_level == GFX9) {
return R_00B330_SPI_SHADER_USER_DATA_ES_0;
} else {

View file

@ -2244,7 +2244,7 @@ static void si_emit_graphics_shader_pointers(struct si_context *sctx, unsigned i
gfx12_push_consecutive_shader_pointers(sctx, SI_DESCS_SHADER_MASK(TESS_CTRL),
sh_base[MESA_SHADER_TESS_CTRL], gfx);
gfx12_push_consecutive_shader_pointers(sctx, SI_DESCS_SHADER_MASK(GEOMETRY),
sh_base[PIPE_SHADER_GEOMETRY], gfx);
sh_base[MESA_SHADER_GEOMETRY], gfx);
if (sctx->gs_attribute_ring_pointer_dirty) {
gfx12_push_gfx_sh_reg(R_00B230_SPI_SHADER_USER_DATA_GS_0 +
@ -2274,7 +2274,7 @@ static void si_emit_graphics_shader_pointers(struct si_context *sctx, unsigned i
gfx11_push_consecutive_shader_pointers(sctx, SI_DESCS_SHADER_MASK(TESS_CTRL),
sh_base[MESA_SHADER_TESS_CTRL], gfx);
gfx11_push_consecutive_shader_pointers(sctx, SI_DESCS_SHADER_MASK(GEOMETRY),
sh_base[PIPE_SHADER_GEOMETRY], gfx);
sh_base[MESA_SHADER_GEOMETRY], gfx);
if (sctx->gs_attribute_ring_pointer_dirty) {
gfx11_push_gfx_sh_reg(R_00B230_SPI_SHADER_USER_DATA_GS_0 +
@ -2305,7 +2305,7 @@ static void si_emit_graphics_shader_pointers(struct si_context *sctx, unsigned i
si_emit_consecutive_shader_pointers(sctx, SI_DESCS_SHADER_MASK(TESS_CTRL),
sh_base[MESA_SHADER_TESS_CTRL], gfx);
si_emit_consecutive_shader_pointers(sctx, SI_DESCS_SHADER_MASK(GEOMETRY),
sh_base[PIPE_SHADER_GEOMETRY], gfx);
sh_base[MESA_SHADER_GEOMETRY], gfx);
if (sctx->gs_attribute_ring_pointer_dirty) {
assert(sctx->gfx_level >= GFX11);
@ -2869,7 +2869,7 @@ void si_init_all_descriptors(struct si_context *sctx)
for (i = first_shader; i < SI_NUM_SHADERS; i++) {
bool is_2nd =
sctx->gfx_level >= GFX9 && (i == MESA_SHADER_TESS_CTRL || i == PIPE_SHADER_GEOMETRY);
sctx->gfx_level >= GFX9 && (i == MESA_SHADER_TESS_CTRL || i == MESA_SHADER_GEOMETRY);
unsigned num_sampler_slots = SI_NUM_IMAGE_SLOTS / 2 + SI_NUM_SAMPLERS;
unsigned num_buffer_slots = SI_NUM_SHADER_BUFFERS + SI_NUM_CONST_BUFFERS;
int rel_dw_offset;
@ -2879,7 +2879,7 @@ void si_init_all_descriptors(struct si_context *sctx)
if (i == MESA_SHADER_TESS_CTRL) {
rel_dw_offset =
(hs_sgpr0 - R_00B430_SPI_SHADER_USER_DATA_HS_0) / 4;
} else if (sctx->gfx_level >= GFX10) { /* PIPE_SHADER_GEOMETRY */
} else if (sctx->gfx_level >= GFX10) { /* MESA_SHADER_GEOMETRY */
rel_dw_offset =
(gs_sgpr0 - R_00B230_SPI_SHADER_USER_DATA_GS_0) / 4;
} else {
@ -2899,7 +2899,7 @@ void si_init_all_descriptors(struct si_context *sctx)
if (i == MESA_SHADER_TESS_CTRL) {
rel_dw_offset =
(hs_sgpr0 + 4 - R_00B430_SPI_SHADER_USER_DATA_HS_0) / 4;
} else if (sctx->gfx_level >= GFX10) { /* PIPE_SHADER_GEOMETRY */
} else if (sctx->gfx_level >= GFX10) { /* MESA_SHADER_GEOMETRY */
rel_dw_offset =
(gs_sgpr0 + 4 - R_00B230_SPI_SHADER_USER_DATA_GS_0) / 4;
} else {
@ -2964,9 +2964,9 @@ void si_init_all_descriptors(struct si_context *sctx)
si_set_user_data_base(sctx, MESA_SHADER_TESS_CTRL,
si_get_user_data_base(sctx->gfx_level, TESS_OFF, GS_OFF,
NGG_OFF, MESA_SHADER_TESS_CTRL));
si_set_user_data_base(sctx, PIPE_SHADER_GEOMETRY,
si_set_user_data_base(sctx, MESA_SHADER_GEOMETRY,
si_get_user_data_base(sctx->gfx_level, TESS_OFF, GS_OFF,
NGG_OFF, PIPE_SHADER_GEOMETRY));
NGG_OFF, MESA_SHADER_GEOMETRY));
si_set_user_data_base(sctx, PIPE_SHADER_FRAGMENT, R_00B030_SPI_SHADER_USER_DATA_PS_0);
}

View file

@ -718,7 +718,7 @@ si_sqtt_pipe_to_rgp_shader_stage(union si_shader_key *key, enum pipe_shader_type
return RGP_HW_STAGE_GS;
else
return RGP_HW_STAGE_VS;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return RGP_HW_STAGE_GS;
case PIPE_SHADER_FRAGMENT:
return RGP_HW_STAGE_PS;

View file

@ -1417,7 +1417,7 @@ static void si_bind_rs_state(struct pipe_context *ctx, void *state)
sctx->dirty_shaders_mask |=
BITFIELD_BIT(MESA_SHADER_VERTEX) |
BITFIELD_BIT(MESA_SHADER_TESS_EVAL) |
BITFIELD_BIT(PIPE_SHADER_GEOMETRY);
BITFIELD_BIT(MESA_SHADER_GEOMETRY);
}
if (old_rs->line_smooth != rs->line_smooth ||
@ -1762,7 +1762,7 @@ static void si_bind_dsa_state(struct pipe_context *ctx, void *state)
sctx->dirty_shaders_mask |=
BITFIELD_BIT(MESA_SHADER_VERTEX) |
BITFIELD_BIT(MESA_SHADER_TESS_EVAL) |
BITFIELD_BIT(PIPE_SHADER_GEOMETRY) |
BITFIELD_BIT(MESA_SHADER_GEOMETRY) |
BITFIELD_BIT(PIPE_SHADER_FRAGMENT);
}
@ -2804,7 +2804,7 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
sctx->dirty_shaders_mask |=
BITFIELD_BIT(MESA_SHADER_VERTEX) |
BITFIELD_BIT(MESA_SHADER_TESS_EVAL) |
BITFIELD_BIT(PIPE_SHADER_GEOMETRY) |
BITFIELD_BIT(MESA_SHADER_GEOMETRY) |
BITFIELD_BIT(PIPE_SHADER_FRAGMENT);
if (sctx->gfx_level < GFX12 && !sctx->decompression_enabled) {

View file

@ -47,7 +47,7 @@ static bool si_update_shaders(struct si_context *sctx)
bool is_tess_state_changed =
((sctx->dirty_shaders_mask & (BITFIELD_BIT(MESA_SHADER_TESS_CTRL) | BITFIELD_BIT(MESA_SHADER_TESS_EVAL))) != 0);
bool is_gs_state_changed =
(sctx->dirty_shaders_mask & BITFIELD_BIT(PIPE_SHADER_GEOMETRY)) != 0;
(sctx->dirty_shaders_mask & BITFIELD_BIT(MESA_SHADER_GEOMETRY)) != 0;
bool is_ps_state_changed =
(sctx->dirty_shaders_mask & BITFIELD_BIT(PIPE_SHADER_FRAGMENT)) != 0;
@ -1023,7 +1023,7 @@ static void si_emit_vs_state(struct si_context *sctx, unsigned index_size)
unsigned tes_base = si_get_user_data_base(GFX_VERSION, HAS_TESS, HAS_GS, NGG,
MESA_SHADER_TESS_EVAL);
unsigned gs_base = si_get_user_data_base(GFX_VERSION, HAS_TESS, HAS_GS, NGG,
PIPE_SHADER_GEOMETRY);
MESA_SHADER_GEOMETRY);
unsigned gs_copy_base = R_00B130_SPI_SHADER_USER_DATA_VS_0;
radeon_begin(cs);
@ -2166,7 +2166,7 @@ static void si_draw(struct pipe_context *ctx,
if (gs_tri_strip_adj_fix != sctx->shader.gs.key.ge.mono.u.gs_tri_strip_adj_fix) {
sctx->shader.gs.key.ge.mono.u.gs_tri_strip_adj_fix = gs_tri_strip_adj_fix;
sctx->dirty_shaders_mask |= BITFIELD_BIT(PIPE_SHADER_GEOMETRY);
sctx->dirty_shaders_mask |= BITFIELD_BIT(MESA_SHADER_GEOMETRY);
}
}
@ -2357,7 +2357,7 @@ static void si_draw(struct pipe_context *ctx,
if (needs_shader_update) {
sctx->dirty_shaders_mask |=
(HAS_GS ? BITFIELD_BIT(PIPE_SHADER_GEOMETRY) :
(HAS_GS ? BITFIELD_BIT(MESA_SHADER_GEOMETRY) :
(HAS_TESS ? BITFIELD_BIT(MESA_SHADER_TESS_EVAL) : BITFIELD_BIT(MESA_SHADER_VERTEX)));
}
}

View file

@ -2379,7 +2379,7 @@ void si_update_ps_inputs_read_or_disabled(struct si_context *sctx)
if (sctx->ps_inputs_read_or_disabled != ps_inputs_read_or_disabled) {
sctx->ps_inputs_read_or_disabled = ps_inputs_read_or_disabled;
sctx->dirty_shaders_mask |=
(sctx->shader.gs.cso ? BITFIELD_BIT(PIPE_SHADER_GEOMETRY) :
(sctx->shader.gs.cso ? BITFIELD_BIT(MESA_SHADER_GEOMETRY) :
(sctx->shader.tes.cso ? BITFIELD_BIT(MESA_SHADER_TESS_EVAL) : BITFIELD_BIT(MESA_SHADER_VERTEX)));
}
}
@ -2432,7 +2432,7 @@ void si_vs_ps_key_update_rast_prim_smooth_stipple(struct si_context *sctx)
sctx->dirty_shaders_mask |=
BITFIELD_BIT(MESA_SHADER_VERTEX) |
BITFIELD_BIT(MESA_SHADER_TESS_EVAL) |
BITFIELD_BIT(PIPE_SHADER_GEOMETRY);
BITFIELD_BIT(MESA_SHADER_GEOMETRY);
}
if (ps_key->ps.part.prolog.color_two_side != old_color_two_side ||
@ -3677,7 +3677,7 @@ void si_update_common_shader_state(struct si_context *sctx, struct si_shader_sel
else
sctx->uses_bindless_images &= ~BITFIELD_BIT(type);
if (type == MESA_SHADER_VERTEX || type == MESA_SHADER_TESS_EVAL || type == PIPE_SHADER_GEOMETRY)
if (type == MESA_SHADER_VERTEX || type == MESA_SHADER_TESS_EVAL || type == MESA_SHADER_GEOMETRY)
sctx->ngg_culling = 0; /* this will be enabled on the first draw if needed */
si_invalidate_inlinable_uniforms(sctx, type);
@ -3816,7 +3816,7 @@ static void si_bind_gs_shader(struct pipe_context *ctx, void *state)
#endif
sctx->ia_multi_vgt_param_key.u.uses_gs = sel != NULL;
si_update_common_shader_state(sctx, sel, PIPE_SHADER_GEOMETRY);
si_update_common_shader_state(sctx, sel, MESA_SHADER_GEOMETRY);
si_select_draw_vbo(sctx);
ngg_changed = si_update_ngg(sctx);

View file

@ -230,7 +230,7 @@ static void si_set_streamout_targets(struct pipe_context *ctx, unsigned num_targ
sctx->dirty_shaders_mask |=
BITFIELD_BIT(MESA_SHADER_VERTEX) |
BITFIELD_BIT(MESA_SHADER_TESS_EVAL) |
BITFIELD_BIT(PIPE_SHADER_GEOMETRY);
BITFIELD_BIT(MESA_SHADER_GEOMETRY);
}
sctx->streamout.output_prim = output_prim;
@ -495,7 +495,7 @@ void si_update_prims_generated_query_state(struct si_context *sctx, unsigned typ
if (si_update_ngg(sctx)) {
si_shader_change_notify(sctx);
sctx->dirty_shaders_mask |=
(sctx->shader.gs.cso ? BITFIELD_BIT(PIPE_SHADER_GEOMETRY) :
(sctx->shader.gs.cso ? BITFIELD_BIT(MESA_SHADER_GEOMETRY) :
(sctx->shader.tes.cso ? BITFIELD_BIT(MESA_SHADER_TESS_EVAL) : BITFIELD_BIT(MESA_SHADER_VERTEX)));
}
}

View file

@ -275,9 +275,9 @@ softpipe_create_context(struct pipe_screen *screen,
softpipe->tgsi.sampler[MESA_SHADER_VERTEX]);
draw_texture_sampler(softpipe->draw,
PIPE_SHADER_GEOMETRY,
MESA_SHADER_GEOMETRY,
(struct tgsi_sampler *)
softpipe->tgsi.sampler[PIPE_SHADER_GEOMETRY]);
softpipe->tgsi.sampler[MESA_SHADER_GEOMETRY]);
draw_image(softpipe->draw,
MESA_SHADER_VERTEX,
@ -285,9 +285,9 @@ softpipe_create_context(struct pipe_screen *screen,
softpipe->tgsi.image[MESA_SHADER_VERTEX]);
draw_image(softpipe->draw,
PIPE_SHADER_GEOMETRY,
MESA_SHADER_GEOMETRY,
(struct tgsi_image *)
softpipe->tgsi.image[PIPE_SHADER_GEOMETRY]);
softpipe->tgsi.image[MESA_SHADER_GEOMETRY]);
draw_buffer(softpipe->draw,
MESA_SHADER_VERTEX,
@ -295,9 +295,9 @@ softpipe_create_context(struct pipe_screen *screen,
softpipe->tgsi.buffer[MESA_SHADER_VERTEX]);
draw_buffer(softpipe->draw,
PIPE_SHADER_GEOMETRY,
MESA_SHADER_GEOMETRY,
(struct tgsi_buffer *)
softpipe->tgsi.buffer[PIPE_SHADER_GEOMETRY]);
softpipe->tgsi.buffer[MESA_SHADER_GEOMETRY]);
softpipe->vbuf_backend = sp_create_vbuf_backend(softpipe);
if (!softpipe->vbuf_backend)

View file

@ -126,8 +126,8 @@ softpipe_draw_vbo(struct pipe_context *pipe,
sp->num_sampler_views[MESA_SHADER_VERTEX],
sp->sampler_views[MESA_SHADER_VERTEX]);
softpipe_prepare_geometry_sampling(sp,
sp->num_sampler_views[PIPE_SHADER_GEOMETRY],
sp->sampler_views[PIPE_SHADER_GEOMETRY]);
sp->num_sampler_views[MESA_SHADER_GEOMETRY],
sp->sampler_views[MESA_SHADER_GEOMETRY]);
}
if (sp->gs && !sp->gs->shader.tokens) {

View file

@ -206,7 +206,7 @@ softpipe_init_shader_caps(struct softpipe_screen *sp_screen)
switch(i) {
case MESA_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
if (sp_screen->use_llvm) {
draw_init_shader_caps(caps);
break;

View file

@ -307,7 +307,7 @@ update_tgsi_samplers( struct softpipe_context *softpipe )
set_shader_sampler(softpipe, PIPE_SHADER_FRAGMENT,
softpipe->fs_variant->info.file_max[TGSI_FILE_SAMPLER]);
if (softpipe->gs) {
set_shader_sampler(softpipe, PIPE_SHADER_GEOMETRY,
set_shader_sampler(softpipe, MESA_SHADER_GEOMETRY,
softpipe->gs->max_sampler);
}

View file

@ -75,7 +75,7 @@ softpipe_bind_sampler_states(struct pipe_context *pipe,
softpipe->num_samplers[shader] = j;
}
if (shader == MESA_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
if (shader == MESA_SHADER_VERTEX || shader == MESA_SHADER_GEOMETRY) {
draw_set_samplers(softpipe->draw,
shader,
softpipe->samplers[shader],
@ -152,7 +152,7 @@ softpipe_set_sampler_views(struct pipe_context *pipe,
softpipe->num_sampler_views[shader] = j;
}
if (shader == MESA_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
if (shader == MESA_SHADER_VERTEX || shader == MESA_SHADER_GEOMETRY) {
draw_set_sampler_views(softpipe->draw,
shader,
softpipe->sampler_views[shader],
@ -323,7 +323,7 @@ softpipe_prepare_geometry_sampling(struct softpipe_context *sp,
unsigned num,
struct pipe_sampler_view **views)
{
prepare_shader_sampling(sp, num, views, PIPE_SHADER_GEOMETRY,
prepare_shader_sampling(sp, num, views, MESA_SHADER_GEOMETRY,
sp->mapped_gs_tex);
}
@ -333,7 +333,7 @@ softpipe_cleanup_geometry_sampling(struct softpipe_context *ctx)
unsigned i;
for (i = 0; i < ARRAY_SIZE(ctx->mapped_gs_tex); i++) {
sp_sampler_view_display_target_unmap(
ctx, ctx->sampler_views[PIPE_SHADER_GEOMETRY][i]);
ctx, ctx->sampler_views[MESA_SHADER_GEOMETRY][i]);
pipe_resource_reference(&ctx->mapped_gs_tex[i], NULL);
}
}

View file

@ -389,7 +389,7 @@ softpipe_set_constant_buffer(struct pipe_context *pipe,
pipe_resource_reference(&softpipe->constants[shader][index], constants);
}
if (shader == MESA_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
if (shader == MESA_SHADER_VERTEX || shader == MESA_SHADER_GEOMETRY) {
draw_set_mapped_constant_buffer(softpipe->draw, shader, index, data, size);
}

View file

@ -70,7 +70,7 @@ svga_set_constant_buffer(struct pipe_context *pipe,
svga->dirty |= SVGA_NEW_FS_CONSTS;
else if (shader == MESA_SHADER_VERTEX)
svga->dirty |= SVGA_NEW_VS_CONSTS;
else if (shader == PIPE_SHADER_GEOMETRY)
else if (shader == MESA_SHADER_GEOMETRY)
svga->dirty |= SVGA_NEW_GS_CONSTS;
else if (shader == MESA_SHADER_TESS_CTRL)
svga->dirty |= SVGA_NEW_TCS_CONSTS;
@ -83,7 +83,7 @@ svga_set_constant_buffer(struct pipe_context *pipe,
svga->dirty |= SVGA_NEW_FS_CONST_BUFFER;
else if (shader == MESA_SHADER_VERTEX)
svga->dirty |= SVGA_NEW_VS_CONST_BUFFER;
else if (shader == PIPE_SHADER_GEOMETRY)
else if (shader == MESA_SHADER_GEOMETRY)
svga->dirty |= SVGA_NEW_GS_CONST_BUFFER;
else if (shader == MESA_SHADER_TESS_CTRL)
svga->dirty |= SVGA_NEW_TCS_CONST_BUFFER;

View file

@ -27,7 +27,7 @@ svga_create_gs_state(struct pipe_context *pipe,
SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_CREATEGS);
gs = (struct svga_geometry_shader *)
svga_create_shader(pipe, templ, PIPE_SHADER_GEOMETRY,
svga_create_shader(pipe, templ, MESA_SHADER_GEOMETRY,
sizeof(struct svga_geometry_shader));
if (!gs)
@ -60,7 +60,7 @@ svga_bind_gs_state(struct pipe_context *pipe, void *shader)
svga->dirty |= SVGA_NEW_GS;
/* Check if the shader uses samplers */
svga_set_curr_shader_use_samplers_flag(svga, PIPE_SHADER_GEOMETRY,
svga_set_curr_shader_use_samplers_flag(svga, MESA_SHADER_GEOMETRY,
svga_shader_use_samplers(&gs->base));
}

View file

@ -288,7 +288,7 @@ vgpu10_init_shader_caps(struct svga_screen *svgascreen)
caps->max_inputs = VGPU10_MAX_PS_INPUTS;
caps->max_outputs = VGPU10_MAX_PS_OUTPUTS;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
caps->max_inputs = svgascreen->max_gs_inputs;
caps->max_outputs = VGPU10_MAX_GS_OUTPUTS;
break;

View file

@ -779,7 +779,7 @@ svga_new_shader_variant(struct svga_context *svga, enum pipe_shader_type type)
case PIPE_SHADER_FRAGMENT:
variant = CALLOC(1, sizeof(struct svga_fs_variant));
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
variant = CALLOC(1, sizeof(struct svga_gs_variant));
break;
case MESA_SHADER_VERTEX:

View file

@ -534,7 +534,7 @@ svga_shader_type(enum pipe_shader_type shader)
switch (shader) {
case MESA_SHADER_VERTEX:
return SVGA3D_SHADERTYPE_VS;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return SVGA3D_SHADERTYPE_GS;
case PIPE_SHADER_FRAGMENT:
return SVGA3D_SHADERTYPE_PS;

View file

@ -315,7 +315,7 @@ svga_get_extra_gs_constants(const struct svga_context *svga, float *dest)
/* common constants */
count += svga_get_extra_constants_common(svga, variant,
PIPE_SHADER_GEOMETRY, dest);
MESA_SHADER_GEOMETRY, dest);
assert(count <= MAX_EXTRA_CONSTS);
return count;
@ -884,7 +884,7 @@ emit_consts_vgpu10(struct svga_context *svga, enum pipe_shader_type shader)
const struct svga_shader_variant *variant;
assert(shader == MESA_SHADER_VERTEX ||
shader == PIPE_SHADER_GEOMETRY ||
shader == MESA_SHADER_GEOMETRY ||
shader == PIPE_SHADER_FRAGMENT ||
shader == MESA_SHADER_TESS_CTRL ||
shader == MESA_SHADER_TESS_EVAL ||
@ -901,7 +901,7 @@ emit_consts_vgpu10(struct svga_context *svga, enum pipe_shader_type shader)
variant = svga->state.hw_draw.fs;
extra_count = svga_get_extra_fs_constants(svga, (float *) extras);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
variant = svga->state.hw_draw.gs;
extra_count = svga_get_extra_gs_constants(svga, (float *) extras);
break;
@ -1185,7 +1185,7 @@ emit_gs_consts(struct svga_context *svga, uint64_t dirty)
if (dirty == SVGA_NEW_RAST && !variant->key.gs.wide_point)
return PIPE_OK;
ret = emit_consts_vgpu10(svga, PIPE_SHADER_GEOMETRY);
ret = emit_consts_vgpu10(svga, MESA_SHADER_GEOMETRY);
return ret;
}
@ -1205,7 +1205,7 @@ emit_gs_constbuf(struct svga_context *svga, uint64_t dirty)
/* SVGA_NEW_GS_CONSTBUF
*/
assert(svga_have_vgpu10(svga));
ret = emit_constbuf_vgpu10(svga, PIPE_SHADER_GEOMETRY);
ret = emit_constbuf_vgpu10(svga, MESA_SHADER_GEOMETRY);
return ret;
}
@ -1452,7 +1452,7 @@ update_rawbuf(struct svga_context *svga, uint64 dirty)
uint64_t rawbuf_dirtybit[] = {
SVGA_NEW_VS_RAW_BUFFER, /* MESA_SHADER_VERTEX */
SVGA_NEW_FS_RAW_BUFFER, /* PIPE_SHADER_FRAGMENT */
SVGA_NEW_GS_RAW_BUFFER, /* PIPE_SHADER_GEOMETRY */
SVGA_NEW_GS_RAW_BUFFER, /* MESA_SHADER_GEOMETRY */
SVGA_NEW_TCS_RAW_BUFFER, /* MESA_SHADER_TESS_CTRL */
SVGA_NEW_TES_RAW_BUFFER, /* MESA_SHADER_TESS_EVAL */
};

View file

@ -60,7 +60,7 @@ make_gs_key(struct svga_context *svga, struct svga_compile_key *key)
/*
* SVGA_NEW_TEXTURE_BINDING | SVGA_NEW_SAMPLER
*/
svga_init_shader_key_common(svga, PIPE_SHADER_GEOMETRY, &gs->base, key);
svga_init_shader_key_common(svga, MESA_SHADER_GEOMETRY, &gs->base, key);
memcpy(key->generic_remap_table, gs->generic_remap_table,
sizeof(gs->generic_remap_table));

View file

@ -61,7 +61,7 @@ bind_shader(struct svga_context *svga,
*/
svga_bind_fs_state(&svga->pipe, shader);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
svga->pipe.bind_gs_state(&svga->pipe, shader);
break;
case MESA_SHADER_TESS_CTRL:
@ -95,7 +95,7 @@ create_shader(struct svga_context *svga,
* is used.
*/
return svga_create_fs_state(&svga->pipe, state);
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return svga->pipe.create_gs_state(&svga->pipe, state);
case MESA_SHADER_TESS_CTRL:
return svga->pipe.create_tcs_state(&svga->pipe, state);

View file

@ -459,7 +459,7 @@ svga_tgsi_scan_shader(struct svga_shader *shader)
info->fs.color0_writes_all_cbufs =
tgsi_info->properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS];
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
info->gs.out_prim = tgsi_info->properties[TGSI_PROPERTY_GS_OUTPUT_PRIM];
info->gs.in_prim = tgsi_info->properties[TGSI_PROPERTY_GS_INPUT_PRIM];
break;

View file

@ -661,7 +661,7 @@ check_register_index(struct svga_shader_emitter_v10 *emit,
case VGPU10_OPCODE_DCL_INPUT_PS_SIV:
if ((emit->unit == MESA_SHADER_VERTEX &&
index >= emit->max_vs_inputs) ||
(emit->unit == PIPE_SHADER_GEOMETRY &&
(emit->unit == MESA_SHADER_GEOMETRY &&
index >= emit->max_gs_inputs) ||
(emit->unit == PIPE_SHADER_FRAGMENT &&
index >= VGPU10_MAX_PS_INPUTS) ||
@ -684,7 +684,7 @@ check_register_index(struct svga_shader_emitter_v10 *emit,
*/
if ((emit->unit == MESA_SHADER_VERTEX &&
index >= emit->max_vs_outputs) ||
(emit->unit == PIPE_SHADER_GEOMETRY &&
(emit->unit == MESA_SHADER_GEOMETRY &&
index >= VGPU10_MAX_GS_OUTPUTS) ||
(emit->unit == PIPE_SHADER_FRAGMENT &&
index >= VGPU10_MAX_PS_OUTPUTS) ||
@ -817,7 +817,7 @@ translate_shader_type(unsigned type)
switch (type) {
case MESA_SHADER_VERTEX:
return VGPU10_VERTEX_SHADER;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return VGPU10_GEOMETRY_SHADER;
case PIPE_SHADER_FRAGMENT:
return VGPU10_PIXEL_SHADER;
@ -1275,7 +1275,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit,
if (file == TGSI_FILE_OUTPUT) {
if (emit->unit == MESA_SHADER_VERTEX ||
emit->unit == PIPE_SHADER_GEOMETRY ||
emit->unit == MESA_SHADER_GEOMETRY ||
emit->unit == MESA_SHADER_TESS_EVAL) {
if (index == emit->vposition.out_index &&
emit->vposition.tmp_index != INVALID_INDEX) {
@ -1615,7 +1615,7 @@ emit_src_register(struct svga_shader_emitter_v10 *emit,
}
}
}
else if (emit->unit == PIPE_SHADER_GEOMETRY) {
else if (emit->unit == MESA_SHADER_GEOMETRY) {
if (file == TGSI_FILE_INPUT) {
if (index == emit->gs.prim_id_index) {
operand0.numComponents = VGPU10_OPERAND_0_COMPONENT;
@ -3139,7 +3139,7 @@ emit_property_instructions(struct svga_shader_emitter_v10 *emit)
{
VGPU10OpcodeToken0 opcode0;
assert(emit->unit == PIPE_SHADER_GEOMETRY);
assert(emit->unit == MESA_SHADER_GEOMETRY);
/* emit input primitive type declaration */
opcode0.value = 0;
@ -4763,11 +4763,11 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit,
* just a generic input name ("v#"), so there is no need to remap
* the index value.
*/
assert(emit->unit == PIPE_SHADER_GEOMETRY ||
assert(emit->unit == MESA_SHADER_GEOMETRY ||
emit->unit == MESA_SHADER_TESS_CTRL);
assert(emit->version >= 50);
if (emit->unit == PIPE_SHADER_GEOMETRY) {
if (emit->unit == MESA_SHADER_GEOMETRY) {
emit->gs.invocation_id_sys_index = index;
emit_input_declaration(emit, VGPU10_OPCODE_DCL_INPUT,
VGPU10_OPERAND_TYPE_INPUT_GS_INSTANCE_ID,
@ -5497,7 +5497,7 @@ emit_input_declarations(struct svga_shader_emitter_v10 *emit)
case PIPE_SHADER_FRAGMENT:
emit_fs_input_declarations(emit);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
emit_gs_input_declarations(emit);
break;
case MESA_SHADER_VERTEX:
@ -5537,7 +5537,7 @@ emit_output_declarations(struct svga_shader_emitter_v10 *emit)
case PIPE_SHADER_FRAGMENT:
emit_fs_output_declarations(emit);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
emit_gs_output_declarations(emit);
break;
case MESA_SHADER_VERTEX:
@ -5688,7 +5688,7 @@ emit_temporaries_declaration(struct svga_shader_emitter_v10 *emit)
emit->vs.vertex_id_tmp_index = total_temps++;
}
if (emit->unit == MESA_SHADER_VERTEX || emit->unit == PIPE_SHADER_GEOMETRY) {
if (emit->unit == MESA_SHADER_VERTEX || emit->unit == MESA_SHADER_GEOMETRY) {
if (emit->vposition.need_prescale || emit->key.vs.undo_viewport ||
emit->key.clip_plane_enable ||
emit->vposition.so_index != INVALID_INDEX) {
@ -5714,7 +5714,7 @@ emit_temporaries_declaration(struct svga_shader_emitter_v10 *emit)
emit->vs.adjusted_input[index] = total_temps++;
}
}
else if (emit->unit == PIPE_SHADER_GEOMETRY) {
else if (emit->unit == MESA_SHADER_GEOMETRY) {
if (emit->key.gs.writes_viewport_index)
emit->gs.viewport_index_tmp_index = total_temps++;
}
@ -6840,7 +6840,7 @@ emit_clip_distance_from_vpos(struct svga_shader_emitter_v10 *emit,
assert(num_clip_planes <= 8);
assert(emit->unit == MESA_SHADER_VERTEX ||
emit->unit == PIPE_SHADER_GEOMETRY ||
emit->unit == MESA_SHADER_GEOMETRY ||
emit->unit == MESA_SHADER_TESS_EVAL);
for (i = 0; i < num_clip_planes; i++) {
@ -6880,7 +6880,7 @@ emit_clip_vertex_instructions(struct svga_shader_emitter_v10 *emit)
const unsigned clip_vertex_tmp = emit->clip_vertex_tmp_index;
assert(emit->unit == MESA_SHADER_VERTEX ||
emit->unit == PIPE_SHADER_GEOMETRY ||
emit->unit == MESA_SHADER_GEOMETRY ||
emit->unit == MESA_SHADER_TESS_EVAL);
assert(emit->clip_mode == CLIP_VERTEX);
@ -7242,7 +7242,7 @@ static bool
emit_endprim(struct svga_shader_emitter_v10 *emit,
const struct tgsi_full_instruction *inst)
{
assert(emit->unit == PIPE_SHADER_GEOMETRY);
assert(emit->unit == MESA_SHADER_GEOMETRY);
begin_emit_instruction(emit);
if (emit->version >= 50) {
@ -11500,7 +11500,7 @@ emit_vertex(struct svga_shader_emitter_v10 *emit,
{
unsigned ret = true;
assert(emit->unit == PIPE_SHADER_GEOMETRY);
assert(emit->unit == MESA_SHADER_GEOMETRY);
/**
* Emit the viewport array index for the first vertex.
@ -12134,7 +12134,7 @@ static bool
emit_pre_helpers(struct svga_shader_emitter_v10 *emit)
{
/* Properties */
if (emit->unit == PIPE_SHADER_GEOMETRY)
if (emit->unit == MESA_SHADER_GEOMETRY)
emit_property_instructions(emit);
else if (emit->unit == MESA_SHADER_TESS_CTRL) {
emit_hull_shader_declarations(emit);
@ -12830,7 +12830,7 @@ compute_input_mapping(struct svga_context *svga,
prevShader = svga->curr.gs ?
&svga->curr.gs->base : (svga->curr.tes ?
&svga->curr.tes->base : &svga->curr.vs->base);
} else if (unit == PIPE_SHADER_GEOMETRY) {
} else if (unit == MESA_SHADER_GEOMETRY) {
prevShader = svga->curr.tes ? &svga->curr.tes->base : &svga->curr.vs->base;
} else if (unit == MESA_SHADER_TESS_EVAL) {
assert(svga->curr.tcs);
@ -12921,7 +12921,7 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga,
(void) make_immediate_reg_double; /* unused at this time */
assert(unit == MESA_SHADER_VERTEX ||
unit == PIPE_SHADER_GEOMETRY ||
unit == MESA_SHADER_GEOMETRY ||
unit == PIPE_SHADER_FRAGMENT ||
unit == MESA_SHADER_TESS_CTRL ||
unit == MESA_SHADER_TESS_EVAL ||
@ -12962,7 +12962,7 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga,
/* Determine how many prescale factors in the constant buffer */
emit->vposition.num_prescale = 1;
if (emit->vposition.need_prescale && emit->key.gs.writes_viewport_index) {
assert(emit->unit == PIPE_SHADER_GEOMETRY);
assert(emit->unit == MESA_SHADER_GEOMETRY);
emit->vposition.num_prescale = emit->key.gs.num_prescale;
}
@ -13095,7 +13095,7 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga,
determine_clipping_mode(emit);
if (unit == PIPE_SHADER_GEOMETRY || unit == MESA_SHADER_VERTEX ||
if (unit == MESA_SHADER_GEOMETRY || unit == MESA_SHADER_VERTEX ||
unit == MESA_SHADER_TESS_CTRL || unit == MESA_SHADER_TESS_EVAL) {
if (shader->stream_output != NULL || emit->clip_mode == CLIP_DISTANCE) {
/* if there is stream output declarations associated

View file

@ -242,7 +242,7 @@ v3d_flag_dirty_sampler_state(struct v3d_context *v3d,
case MESA_SHADER_VERTEX:
v3d->dirty |= V3D_DIRTY_VERTTEX;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
v3d->dirty |= V3D_DIRTY_GEOMTEX;
break;
case PIPE_SHADER_FRAGMENT:

View file

@ -757,7 +757,7 @@ v3d_update_compiled_gs(struct v3d_context *v3d, uint8_t prim_mode)
}
memset(key, 0, sizeof(*key));
v3d_setup_shared_key(v3d, &key->base, &v3d->tex[PIPE_SHADER_GEOMETRY]);
v3d_setup_shared_key(v3d, &key->base, &v3d->tex[MESA_SHADER_GEOMETRY]);
key->base.is_last_geometry_stage = true;
key->num_used_outputs = v3d->prog.fs->prog_data.fs->num_inputs;
STATIC_ASSERT(sizeof(key->used_outputs) ==

View file

@ -126,7 +126,7 @@ v3d_init_shader_caps(struct v3d_screen *screen)
switch (i) {
case MESA_SHADER_VERTEX:
case PIPE_SHADER_FRAGMENT:
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
break;
case PIPE_SHADER_COMPUTE:
if (!screen->has_csd)
@ -146,7 +146,7 @@ v3d_init_shader_caps(struct v3d_screen *screen)
case MESA_SHADER_VERTEX:
caps->max_inputs = V3D_MAX_VS_INPUTS / 4;
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
caps->max_inputs = V3D_MAX_GS_INPUTS / 4;
break;
case PIPE_SHADER_FRAGMENT:
@ -173,7 +173,7 @@ v3d_init_shader_caps(struct v3d_screen *screen)
caps->max_shader_buffers =
screen->has_cache_flush &&
(i != MESA_SHADER_VERTEX && i != PIPE_SHADER_GEOMETRY) ?
(i != MESA_SHADER_VERTEX && i != MESA_SHADER_GEOMETRY) ?
PIPE_MAX_SHADER_BUFFERS : 0;
caps->max_shader_images =

View file

@ -697,11 +697,11 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
struct v3d_cl_reloc gs_bin_uniforms = { NULL, 0 };
if (v3d->prog.gs) {
gs_uniforms = v3d_write_uniforms(v3d, job, v3d->prog.gs,
PIPE_SHADER_GEOMETRY);
MESA_SHADER_GEOMETRY);
}
if (v3d->prog.gs_bin) {
gs_bin_uniforms = v3d_write_uniforms(v3d, job, v3d->prog.gs_bin,
PIPE_SHADER_GEOMETRY);
MESA_SHADER_GEOMETRY);
}
struct v3d_cl_reloc vs_uniforms =

View file

@ -794,7 +794,7 @@ static void *virgl_create_tes_state(struct pipe_context *ctx,
static void *virgl_create_gs_state(struct pipe_context *ctx,
const struct pipe_shader_state *shader)
{
return virgl_shader_encoder(ctx, shader, PIPE_SHADER_GEOMETRY);
return virgl_shader_encoder(ctx, shader, MESA_SHADER_GEOMETRY);
}
static void *virgl_create_fs_state(struct pipe_context *ctx,
@ -886,7 +886,7 @@ static void virgl_bind_gs_state(struct pipe_context *ctx,
uint32_t handle = (unsigned long)vss;
struct virgl_context *vctx = virgl_context(ctx);
virgl_encode_bind_shader(vctx, handle, PIPE_SHADER_GEOMETRY);
virgl_encode_bind_shader(vctx, handle, MESA_SHADER_GEOMETRY);
}

View file

@ -1480,7 +1480,7 @@ int virgl_encode_link_shader(struct virgl_context *ctx, uint32_t *handles)
virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_LINK_SHADER, 0, VIRGL_LINK_SHADER_SIZE));
virgl_encoder_write_dword(ctx->cbuf, handles[MESA_SHADER_VERTEX]);
virgl_encoder_write_dword(ctx->cbuf, handles[PIPE_SHADER_FRAGMENT]);
virgl_encoder_write_dword(ctx->cbuf, handles[PIPE_SHADER_GEOMETRY]);
virgl_encoder_write_dword(ctx->cbuf, handles[MESA_SHADER_GEOMETRY]);
virgl_encoder_write_dword(ctx->cbuf, handles[MESA_SHADER_TESS_CTRL]);
virgl_encoder_write_dword(ctx->cbuf, handles[MESA_SHADER_TESS_EVAL]);
virgl_encoder_write_dword(ctx->cbuf, handles[PIPE_SHADER_COMPUTE]);

View file

@ -199,7 +199,7 @@ virgl_init_shader_caps(struct virgl_screen *vscreen)
caps->max_inputs =
vscreen->caps.caps.v1.glsl_level < 150 ?
vscreen->caps.caps.v2.max_vertex_attribs :
(i == MESA_SHADER_VERTEX || i == PIPE_SHADER_GEOMETRY ?
(i == MESA_SHADER_VERTEX || i == MESA_SHADER_GEOMETRY ?
vscreen->caps.caps.v2.max_vertex_attribs : 32);
switch (i) {

View file

@ -99,7 +99,7 @@ virgl_shader_stage_convert(enum pipe_shader_type type)
return VIRGL_SHADER_TESS_CTRL;
case MESA_SHADER_TESS_EVAL:
return VIRGL_SHADER_TESS_EVAL;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
return VIRGL_SHADER_GEOMETRY;
case PIPE_SHADER_FRAGMENT:
return VIRGL_SHADER_FRAGMENT;

View file

@ -357,7 +357,7 @@ DestroyDevice(D3D10DDI_HDEVICE hDevice) // IN
PIPE_MAX_SHADER_SAMPLER_VIEWS, 0, sampler_views);
pipe->set_sampler_views(pipe, MESA_SHADER_VERTEX, 0,
PIPE_MAX_SHADER_SAMPLER_VIEWS, 0, sampler_views);
pipe->set_sampler_views(pipe, PIPE_SHADER_GEOMETRY, 0,
pipe->set_sampler_views(pipe, MESA_SHADER_GEOMETRY, 0,
PIPE_MAX_SHADER_SAMPLER_VIEWS, 0, sampler_views);
pipe->destroy(pipe);

View file

@ -64,7 +64,7 @@ CreateEmptyShader(Device *pDevice,
const struct tgsi_token *tokens;
uint nr_tokens;
if (processor == PIPE_SHADER_GEOMETRY) {
if (processor == MESA_SHADER_GEOMETRY) {
return NULL;
}
@ -92,7 +92,7 @@ CreateEmptyShader(Device *pDevice,
case MESA_SHADER_VERTEX:
handle = pipe->create_vs_state(pipe, &state);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
handle = pipe->create_gs_state(pipe, &state);
break;
default:
@ -123,7 +123,7 @@ DeleteEmptyShader(Device *pDevice,
{
struct pipe_context *pipe = pDevice->pipe;
if (processor == PIPE_SHADER_GEOMETRY) {
if (processor == MESA_SHADER_GEOMETRY) {
assert(handle == NULL);
return;
}
@ -136,7 +136,7 @@ DeleteEmptyShader(Device *pDevice,
case MESA_SHADER_VERTEX:
pipe->delete_vs_state(pipe, handle);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
pipe->delete_gs_state(pipe, handle);
break;
default:
@ -306,7 +306,7 @@ DestroyShader(D3D10DDI_HDEVICE hDevice, // IN
case MESA_SHADER_VERTEX:
pipe->delete_vs_state(pipe, pShader->handle);
break;
case PIPE_SHADER_GEOMETRY:
case MESA_SHADER_GEOMETRY:
pipe->delete_gs_state(pipe, pShader->handle);
break;
default:
@ -680,7 +680,7 @@ CreateGeometryShader(D3D10DDI_HDEVICE hDevice, //
struct pipe_context *pipe = CastPipeContext(hDevice);
Shader *pShader = CastShader(hShader);
pShader->type = PIPE_SHADER_GEOMETRY;
pShader->type = MESA_SHADER_GEOMETRY;
pShader->output_resolved = true;
memset(&pShader->state, 0, sizeof pShader->state);
@ -743,7 +743,7 @@ GsSetShaderResources(D3D10DDI_HDEVICE hDevice,
{
LOG_ENTRYPOINT();
SetShaderResources(PIPE_SHADER_GEOMETRY, hDevice, Offset, NumViews, phShaderResourceViews);
SetShaderResources(MESA_SHADER_GEOMETRY, hDevice, Offset, NumViews, phShaderResourceViews);
}
@ -766,7 +766,7 @@ GsSetConstantBuffers(D3D10DDI_HDEVICE hDevice,
{
LOG_ENTRYPOINT();
SetConstantBuffers(PIPE_SHADER_GEOMETRY,
SetConstantBuffers(MESA_SHADER_GEOMETRY,
hDevice, StartBuffer, NumBuffers, phBuffers);
}
@ -789,7 +789,7 @@ GsSetSamplers(D3D10DDI_HDEVICE hDevice, //
{
LOG_ENTRYPOINT();
SetSamplers(PIPE_SHADER_GEOMETRY, hDevice, Offset, NumSamplers, phSamplers);
SetSamplers(MESA_SHADER_GEOMETRY, hDevice, Offset, NumSamplers, phSamplers);
}
@ -844,7 +844,7 @@ CreateGeometryShaderWithStreamOutput(
unsigned num_holes = 0;
bool all_slot_zero = true;
pShader->type = PIPE_SHADER_GEOMETRY;
pShader->type = MESA_SHADER_GEOMETRY;
memset(&pShader->state, 0, sizeof pShader->state);
if (pData->pShaderCode) {

View file

@ -1281,7 +1281,7 @@ Shader_tgsi_translate(const unsigned *code,
ureg = ureg_create(MESA_SHADER_VERTEX);
break;
case D3D10_SB_GEOMETRY_SHADER:
ureg = ureg_create(PIPE_SHADER_GEOMETRY);
ureg = ureg_create(MESA_SHADER_GEOMETRY);
break;
}

View file

@ -416,7 +416,7 @@ class Context(Dispatcher):
return self._state.tcs
if shader == 'MESA_SHADER_TESS_EVAL':
return self._state.tes
if shader == 'PIPE_SHADER_GEOMETRY':
if shader == 'MESA_SHADER_GEOMETRY':
return self._state.gs
if shader == 'PIPE_SHADER_FRAGMENT':
return self._state.fs

View file

@ -79,7 +79,7 @@ st_upload_constants(struct st_context *st, struct gl_program *prog, gl_shader_st
assert(shader_type == MESA_SHADER_VERTEX ||
shader_type == PIPE_SHADER_FRAGMENT ||
shader_type == PIPE_SHADER_GEOMETRY ||
shader_type == MESA_SHADER_GEOMETRY ||
shader_type == MESA_SHADER_TESS_CTRL ||
shader_type == MESA_SHADER_TESS_EVAL ||
shader_type == PIPE_SHADER_COMPUTE);
@ -332,7 +332,7 @@ st_bind_gs_ubos(struct st_context *st)
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
st_bind_ubos(st, prog, PIPE_SHADER_GEOMETRY);
st_bind_ubos(st, prog, MESA_SHADER_GEOMETRY);
}
void

View file

@ -196,7 +196,7 @@ void st_bind_gs_images(struct st_context *st)
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
st_bind_images(st, prog, PIPE_SHADER_GEOMETRY);
st_bind_images(st, prog, MESA_SHADER_GEOMETRY);
}
void st_bind_tcs_images(struct st_context *st)

View file

@ -398,7 +398,7 @@ st_update_geometry_samplers(struct st_context *st)
if (ctx->GeometryProgram._Current) {
update_shader_samplers(st,
PIPE_SHADER_GEOMETRY,
MESA_SHADER_GEOMETRY,
ctx->GeometryProgram._Current, NULL, NULL);
}
}

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