Reviewed-by: Charmaine Lee <charmainel@vmware.com>tags/13.0-branchpoint
| @@ -311,7 +311,7 @@ xlate_index_format(unsigned indexWidth) | |||
| static enum pipe_error | |||
| validate_sampler_resources(struct svga_context *svga) | |||
| { | |||
| unsigned shader; | |||
| enum pipe_shader_type shader; | |||
| assert(svga_have_vgpu10(svga)); | |||
| @@ -376,7 +376,7 @@ validate_sampler_resources(struct svga_context *svga) | |||
| static enum pipe_error | |||
| validate_constant_buffers(struct svga_context *svga) | |||
| { | |||
| unsigned shader; | |||
| enum pipe_shader_type shader; | |||
| assert(svga_have_vgpu10(svga)); | |||
| @@ -529,7 +529,7 @@ done: | |||
| void | |||
| svga_cleanup_sampler_state(struct svga_context *svga) | |||
| { | |||
| unsigned shader; | |||
| enum pipe_shader_type shader; | |||
| if (!svga_have_vgpu10(svga)) | |||
| return; | |||
| @@ -102,7 +102,7 @@ svga_sampler_view_reference(struct svga_sampler_view **ptr, struct svga_sampler_ | |||
| 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, | |||
| @@ -166,7 +166,8 @@ svga_remap_generic_index(int8_t remap_table[MAX_GENERIC_VARYING], | |||
| * 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; | |||
| @@ -253,7 +253,8 @@ svga_remap_generic_index(int8_t remap_table[MAX_GENERIC_VARYING], | |||
| 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 * | |||
| @@ -310,7 +311,7 @@ svga_shader_too_large(const struct svga_context *svga, | |||
| * 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: | |||
| @@ -65,7 +65,7 @@ | |||
| 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; | |||
| @@ -271,7 +271,7 @@ svga_get_extra_gs_constants(struct svga_context *svga, float *dest) | |||
| * \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; | |||
| @@ -316,7 +316,7 @@ emit_const(struct svga_context *svga, unsigned shader, unsigned i, | |||
| */ | |||
| 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]) | |||
| @@ -439,7 +439,7 @@ emit_const_range(struct svga_context *svga, | |||
| * 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); | |||
| @@ -541,7 +541,7 @@ emit_consts_vgpu9(struct svga_context *svga, unsigned shader) | |||
| 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; | |||
| @@ -686,7 +686,7 @@ emit_constbuf_vgpu10(struct svga_context *svga, unsigned shader) | |||
| 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; | |||
| @@ -180,7 +180,7 @@ make_fs_key(const struct svga_context *svga, | |||
| 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); | |||
| @@ -66,7 +66,7 @@ svga_resource_handle(struct pipe_resource *res) | |||
| 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; | |||
| @@ -228,7 +228,7 @@ static enum pipe_error | |||
| 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; | |||
| @@ -339,7 +339,7 @@ static enum pipe_error | |||
| 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; | |||
| @@ -41,7 +41,7 @@ | |||
| */ | |||
| 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++) { | |||
| @@ -140,7 +140,7 @@ static enum pipe_error | |||
| 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], | |||
| @@ -380,7 +380,7 @@ static enum pipe_error | |||
| 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; | |||
| @@ -162,7 +162,7 @@ compile_vs(struct svga_context *svga, | |||
| 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); | |||
| @@ -402,7 +402,7 @@ struct pipe_surface * | |||
| 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)); | |||