static void nvc0_bind_sampler_states(struct pipe_context *pipe, unsigned shader, unsigned start, unsigned nr, void **s) { switch (shader) { case PIPE_SHADER_VERTEX: assert(start == 0); nvc0_stage_sampler_states_bind(nvc0_context(pipe), 0, nr, s); break; case PIPE_SHADER_TESS_CTRL: assert(start == 0); nvc0_stage_sampler_states_bind(nvc0_context(pipe), 1, nr, s); break; case PIPE_SHADER_TESS_EVAL: assert(start == 0); nvc0_stage_sampler_states_bind(nvc0_context(pipe), 2, nr, s); break; case PIPE_SHADER_GEOMETRY: assert(start == 0); nvc0_stage_sampler_states_bind(nvc0_context(pipe), 3, nr, s); break; case PIPE_SHADER_FRAGMENT: assert(start == 0); nvc0_stage_sampler_states_bind(nvc0_context(pipe), 4, nr, s); break; case PIPE_SHADER_COMPUTE: nvc0_stage_sampler_states_bind_range(nvc0_context(pipe), 5, start, nr, s); nvc0_context(pipe)->dirty_cp |= NVC0_NEW_CP_SAMPLERS; break; } }
static void nvc0_bind_sampler_states(struct pipe_context *pipe, enum pipe_shader_type shader, unsigned start, unsigned nr, void **samplers) { const unsigned s = nvc0_shader_stage(shader); assert(start == 0); nvc0_stage_sampler_states_bind(nvc0_context(pipe), s, nr, samplers); if (s == 5) nvc0_context(pipe)->dirty_cp |= NVC0_NEW_CP_SAMPLERS; else nvc0_context(pipe)->dirty_3d |= NVC0_NEW_3D_SAMPLERS; }
static void nvc0_gp_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **s) { nvc0_stage_sampler_states_bind(nvc0_context(pipe), 3, nr, s); }