ureg->processor = processor;
ureg->supports_any_inout_decl_range =
screen &&
- screen->get_shader_param(screen,
- util_pipe_shader_from_tgsi_processor(processor),
+ screen->get_shader_param(screen, processor,
PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE) != 0;
ureg->next_shader_processor = -1;
}
}
-static inline unsigned
-util_pipe_shader_from_tgsi_processor(unsigned processor)
-{
- switch (processor) {
- case PIPE_SHADER_VERTEX:
- return PIPE_SHADER_VERTEX;
- case PIPE_SHADER_TESS_CTRL:
- return PIPE_SHADER_TESS_CTRL;
- case PIPE_SHADER_TESS_EVAL:
- return PIPE_SHADER_TESS_EVAL;
- case PIPE_SHADER_GEOMETRY:
- return PIPE_SHADER_GEOMETRY;
- case PIPE_SHADER_FRAGMENT:
- return PIPE_SHADER_FRAGMENT;
- case PIPE_SHADER_COMPUTE:
- return PIPE_SHADER_COMPUTE;
- default:
- assert(0);
- return PIPE_SHADER_VERTEX;
- }
-}
-
#ifdef __cplusplus
}
#endif
sel->so = state->stream_output;
tgsi_scan_shader(state->tokens, &sel->info);
- sel->type = util_pipe_shader_from_tgsi_processor(sel->info.processor);
+ sel->type = sel->info.processor;
p_atomic_inc(&sscreen->b.num_shaders_created);
/* Set which opcode uses which (i,j) pair. */
FREE(tx);
}
-static inline unsigned
-tgsi_processor_from_type(unsigned shader_type)
-{
- switch (shader_type) {
- case PIPE_SHADER_VERTEX: return PIPE_SHADER_VERTEX;
- case PIPE_SHADER_FRAGMENT: return PIPE_SHADER_FRAGMENT;
- default:
- return ~0;
- }
-}
-
static void
shader_add_ps_fog_stage(struct shader_translator *tx, struct ureg_src src_col)
{
{
struct shader_translator *tx;
HRESULT hr = D3D_OK;
- const unsigned processor = tgsi_processor_from_type(info->type);
+ const unsigned processor = info->type;
unsigned s, slot_max;
unsigned max_const_f;