diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 473e8def200..fdc85a5b5e5 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -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; diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 4e6dc779cbf..b3b6c0ef9e1 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -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: diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index f029e0e7c57..20feeb5a7cc 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -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( diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 3bddb91d33e..772db5c0490 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -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; } diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index e77a4c04e73..e5e2b69b962 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -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. diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index 6640a6fda7a..e2d26221aff 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -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, diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c index 55428f13df7..46177c23cfb 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c @@ -431,7 +431,7 @@ llvm_middle_end_bind_parameters(struct draw_pt_middle_end *middle) struct draw_llvm *llvm = fpme->llvm; unsigned i; - for (enum pipe_shader_type shader_type = MESA_SHADER_VERTEX; shader_type <= 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, diff --git a/src/gallium/auxiliary/driver_ddebug/dd_draw.c b/src/gallium/auxiliary/driver_ddebug/dd_draw.c index ef37f289bde..b424c52ddf8 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_draw.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_draw.c @@ -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"; diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index ad66ea3f8d4..466945adec7 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -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)))) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 8962f2f95d9..d1bf0cb04a0 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -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; diff --git a/src/gallium/auxiliary/tgsi/tgsi_from_mesa.h b/src/gallium/auxiliary/tgsi/tgsi_from_mesa.h index cf5a4d24e6c..f2d97f8da4e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_from_mesa.h +++ b/src/gallium/auxiliary/tgsi/tgsi_from_mesa.h @@ -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; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c index dcce60b7516..c0823f9519a 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c @@ -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); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 8253e8da680..cd6159f3f9c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -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); diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index db290d27959..91a4116f5c4 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -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; diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 17da5d55b53..97a1ec15398 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -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); diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 1f4594ec883..e145ecf76d4 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -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; diff --git a/src/gallium/auxiliary/util/u_live_shader_cache.c b/src/gallium/auxiliary/util/u_live_shader_cache.c index 7a5c85e0bcc..f4d6ddb48c6 100644 --- a/src/gallium/auxiliary/util/u_live_shader_cache.c +++ b/src/gallium/auxiliary/util/u_live_shader_cache.c @@ -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)); diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index cf364f8d5a5..4d2a740365a 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -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; diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index 312c07ad71b..0e7114e93e5 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -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; diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 0dea11426a9..1e307c6028c 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -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; diff --git a/src/gallium/drivers/asahi/agx_blit.c b/src/gallium/drivers/asahi/agx_blit.c index 05a9db6ed5c..f90f4af941b 100644 --- a/src/gallium/drivers/asahi/agx_blit.c +++ b/src/gallium/drivers/asahi/agx_blit.c @@ -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, diff --git a/src/gallium/drivers/asahi/agx_disk_cache.c b/src/gallium/drivers/asahi/agx_disk_cache.c index 63798c76251..0abef672b83 100644 --- a/src/gallium/drivers/asahi/agx_disk_cache.c +++ b/src/gallium/drivers/asahi/agx_disk_cache.c @@ -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); diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index f54ddc4ed26..2a9f8c5522f 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -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); diff --git a/src/gallium/drivers/asahi/agx_state.h b/src/gallium/drivers/asahi/agx_state.h index 5624e380d5c..65fc244ef1f 100644 --- a/src/gallium/drivers/asahi/agx_state.h +++ b/src/gallium/drivers/asahi/agx_state.h @@ -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"); diff --git a/src/gallium/drivers/asahi/agx_streamout.c b/src/gallium/drivers/asahi/agx_streamout.c index c482147446b..e0184f51045 100644 --- a/src/gallium/drivers/asahi/agx_streamout.c +++ b/src/gallium/drivers/asahi/agx_streamout.c @@ -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], diff --git a/src/gallium/drivers/crocus/crocus_screen.c b/src/gallium/drivers/crocus/crocus_screen.c index 545040fddde..8ebf75490fb 100644 --- a/src/gallium/drivers/crocus/crocus_screen.c +++ b/src/gallium/drivers/crocus/crocus_screen.c @@ -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; diff --git a/src/gallium/drivers/d3d12/d3d12_blit.cpp b/src/gallium/drivers/d3d12/d3d12_blit.cpp index 122d0cf7214..9539aefcb23 100644 --- a/src/gallium/drivers/d3d12/d3d12_blit.cpp +++ b/src/gallium/drivers/d3d12/d3d12_blit.cpp @@ -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]); diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp index 206b11d159f..06b64777b74 100644 --- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp +++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp @@ -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(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); diff --git a/src/gallium/drivers/d3d12/d3d12_context_graphics.cpp b/src/gallium/drivers/d3d12/d3d12_context_graphics.cpp index 4531a1a2ece..0fa80da7661 100644 --- a/src/gallium/drivers/d3d12/d3d12_context_graphics.cpp +++ b/src/gallium/drivers/d3d12/d3d12_context_graphics.cpp @@ -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]); diff --git a/src/gallium/drivers/d3d12/d3d12_draw.cpp b/src/gallium/drivers/d3d12/d3d12_draw.cpp index 62c19a66636..20cadadc851 100644 --- a/src/gallium/drivers/d3d12/d3d12_draw.cpp +++ b/src/gallium/drivers/d3d12/d3d12_draw.cpp @@ -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) diff --git a/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp b/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp index 3f5cfbd4568..df518606f03 100644 --- a/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp +++ b/src/gallium/drivers/d3d12/d3d12_gs_variant.cpp @@ -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* diff --git a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp index 4b90b89cd04..5dd51313188 100644 --- a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp +++ b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp @@ -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; } diff --git a/src/gallium/drivers/d3d12/d3d12_query.cpp b/src/gallium/drivers/d3d12/d3d12_query.cpp index 4682ec63d04..6708633ea65 100644 --- a/src/gallium/drivers/d3d12/d3d12_query.cpp +++ b/src/gallium/drivers/d3d12/d3d12_query.cpp @@ -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; diff --git a/src/gallium/drivers/d3d12/d3d12_root_signature.cpp b/src/gallium/drivers/d3d12/d3d12_root_signature.cpp index 0a61107ec87..967459ff1e1 100644 --- a/src/gallium/drivers/d3d12/d3d12_root_signature.cpp +++ b/src/gallium/drivers/d3d12/d3d12_root_signature.cpp @@ -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; diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp b/src/gallium/drivers/d3d12/d3d12_screen.cpp index 38cd023d540..b072ec13e56 100644 --- a/src/gallium/drivers/d3d12/d3d12_screen.cpp +++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp @@ -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; diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_const.cc b/src/gallium/drivers/freedreno/a6xx/fd6_const.cc index 267f8056889..677b02d4d77 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_const.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_const.cc @@ -355,7 +355,7 @@ fd6_build_user_consts(struct fd6_emit *emit) emit_user_consts(emit->ds, constobj, &ctx->constbuf[MESA_SHADER_TESS_EVAL]); } if (emit->gs) { - emit_user_consts(emit->gs, constobj, &ctx->constbuf[PIPE_SHADER_GEOMETRY]); + emit_user_consts(emit->gs, constobj, &ctx->constbuf[MESA_SHADER_GEOMETRY]); } } emit_user_consts(emit->fs, constobj, &ctx->constbuf[PIPE_SHADER_FRAGMENT]); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_context.cc b/src/gallium/drivers/freedreno/a6xx/fd6_context.cc index 680952eed38..932c5457a77 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_context.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_context.cc @@ -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 diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc index 655bcce7fa0..3f3bd00c5f0 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc @@ -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(ctx, PIPE_SHADER_GEOMETRY, false); + state = fd6_build_bindless_state(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: diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc b/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc index 54cd85f7d85..06d3b6a20e9 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc @@ -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; diff --git a/src/gallium/drivers/freedreno/freedreno_program.c b/src/gallium/drivers/freedreno/freedreno_program.c index c737df7362e..b2b7d8fe16d 100644 --- a/src/gallium/drivers/freedreno/freedreno_program.c +++ b/src/gallium/drivers/freedreno/freedreno_program.c @@ -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 diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 13efdf43526..edb788e0c55 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -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 diff --git a/src/gallium/drivers/freedreno/ir3/ir3_descriptor.h b/src/gallium/drivers/freedreno/ir3/ir3_descriptor.h index bdbb1ae0b23..d95d475eee4 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_descriptor.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_descriptor.h @@ -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; diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 37702630802..ecc84d6720d 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -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) { diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c index 5c7ac11ff26..c68f7ecd6b4 100644 --- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c +++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c @@ -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); diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index b69b3e54a4f..b4922b84713 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -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)) { diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index cc5c4ccb984..7db2456956a 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -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], diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c index 26603e0e2d7..9d82e1538cd 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c +++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c @@ -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); } diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp index bf02b1507a8..7a51ec5354d 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -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; } diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp index 4a667545aec..2fa75f70440 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp @@ -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); diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_serialize.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_serialize.cpp index 2b77e872482..b8b92f3d6d1 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_serialize.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_serialize.cpp @@ -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: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.h b/src/gallium/drivers/nouveau/nv50/nv50_context.h index 3f9741cd953..6716732e6cb 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.h @@ -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"); diff --git a/src/gallium/drivers/nouveau/nv50/nv50_program.c b/src/gallium/drivers/nouveau/nv50/nv50_program.c index 6fa7f085737..b39c400256a 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_program.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_program.c @@ -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: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c index 5c28a34c158..43761cfbc0b 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c @@ -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 diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h index 80dd1f7fd07..9fa45ee4ef5 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h @@ -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: diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c index 763e1752250..46d6488988f 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c @@ -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: diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c index be6429e1d8b..280e908efcb 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c @@ -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 diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index bb70aff45f0..505655044fa 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -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); diff --git a/src/gallium/drivers/r600/r600_pipe_common.h b/src/gallium/drivers/r600/r600_pipe_common.h index 76d49e408bc..2df65522ed6 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.h +++ b/src/gallium/drivers/r600/r600_pipe_common.h @@ -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) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index d96579da5b2..4e6e644241f 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -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); diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index c4857691ff0..517971d3a64 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -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); diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index dd416e058ee..66933e5b62e 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -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); } } diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp index 679098fa481..1fabd6716b9 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp @@ -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; diff --git a/src/gallium/drivers/radeonsi/si_build_pm4.h b/src/gallium/drivers/radeonsi/si_build_pm4.h index 33f2c5b5c45..61577b1b717 100644 --- a/src/gallium/drivers/radeonsi/si_build_pm4.h +++ b/src/gallium/drivers/radeonsi/si_build_pm4.h @@ -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 { diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index eb974225711..e8773e02a7b 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -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); } diff --git a/src/gallium/drivers/radeonsi/si_sqtt.c b/src/gallium/drivers/radeonsi/si_sqtt.c index 77c71f65897..cb78acc4088 100644 --- a/src/gallium/drivers/radeonsi/si_sqtt.c +++ b/src/gallium/drivers/radeonsi/si_sqtt.c @@ -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; diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 55e45d28ffe..816faf8bc0a 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -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) { diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 5d80e21e0dd..2b7c68d03c4 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -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))); } } diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index 8a378adf120..ea3d43646ec 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -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); diff --git a/src/gallium/drivers/radeonsi/si_state_streamout.c b/src/gallium/drivers/radeonsi/si_state_streamout.c index 33ec1f6c450..23ae4a32188 100644 --- a/src/gallium/drivers/radeonsi/si_state_streamout.c +++ b/src/gallium/drivers/radeonsi/si_state_streamout.c @@ -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))); } } diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 582a3310983..def0510174c 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -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) diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c index d55350a2697..0d1208f6c77 100644 --- a/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c @@ -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) { diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 535d6ae31a2..3d4904fb7a7 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -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; diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c index 14b055250fb..a7db73bdae2 100644 --- a/src/gallium/drivers/softpipe/sp_state_derived.c +++ b/src/gallium/drivers/softpipe/sp_state_derived.c @@ -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); } diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index c20a328e44b..3271bf3b2bb 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -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); } } diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c index 8abc9328f1c..6df4de5a95d 100644 --- a/src/gallium/drivers/softpipe/sp_state_shader.c +++ b/src/gallium/drivers/softpipe/sp_state_shader.c @@ -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); } diff --git a/src/gallium/drivers/svga/svga_pipe_constants.c b/src/gallium/drivers/svga/svga_pipe_constants.c index ad0212fe956..40fd87e4743 100644 --- a/src/gallium/drivers/svga/svga_pipe_constants.c +++ b/src/gallium/drivers/svga/svga_pipe_constants.c @@ -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; diff --git a/src/gallium/drivers/svga/svga_pipe_gs.c b/src/gallium/drivers/svga/svga_pipe_gs.c index c5e3b6530b4..cd59d30bcd8 100644 --- a/src/gallium/drivers/svga/svga_pipe_gs.c +++ b/src/gallium/drivers/svga/svga_pipe_gs.c @@ -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)); } diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 95a854516bb..37c4780df8f 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -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; diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c index 64a6d9ebcd5..5353bc9e22f 100644 --- a/src/gallium/drivers/svga/svga_shader.c +++ b/src/gallium/drivers/svga/svga_shader.c @@ -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: diff --git a/src/gallium/drivers/svga/svga_shader.h b/src/gallium/drivers/svga/svga_shader.h index 34823b8bee2..b7584a716f5 100644 --- a/src/gallium/drivers/svga/svga_shader.h +++ b/src/gallium/drivers/svga/svga_shader.h @@ -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; diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c index f76a2f5d57b..fb47e85a32d 100644 --- a/src/gallium/drivers/svga/svga_state_constants.c +++ b/src/gallium/drivers/svga/svga_state_constants.c @@ -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 */ }; diff --git a/src/gallium/drivers/svga/svga_state_gs.c b/src/gallium/drivers/svga/svga_state_gs.c index 43b47af2a0a..407d1c0b2c0 100644 --- a/src/gallium/drivers/svga/svga_state_gs.c +++ b/src/gallium/drivers/svga/svga_state_gs.c @@ -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)); diff --git a/src/gallium/drivers/svga/svga_state_tgsi_transform.c b/src/gallium/drivers/svga/svga_state_tgsi_transform.c index 3f825e12027..ff3d0ac0ac5 100644 --- a/src/gallium/drivers/svga/svga_state_tgsi_transform.c +++ b/src/gallium/drivers/svga/svga_state_tgsi_transform.c @@ -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); diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c index 7ea03f16041..fb36bb9209f 100644 --- a/src/gallium/drivers/svga/svga_tgsi.c +++ b/src/gallium/drivers/svga/svga_tgsi.c @@ -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; diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 0732c99ecc9..e2b1e9f6b0a 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -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 diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index cb663d74700..889bd7fb753 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -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: diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index d0ff895fe46..ae2ce5d8cb9 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -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) == diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index a77f7cfc2ae..b393cff680d 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -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 = diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 1555c4710bb..5364a9426da 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -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 = diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 9182bbfde15..d83adce00be 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -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); } diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index 43329a96a15..b6ffdbabef0 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -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]); diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 98979beecea..904c64a2191 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -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) { diff --git a/src/gallium/drivers/virgl/virgl_screen.h b/src/gallium/drivers/virgl/virgl_screen.h index 555ac21622a..b11d756e14b 100644 --- a/src/gallium/drivers/virgl/virgl_screen.h +++ b/src/gallium/drivers/virgl/virgl_screen.h @@ -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; diff --git a/src/gallium/frontends/d3d10umd/Device.cpp b/src/gallium/frontends/d3d10umd/Device.cpp index 12052f06255..20c86e0ba10 100644 --- a/src/gallium/frontends/d3d10umd/Device.cpp +++ b/src/gallium/frontends/d3d10umd/Device.cpp @@ -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); diff --git a/src/gallium/frontends/d3d10umd/Shader.cpp b/src/gallium/frontends/d3d10umd/Shader.cpp index 79581f7a672..ebf62ac2de5 100644 --- a/src/gallium/frontends/d3d10umd/Shader.cpp +++ b/src/gallium/frontends/d3d10umd/Shader.cpp @@ -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) { diff --git a/src/gallium/frontends/d3d10umd/ShaderTGSI.c b/src/gallium/frontends/d3d10umd/ShaderTGSI.c index 805c14b3bad..9b8f57a2db9 100644 --- a/src/gallium/frontends/d3d10umd/ShaderTGSI.c +++ b/src/gallium/frontends/d3d10umd/ShaderTGSI.c @@ -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; } diff --git a/src/gallium/tools/trace/dump_state.py b/src/gallium/tools/trace/dump_state.py index 83f02a1e51a..9096c5ce2e9 100755 --- a/src/gallium/tools/trace/dump_state.py +++ b/src/gallium/tools/trace/dump_state.py @@ -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 diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 979b2c038fc..26074494534 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -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 diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c index 3d466f1c033..fa698f2f2a6 100644 --- a/src/mesa/state_tracker/st_atom_image.c +++ b/src/mesa/state_tracker/st_atom_image.c @@ -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) diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 7ec648e8800..a16c410b7d7 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -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); } } diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index 8774822ead2..79bac394fad 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -280,7 +280,7 @@ st_update_common_program(struct st_context *st, struct gl_program *prog, key.st = st->has_shareable_shaders ? NULL : st; - if (pipe_shader == PIPE_SHADER_GEOMETRY || + if (pipe_shader == MESA_SHADER_GEOMETRY || pipe_shader == MESA_SHADER_TESS_EVAL) { key.clamp_color = st->clamp_vert_color_in_shader && st->ctx->Light._ClampVertexColor && @@ -291,7 +291,7 @@ st_update_common_program(struct st_context *st, struct gl_program *prog, VARYING_SLOT_BFC1)); if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx) && - (pipe_shader == PIPE_SHADER_GEOMETRY || + (pipe_shader == MESA_SHADER_GEOMETRY || !st->ctx->GeometryProgram._Current)) key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled; @@ -314,7 +314,7 @@ st_update_gp(struct st_context *st) { void *shader = st_update_common_program(st, st->ctx->GeometryProgram._Current, - PIPE_SHADER_GEOMETRY, &st->gp); + MESA_SHADER_GEOMETRY, &st->gp); cso_set_geometry_shader_handle(st->cso_context, shader); } diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c b/src/mesa/state_tracker/st_atom_storagebuf.c index 690ff843c43..815453d406d 100644 --- a/src/mesa/state_tracker/st_atom_storagebuf.c +++ b/src/mesa/state_tracker/st_atom_storagebuf.c @@ -112,7 +112,7 @@ void st_bind_gs_ssbos(struct st_context *st) struct gl_program *prog = st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]; - st_bind_ssbos(st, prog, PIPE_SHADER_GEOMETRY); + st_bind_ssbos(st, prog, MESA_SHADER_GEOMETRY); } void st_bind_tcs_ssbos(struct st_context *st) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index cc904312a24..0dab06912e3 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -365,7 +365,7 @@ st_update_geometry_textures(struct st_context *st) const struct gl_context *ctx = st->ctx; if (ctx->GeometryProgram._Current) { - update_textures(st, PIPE_SHADER_GEOMETRY, + update_textures(st, MESA_SHADER_GEOMETRY, ctx->GeometryProgram._Current); } } diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 4a40885126c..b20d1949efc 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -290,7 +290,7 @@ free_zombie_shaders(struct st_context *st) st->ctx->NewDriverState |= ST_NEW_FS_STATE; st->pipe->delete_fs_state(st->pipe, entry->shader); break; - case PIPE_SHADER_GEOMETRY: + case MESA_SHADER_GEOMETRY: st->ctx->NewDriverState |= ST_NEW_GS_STATE; st->pipe->delete_gs_state(st->pipe, entry->shader); break; diff --git a/src/mesa/state_tracker/st_draw_hw_select.c b/src/mesa/state_tracker/st_draw_hw_select.c index de40454a68c..ba7524a9335 100644 --- a/src/mesa/state_tracker/st_draw_hw_select.c +++ b/src/mesa/state_tracker/st_draw_hw_select.c @@ -691,14 +691,14 @@ st_draw_hw_select_prepare_common(struct gl_context *ctx) cb.buffer_size = sizeof(consts) - (MAX_CLIP_PLANES - num_planes) * 4 * sizeof(float); struct pipe_context *pipe = st->pipe; - pipe->set_constant_buffer(pipe, PIPE_SHADER_GEOMETRY, 0, false, &cb); + pipe->set_constant_buffer(pipe, MESA_SHADER_GEOMETRY, 0, false, &cb); struct pipe_shader_buffer buffer; memset(&buffer, 0, sizeof(buffer)); buffer.buffer = ctx->Select.Result->buffer; buffer.buffer_size = MAX_NAME_STACK_RESULT_NUM * 3 * sizeof(int); - pipe->set_shader_buffers(pipe, PIPE_SHADER_GEOMETRY, 0, 1, &buffer, 0x1); + pipe->set_shader_buffers(pipe, MESA_SHADER_GEOMETRY, 0, 1, &buffer, 0x1); return true; } diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 2774d8c9630..ba4b25ab0e5 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -232,7 +232,7 @@ void st_init_limits(struct pipe_screen *screen, /* reserve space in the default-uniform for lowered state */ if (sh == MESA_SHADER_VERTEX || sh == MESA_SHADER_TESS_EVAL || - sh == PIPE_SHADER_GEOMETRY) { + sh == MESA_SHADER_GEOMETRY) { if (!screen->caps.clip_planes) pc->MaxUniformComponents -= 4 * MAX_CLIP_PLANES; @@ -340,7 +340,7 @@ void st_init_limits(struct pipe_screen *screen, can_ubo = false; } - if (sh == MESA_SHADER_VERTEX || sh == PIPE_SHADER_GEOMETRY) { + if (sh == MESA_SHADER_VERTEX || sh == MESA_SHADER_GEOMETRY) { if (screen->caps.viewport_transform_lowered) options->LowerBuiltinVariablesXfb |= VARYING_BIT_POS; if (screen->caps.psiz_clamped) @@ -1329,7 +1329,7 @@ void st_init_extensions(struct pipe_screen *screen, /* OES_geometry_shader requires instancing */ if ((GLSLVersion >= 400 || ESSLVersion >= 310) && - screen->shader_caps[PIPE_SHADER_GEOMETRY].max_instructions > 0 && + screen->shader_caps[MESA_SHADER_GEOMETRY].max_instructions > 0 && consts->MaxGeometryShaderInvocations >= 32) { extensions->OES_geometry_shader = GL_TRUE; }