struct lp_build_tgsi_context *bld_base = &si_shader_ctx->radeon_bld.soa.bld_base;
struct lp_build_context *base = &bld_base->base;
struct lp_build_context *uint = &bld_base->uint_bld;
+ struct si_shader *shader = &si_shader_ctx->shader->shader;
struct si_shader *gs = &si_shader_ctx->shader->selector->current->shader;
struct si_shader_output_values *outputs;
LLVMValueRef t_list_ptr, t_list;
struct si_shader_output *out = gs->output + i;
unsigned chan;
+ shader->output[i] = *out;
+
outputs[i].name = out->name;
outputs[i].index = out->index;
outputs[i].usage = out->usage;
base->elem_type, "");
}
}
+ shader->noutput = gs->noutput;
si_llvm_export_vs(bld_base, outputs, gs->noutput);
union si_shader_key key;
};
+static inline struct si_shader* si_get_vs_state(struct si_context *sctx)
+{
+ if (sctx->gs_shader)
+ return &sctx->gs_shader->current->gs_copy_shader->shader;
+ else
+ return &sctx->vs_shader->current->shader;
+}
+
/* radeonsi_shader.c */
int si_pipe_shader_create(struct pipe_context *ctx, struct si_pipe_shader *shader);
int si_pipe_shader_create(struct pipe_context *ctx, struct si_pipe_shader *shader);
const struct pipe_index_buffer *ib)
{
struct si_pm4_state *pm4 = si_pm4_alloc_state(sctx);
- struct si_shader *vs = &sctx->vs_shader->current->shader;
+ struct si_shader *vs = si_get_vs_state(sctx);
unsigned prim = si_conv_pipe_prim(info->mode);
unsigned gs_out_prim =
si_conv_prim_to_gs_out(sctx->gs_shader ?
static void si_update_spi_map(struct si_context *sctx)
{
struct si_shader *ps = &sctx->ps_shader->current->shader;
- struct si_shader *vs = &sctx->vs_shader->current->shader;
+ struct si_shader *vs = si_get_vs_state(sctx);
struct si_pm4_state *pm4 = si_pm4_alloc_state(sctx);
unsigned i, j, tmp;