Reviewed-by: Charmaine Lee
From: Brian Paul
Sent: Monday, August 29, 2016 9:16:09 AM
To: mesa-dev@lists.freedesktop.org
Cc: Neha Bhende; Charmaine Lee
Subject: [PATCH] svga: s/unsigned/enum pipe_shader_type/
---
src/gallium/drivers/svga/svga_draw.c| 4 ++--
src/gallium/drivers/svga/svga_pipe_sampler.c| 2 +-
src/gallium/drivers/svga/svga_sampler_view.h| 2 +-
src/gallium/drivers/svga/svga_shader.c | 3 ++-
src/gallium/drivers/svga/svga_shader.h | 5 +++--
src/gallium/drivers/svga/svga_state_constants.c | 12 ++--
src/gallium/drivers/svga/svga_state_fs.c| 2 +-
src/gallium/drivers/svga/svga_state_sampler.c | 6 +++---
src/gallium/drivers/svga/svga_state_tss.c | 6 +++---
src/gallium/drivers/svga/svga_state_vs.c| 2 +-
src/gallium/drivers/svga/svga_surface.c | 2 +-
11 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/src/gallium/drivers/svga/svga_draw.c
b/src/gallium/drivers/svga/svga_draw.c
index 9e0dfe5..f8d3ae5 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -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));
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c
b/src/gallium/drivers/svga/svga_pipe_sampler.c
index 4a2b3c3..5d7af70 100644
--- a/src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/src/gallium/drivers/svga/svga_pipe_sampler.c
@@ -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;
diff --git a/src/gallium/drivers/svga/svga_sampler_view.h
b/src/gallium/drivers/svga/svga_sampler_view.h
index b36f089..7521a82 100644
--- a/src/gallium/drivers/svga/svga_sampler_view.h
+++ b/src/gallium/drivers/svga/svga_sampler_view.h
@@ -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,
diff --git a/src/gallium/drivers/svga/svga_shader.c
b/src/gallium/drivers/svga/svga_shader.c
index 9ba6055..55f7922 100644
--- a/src/gallium/drivers/svga/svga_shader.c
+++ b/src/gallium/drivers/svga/svga_shader.c
@@ -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;
diff --git a/src/gallium/drivers/svga/svga_shader.h
b/src/gallium/drivers/svga/svga_shader.h
index b53a4bf..ec116c0 100644
--- a/src/gallium/drivers/svga/svga_shader.h
+++ b/src/gallium/drivers/svga/svga_shader.h
@@ -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:
diff --git a/src/gallium/drivers/svga/svga_state_constants.c
b/src/gallium/drivers/svga/svga_state_constants.c
index 8784f47..dc80edf 100644
--- a/src/gallium/drivers/svga/svga_state_constants.c
+++ b/src/gallium/drivers/svga/svga_state_constants.c
@@ -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,