static enum pipe_error
validate_sampler_resources(struct svga_context *svga)
{
- unsigned shader;
+ enum pipe_shader_type shader;
assert(svga_have_vgpu10(svga));
static enum pipe_error
validate_constant_buffers(struct svga_context *svga)
{
- unsigned shader;
+ enum pipe_shader_type shader;
assert(svga_have_vgpu10(svga));
void
svga_cleanup_sampler_state(struct svga_context *svga)
{
- unsigned shader;
+ enum pipe_shader_type shader;
if (!svga_have_vgpu10(svga))
return;
boolean
svga_check_sampler_view_resource_collision(struct svga_context *svga,
struct svga_winsys_surface *res,
- unsigned shader);
+ enum pipe_shader_type shader);
boolean
svga_check_sampler_framebuffer_resource_collision(struct svga_context *svga,
* state. This is basically the texture-related state.
*/
void
-svga_init_shader_key_common(const struct svga_context *svga, unsigned shader,
+svga_init_shader_key_common(const struct svga_context *svga,
+ enum pipe_shader_type shader,
struct svga_compile_key *key)
{
unsigned i, idx = 0;
int generic_index);
void
-svga_init_shader_key_common(const struct svga_context *svga, unsigned shader,
+svga_init_shader_key_common(const struct svga_context *svga,
+ enum pipe_shader_type shader,
struct svga_compile_key *key);
struct svga_shader_variant *
* Convert from PIPE_SHADER_* to SVGA3D_SHADERTYPE_*
*/
static inline SVGA3dShaderType
-svga_shader_type(unsigned shader)
+svga_shader_type(enum pipe_shader_type shader)
{
switch (shader) {
case PIPE_SHADER_VERTEX:
static unsigned
svga_get_extra_constants_common(struct svga_context *svga,
const struct svga_shader_variant *variant,
- unsigned shader, float *dest)
+ enum pipe_shader_type shader, float *dest)
{
uint32_t *dest_u = (uint32_t *) dest; // uint version of dest
unsigned i;
* \param value the new float[4] value
*/
static enum pipe_error
-emit_const(struct svga_context *svga, unsigned shader, unsigned i,
+emit_const(struct svga_context *svga, enum pipe_shader_type shader, unsigned i,
const float *value)
{
enum pipe_error ret = PIPE_OK;
*/
static enum pipe_error
emit_const_range(struct svga_context *svga,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned offset,
unsigned count,
const float (*values)[4])
* On VGPU10, emit_consts_vgpu10 is used instead.
*/
static enum pipe_error
-emit_consts_vgpu9(struct svga_context *svga, unsigned shader)
+emit_consts_vgpu9(struct svga_context *svga, enum pipe_shader_type shader)
{
const struct pipe_constant_buffer *cbuf;
struct svga_screen *ss = svga_screen(svga->pipe.screen);
static enum pipe_error
-emit_constbuf_vgpu10(struct svga_context *svga, unsigned shader)
+emit_constbuf_vgpu10(struct svga_context *svga, enum pipe_shader_type shader)
{
const struct pipe_constant_buffer *cbuf;
struct pipe_resource *dst_buffer = NULL;
static enum pipe_error
-emit_consts_vgpu10(struct svga_context *svga, unsigned shader)
+emit_consts_vgpu10(struct svga_context *svga, enum pipe_shader_type shader)
{
enum pipe_error ret;
unsigned dirty_constbufs;
struct svga_fragment_shader *fs,
struct svga_compile_key *key)
{
- const unsigned shader = PIPE_SHADER_FRAGMENT;
+ const enum pipe_shader_type shader = PIPE_SHADER_FRAGMENT;
unsigned i;
memset(key, 0, sizeof *key);
boolean
svga_check_sampler_view_resource_collision(struct svga_context *svga,
struct svga_winsys_surface *res,
- unsigned shader)
+ enum pipe_shader_type shader)
{
struct pipe_screen *screen = svga->pipe.screen;
unsigned i;
update_sampler_resources(struct svga_context *svga, unsigned dirty)
{
enum pipe_error ret = PIPE_OK;
- unsigned shader;
+ enum pipe_shader_type shader;
if (!svga_have_vgpu10(svga))
return PIPE_OK;
update_samplers(struct svga_context *svga, unsigned dirty )
{
enum pipe_error ret = PIPE_OK;
- unsigned shader;
+ enum pipe_shader_type shader;
if (!svga_have_vgpu10(svga))
return PIPE_OK;
*/
void svga_cleanup_tss_binding(struct svga_context *svga)
{
- const unsigned shader = PIPE_SHADER_FRAGMENT;
+ const enum pipe_shader_type shader = PIPE_SHADER_FRAGMENT;
unsigned i;
for (i = 0; i < ARRAY_SIZE(svga->state.hw_draw.views); i++) {
update_tss_binding(struct svga_context *svga,
unsigned dirty )
{
- const unsigned shader = PIPE_SHADER_FRAGMENT;
+ const enum pipe_shader_type shader = PIPE_SHADER_FRAGMENT;
boolean reemit = svga->rebind.flags.texture_samplers;
unsigned i;
unsigned count = MAX2( svga->curr.num_sampler_views[shader],
update_tss(struct svga_context *svga,
unsigned dirty )
{
- const unsigned shader = PIPE_SHADER_FRAGMENT;
+ const enum pipe_shader_type shader = PIPE_SHADER_FRAGMENT;
unsigned i;
struct ts_queue queue;
static void
make_vs_key(struct svga_context *svga, struct svga_compile_key *key)
{
- const unsigned shader = PIPE_SHADER_VERTEX;
+ const enum pipe_shader_type shader = PIPE_SHADER_VERTEX;
memset(key, 0, sizeof *key);
svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s)
{
enum pipe_error ret = PIPE_OK;
- unsigned shader;
+ enum pipe_shader_type shader;
struct pipe_surface *surf = NULL;
assert(svga_have_vgpu10(svga));