void
cso_set_sampler_views(struct cso_context *ctx,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
unsigned count,
struct pipe_sampler_view **views)
{
void
cso_set_sampler_views(struct cso_context *cso,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
unsigned count,
struct pipe_sampler_view **views);
void
draw_set_sampler_views(struct draw_context *draw,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
struct pipe_sampler_view **views,
unsigned num)
{
void
draw_set_samplers(struct draw_context *draw,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
struct pipe_sampler_state **samplers,
unsigned num)
{
void
draw_set_sampler_views(struct draw_context *draw,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
struct pipe_sampler_view **views,
unsigned num);
void
draw_set_samplers(struct draw_context *draw,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
struct pipe_sampler_state **samplers,
unsigned num);
static void
-aaline_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+aaline_set_sampler_views(struct pipe_context *pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned num,
struct pipe_sampler_view **views)
{
unsigned, unsigned, void **);
void (*driver_set_sampler_views)(struct pipe_context *,
- unsigned shader, unsigned start,
- unsigned count,
+ enum pipe_shader_type shader,
+ unsigned start, unsigned count,
struct pipe_sampler_view **);
void (*driver_set_polygon_stipple)(struct pipe_context *,
assert(pstip->fs->sampler_unit < PIPE_MAX_SAMPLERS);
pstip->fs->pstip_fs = pstip->driver_create_fs_state(pipe, &pstip_fs);
-
+
FREE((void *)pstip_fs.tokens);
if (!pstip->fs->pstip_fs)
static void
pstip_set_sampler_views(struct pipe_context *pipe,
- unsigned shader, unsigned start, unsigned num,
+ enum pipe_shader_type shader,
+ unsigned start, unsigned num,
struct pipe_sampler_view **views)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
*/
static void
-dd_context_set_sampler_views(struct pipe_context *_pipe, unsigned shader,
+dd_context_set_sampler_views(struct pipe_context *_pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned num,
struct pipe_sampler_view **views)
{
}
static void
-fd4_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+fd4_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
}
void
-fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+fd_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
unsigned shader, unsigned start,
unsigned nr, void **hwcso);
-void fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+void fd_set_sampler_views(struct pipe_context *pctx,
+ enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views);
static void
-i915_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+i915_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned num,
struct pipe_sampler_view **views)
{
}
static void
-ilo_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+ilo_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view **views)
{
case PIPE_SHADER_COMPUTE:
vec->dirty |= ILO_DIRTY_VIEW_CS;
break;
+ default:
+ assert(!"unexpected shader type");
+ break;
}
}
static void
llvmpipe_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
return surface;
}
-static void noop_set_sampler_views(struct pipe_context *ctx, unsigned shader,
+static void noop_set_sampler_views(struct pipe_context *ctx,
+ enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view **views)
{
static void
-nv30_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+nv30_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
}
static void
-nv50_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+nv50_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
}
static void
-nvc0_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+nvc0_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
return R300_TX_CACHE(num + index);
}
-static void r300_set_sampler_views(struct pipe_context* pipe, unsigned shader,
+static void r300_set_sampler_views(struct pipe_context* pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view** views)
{
}
}
-static void r600_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+static void r600_set_sampler_views(struct pipe_context *pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view **views)
{
}
static void si_set_sampler_views(struct pipe_context *ctx,
- unsigned shader, unsigned start,
+ enum pipe_shader_type shader, unsigned start,
unsigned count,
struct pipe_sampler_view **views)
{
static void
rbug_set_sampler_views(struct pipe_context *_pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **_views)
void
softpipe_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views);
void
softpipe_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
static void
svga_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
static void
swr_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
static void
trace_context_set_sampler_views(struct pipe_context *_pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
}
static struct vc4_texture_stateobj *
-vc4_get_stage_tex(struct vc4_context *vc4, unsigned shader)
+vc4_get_stage_tex(struct vc4_context *vc4, enum pipe_shader_type shader)
{
switch (shader) {
case PIPE_SHADER_FRAGMENT:
}
static void
-vc4_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+vc4_set_sampler_views(struct pipe_context *pctx,
+ enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
}
static void virgl_set_sampler_views(struct pipe_context *ctx,
- unsigned shader_type,
+ enum pipe_shader_type shader_type,
unsigned start_slot,
unsigned num_views,
struct pipe_sampler_view **views)
unsigned num_viewports,
const struct pipe_viewport_state *);
- void (*set_sampler_views)(struct pipe_context *, unsigned shader,
+ void (*set_sampler_views)(struct pipe_context *,
+ enum pipe_shader_type shader,
unsigned start_slot, unsigned num_views,
struct pipe_sampler_view **);
struct gl_program_parameter_list *params,
gl_shader_stage stage)
{
- unsigned shader_type = st_shader_stage_to_ptarget(stage);
+ enum pipe_shader_type shader_type = st_shader_stage_to_ptarget(stage);
assert(shader_type == PIPE_SHADER_VERTEX ||
shader_type == PIPE_SHADER_FRAGMENT ||
struct gl_shader_program *shader =
st->ctx->_Shader->CurrentProgram[mesa_shader];
unsigned glsl_version = shader ? shader->Version : 0;
- unsigned shader_stage = st_shader_stage_to_ptarget(mesa_shader);
+ enum pipe_shader_type shader_stage = st_shader_stage_to_ptarget(mesa_shader);
if (samplers_used == 0x0 && old_max == 0)
return;
}
-static inline unsigned
+static inline enum pipe_shader_type
st_shader_stage_to_ptarget(gl_shader_stage stage)
{
switch (stage) {
gl_shader_stage stage)
{
struct pipe_screen *pscreen = st->pipe->screen;
- unsigned ptarget = st_shader_stage_to_ptarget(stage);
+ enum pipe_shader_type ptarget = st_shader_stage_to_ptarget(stage);
const nir_shader_compiler_options *options;
nir_shader *nir;
struct gl_shader_compiler_options *options =
&ctx->Const.ShaderCompilerOptions[shader->Stage];
struct pipe_screen *pscreen = ctx->st->pipe->screen;
- unsigned ptarget = st_shader_stage_to_ptarget(shader->Stage);
+ enum pipe_shader_type ptarget = st_shader_stage_to_ptarget(shader->Stage);
validate_ir_tree(shader->ir);
struct gl_linked_shader *shader)
{
struct pipe_screen *pscreen = ctx->st->pipe->screen;
- unsigned ptarget = st_shader_stage_to_ptarget(shader->Stage);
+ enum pipe_shader_type ptarget = st_shader_stage_to_ptarget(shader->Stage);
enum pipe_shader_ir preferred_ir = (enum pipe_shader_ir)
pscreen->get_shader_param(pscreen, ptarget, PIPE_SHADER_CAP_PREFERRED_IR);
struct gl_program *prog = NULL;
gl_shader_stage stage = prog->_LinkedShaders[i]->Stage;
const struct gl_shader_compiler_options *options =
&ctx->Const.ShaderCompilerOptions[stage];
- unsigned ptarget = st_shader_stage_to_ptarget(stage);
+ enum pipe_shader_type ptarget = st_shader_stage_to_ptarget(stage);
bool have_dround = pscreen->get_shader_param(pscreen, ptarget,
PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED);
bool have_dfrexp = pscreen->get_shader_param(pscreen, ptarget,