Re: [Mesa-dev] [PATCH] svga: s/unsigned/enum pipe_shader_type/

2018-02-14 Thread Neha Bhende
Looks good.


Reviewed-by: Neha Bhende


Regards,

Neha


From: Brian Paul 
Sent: Wednesday, February 14, 2018 1:53:52 PM
To: mesa-dev@lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende
Subject: [PATCH] svga: s/unsigned/enum pipe_shader_type/

---
 src/gallium/drivers/svga/svga_tgsi.c| 3 ++-
 src/gallium/drivers/svga/svga_tgsi.h| 5 +++--
 src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_tgsi.c 
b/src/gallium/drivers/svga/svga_tgsi.c
index 0b2d8af..8819313 100644
--- a/src/gallium/drivers/svga/svga_tgsi.c
+++ b/src/gallium/drivers/svga/svga_tgsi.c
@@ -168,7 +168,8 @@ svga_shader_emit_header(struct svga_shader_emitter *emit)
 struct svga_shader_variant *
 svga_tgsi_vgpu9_translate(struct svga_context *svga,
   const struct svga_shader *shader,
-  const struct svga_compile_key *key, unsigned unit)
+  const struct svga_compile_key *key,
+  enum pipe_shader_type unit)
 {
struct svga_shader_variant *variant = NULL;
struct svga_shader_emitter emit;
diff --git a/src/gallium/drivers/svga/svga_tgsi.h 
b/src/gallium/drivers/svga/svga_tgsi.h
index 2581135..e986011 100644
--- a/src/gallium/drivers/svga/svga_tgsi.h
+++ b/src/gallium/drivers/svga/svga_tgsi.h
@@ -65,13 +65,14 @@ static inline void svga_generate_vdecl_semantics( unsigned 
idx,
 struct svga_shader_variant *
 svga_tgsi_vgpu9_translate(struct svga_context *svga,
   const struct svga_shader *shader,
-  const struct svga_compile_key *key, unsigned unit);
+  const struct svga_compile_key *key,
+  enum pipe_shader_type unit);

 struct svga_shader_variant *
 svga_tgsi_vgpu10_translate(struct svga_context *svga,
const struct svga_shader *shader,
const struct svga_compile_key *key,
-   unsigned unit);
+   enum pipe_shader_type unit);

 boolean svga_shader_verify(const uint32_t *tokens, unsigned nr_tokens);

diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c 
b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
index 73aa78b..4d0834b 100644
--- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
+++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
@@ -6484,7 +6484,7 @@ struct svga_shader_variant *
 svga_tgsi_vgpu10_translate(struct svga_context *svga,
const struct svga_shader *shader,
const struct svga_compile_key *key,
-   unsigned unit)
+   enum pipe_shader_type unit)
 {
struct svga_shader_variant *variant = NULL;
struct svga_shader_emitter_v10 *emit;
--
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] svga: s/unsigned/enum pipe_shader_type/

2016-08-29 Thread Charmaine Lee

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,