[Mesa-dev] [PATCH 02/14] cso: s/unsigned/enum pipe_shader_type/

Brian Paul brianp at vmware.com
Tue Mar 7 02:08:05 UTC 2017


---
 src/gallium/auxiliary/cso_cache/cso_context.c | 11 ++++++-----
 src/gallium/auxiliary/cso_cache/cso_context.h | 11 ++++++-----
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 0f12304..d033ed3 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1203,7 +1203,7 @@ unsigned cso_get_aux_vertex_buffer_slot(struct cso_context *ctx)
 
 
 enum pipe_error
-cso_single_sampler(struct cso_context *ctx, unsigned shader_stage,
+cso_single_sampler(struct cso_context *ctx, enum pipe_shader_type shader_stage,
                    unsigned idx, const struct pipe_sampler_state *templ)
 {
    if (templ) {
@@ -1537,7 +1537,8 @@ cso_restore_stream_outputs(struct cso_context *ctx)
 /* constant buffers */
 
 void
-cso_set_constant_buffer(struct cso_context *cso, unsigned shader_stage,
+cso_set_constant_buffer(struct cso_context *cso,
+                        enum pipe_shader_type shader_stage,
                         unsigned index, struct pipe_constant_buffer *cb)
 {
    struct pipe_context *pipe = cso->pipe;
@@ -1551,7 +1552,7 @@ cso_set_constant_buffer(struct cso_context *cso, unsigned shader_stage,
 
 void
 cso_set_constant_buffer_resource(struct cso_context *cso,
-                                 unsigned shader_stage,
+                                 enum pipe_shader_type shader_stage,
                                  unsigned index,
                                  struct pipe_resource *buffer)
 {
@@ -1569,7 +1570,7 @@ cso_set_constant_buffer_resource(struct cso_context *cso,
 
 void
 cso_save_constant_buffer_slot0(struct cso_context *cso,
-                                  unsigned shader_stage)
+                               enum pipe_shader_type shader_stage)
 {
    util_copy_constant_buffer(&cso->aux_constbuf_saved[shader_stage],
                              &cso->aux_constbuf_current[shader_stage]);
@@ -1577,7 +1578,7 @@ cso_save_constant_buffer_slot0(struct cso_context *cso,
 
 void
 cso_restore_constant_buffer_slot0(struct cso_context *cso,
-                                     unsigned shader_stage)
+                                  enum pipe_shader_type shader_stage)
 {
    cso_set_constant_buffer(cso, shader_stage, 0,
                            &cso->aux_constbuf_saved[shader_stage]);
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
index 2a65354..56b1f82 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -70,7 +70,7 @@ cso_set_samplers(struct cso_context *cso,
  * samplers one at a time:
  */
 enum pipe_error
-cso_single_sampler(struct cso_context *cso, unsigned shader_stage,
+cso_single_sampler(struct cso_context *cso, enum pipe_shader_type shader_stage,
                    unsigned idx, const struct pipe_sampler_state *states);
 
 void
@@ -205,16 +205,17 @@ cso_set_shader_images(struct cso_context *cso,
 
 /* constant buffers */
 
-void cso_set_constant_buffer(struct cso_context *cso, unsigned shader_stage,
+void cso_set_constant_buffer(struct cso_context *cso,
+                             enum pipe_shader_type shader_stage,
                              unsigned index, struct pipe_constant_buffer *cb);
 void cso_set_constant_buffer_resource(struct cso_context *cso,
-                                      unsigned shader_stage,
+                                      enum pipe_shader_type shader_stage,
                                       unsigned index,
                                       struct pipe_resource *buffer);
 void cso_save_constant_buffer_slot0(struct cso_context *cso,
-                                    unsigned shader_stage);
+                                    enum pipe_shader_type shader_stage);
 void cso_restore_constant_buffer_slot0(struct cso_context *cso,
-                                       unsigned shader_stage);
+                                       enum pipe_shader_type shader_stage);
 
 
 /* drawing */
-- 
1.9.1



More information about the mesa-dev mailing list