struct si_shader *shader = ctx->shader;
LLVMValueRef vtx_offset, soffset;
struct si_shader_info *info = &shader->selector->info;
- unsigned semantic_name = info->input_semantic_name[input_index];
- unsigned semantic_index = info->input_semantic_index[input_index];
unsigned param;
LLVMValueRef value;
- param = si_shader_io_get_unique_index(semantic_name, semantic_index, false);
+ param = si_shader_io_get_unique_index(info->input_semantic[input_index], false);
/* GFX9 has the ESGS ring in LDS. */
if (ctx->screen->info.chip_class >= GFX9) {
}
unsigned vgpr;
- if (ctx->type == PIPE_SHADER_VERTEX)
+ if (ctx->stage == MESA_SHADER_VERTEX)
vgpr = 8 + GFX9_VSGS_NUM_USER_SGPR;
else
vgpr = 8 + GFX9_TESGS_NUM_USER_SGPR;
for (i = 0; i < info->num_outputs; i++) {
int param;
- if (info->output_semantic_name[i] == TGSI_SEMANTIC_VIEWPORT_INDEX ||
- info->output_semantic_name[i] == TGSI_SEMANTIC_LAYER)
+ if (info->output_semantic[i] == VARYING_SLOT_VIEWPORT ||
+ info->output_semantic[i] == VARYING_SLOT_LAYER)
continue;
- param = si_shader_io_get_unique_index(info->output_semantic_name[i],
- info->output_semantic_index[i], false);
+ param = si_shader_io_get_unique_index(info->output_semantic[i], false);
for (chan = 0; chan < 4; chan++) {
if (!(info->output_usagemask[i] & (1 << chan)))
LLVMBuildICmp(ctx->ac.builder, LLVMIntULT, gs_next_vertex,
LLVMConstInt(ctx->ac.i32, shader->selector->gs_max_out_vertices, 0), "");
- bool use_kill = !info->writes_memory;
+ bool use_kill = !info->base.writes_memory;
if (use_kill) {
ac_build_kill_if_false(&ctx->ac, can_emit);
} else {
void si_preload_esgs_ring(struct si_shader_context *ctx)
{
if (ctx->screen->info.chip_class <= GFX8) {
- unsigned ring = ctx->type == PIPE_SHADER_GEOMETRY ? SI_GS_RING_ESGS : SI_ES_RING_ESGS;
+ unsigned ring = ctx->stage == MESA_SHADER_GEOMETRY ? SI_GS_RING_ESGS : SI_ES_RING_ESGS;
LLVMValueRef offset = LLVMConstInt(ctx->ac.i32, ring, 0);
LLVMValueRef buf_ptr = ac_get_arg(&ctx->ac, ctx->rw_buffers);
shader->is_gs_copy_shader = true;
si_llvm_context_init(&ctx, sscreen, compiler,
- si_get_wave_size(sscreen, PIPE_SHADER_VERTEX,
+ si_get_wave_size(sscreen, MESA_SHADER_VERTEX,
false, false, false, false));
ctx.shader = shader;
- ctx.type = PIPE_SHADER_VERTEX;
+ ctx.stage = MESA_SHADER_VERTEX;
builder = ctx.ac.builder;
/* Fill in output information. */
for (i = 0; i < gsinfo->num_outputs; ++i) {
- outputs[i].semantic_name = gsinfo->output_semantic_name[i];
- outputs[i].semantic_index = gsinfo->output_semantic_index[i];
+ outputs[i].semantic = gsinfo->output_semantic[i];
for (int chan = 0; chan < 4; chan++) {
outputs[i].vertex_stream[chan] = (gsinfo->output_streams[i] >> (2 * chan)) & 3;
LLVMBuildRetVoid(ctx.ac.builder);
- ctx.type = PIPE_SHADER_GEOMETRY; /* override for shader dumping */
+ ctx.stage = MESA_SHADER_GEOMETRY; /* override for shader dumping */
si_llvm_optimize_module(&ctx);
bool ok = false;
if (si_compile_llvm(sscreen, &ctx.shader->binary, &ctx.shader->config, ctx.compiler, &ctx.ac,
- debug, PIPE_SHADER_GEOMETRY, "GS Copy Shader", false)) {
- if (si_can_dump_shader(sscreen, PIPE_SHADER_GEOMETRY))
+ debug, MESA_SHADER_GEOMETRY, "GS Copy Shader", false)) {
+ if (si_can_dump_shader(sscreen, MESA_SHADER_GEOMETRY))
fprintf(stderr, "GS Copy Shader:\n");
si_shader_dump(sscreen, ctx.shader, debug, stderr, true);