[Mesa-dev] [PATCH 30/84] st/nine: Rename cso in nine_context to cso_shader

Axel Davy axel.davy at ens.fr
Wed Dec 7 22:55:03 UTC 2016


This patch it to avoid name conflict when device->cso
is moved to nine_context.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/nine_state.c    | 12 ++++++------
 src/gallium/state_trackers/nine/nine_state.h    |  2 +-
 src/gallium/state_trackers/nine/pixelshader9.c  |  4 ++--
 src/gallium/state_trackers/nine/vertexshader9.c |  4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 527bd2e..22255f2 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -358,10 +358,10 @@ prepare_vs(struct NineDevice9 *device, uint8_t shader_changed)
 
     /* likely because we dislike FF */
     if (likely(context->programmable_vs)) {
-        context->cso.vs = NineVertexShader9_GetVariant(vs);
+        context->cso_shader.vs = NineVertexShader9_GetVariant(vs);
     } else {
         vs = device->ff.vs;
-        context->cso.vs = vs->ff_cso;
+        context->cso_shader.vs = vs->ff_cso;
     }
 
     if (context->rs[NINED3DRS_VSPOINTSIZE] != vs->point_size) {
@@ -392,10 +392,10 @@ prepare_ps(struct NineDevice9 *device, uint8_t shader_changed)
         return 0;
 
     if (likely(ps)) {
-        context->cso.ps = NinePixelShader9_GetVariant(ps);
+        context->cso_shader.ps = NinePixelShader9_GetVariant(ps);
     } else {
         ps = device->ff.ps;
-        context->cso.ps = ps->ff_cso;
+        context->cso_shader.ps = ps->ff_cso;
     }
 
     if ((context->bound_samplers_mask_ps & ps->sampler_mask) != ps->sampler_mask)
@@ -871,7 +871,7 @@ commit_vs(struct NineDevice9 *device)
 {
     struct nine_context *context = &device->context;
 
-    device->pipe->bind_vs_state(device->pipe, context->cso.vs);
+    device->pipe->bind_vs_state(device->pipe, context->cso_shader.vs);
 }
 
 
@@ -880,7 +880,7 @@ commit_ps(struct NineDevice9 *device)
 {
     struct nine_context *context = &device->context;
 
-    device->pipe->bind_fs_state(device->pipe, context->cso.ps);
+    device->pipe->bind_fs_state(device->pipe, context->cso_shader.ps);
 }
 /* State Update */
 
diff --git a/src/gallium/state_trackers/nine/nine_state.h b/src/gallium/state_trackers/nine/nine_state.h
index 2cf607c..d618987 100644
--- a/src/gallium/state_trackers/nine/nine_state.h
+++ b/src/gallium/state_trackers/nine/nine_state.h
@@ -239,7 +239,7 @@ struct nine_context {
     struct {
         void *vs;
         void *ps;
-    } cso;
+    } cso_shader;
 
     uint8_t rt_mask;
 
diff --git a/src/gallium/state_trackers/nine/pixelshader9.c b/src/gallium/state_trackers/nine/pixelshader9.c
index 387ecc3..675b7b4 100644
--- a/src/gallium/state_trackers/nine/pixelshader9.c
+++ b/src/gallium/state_trackers/nine/pixelshader9.c
@@ -97,7 +97,7 @@ NinePixelShader9_dtor( struct NinePixelShader9 *This )
 
         do {
             if (var->cso) {
-                if (This->base.device->context.cso.ps == var->cso)
+                if (This->base.device->context.cso_shader.ps == var->cso)
                     pipe->bind_fs_state(pipe, NULL);
                 pipe->delete_fs_state(pipe, var->cso);
             }
@@ -105,7 +105,7 @@ NinePixelShader9_dtor( struct NinePixelShader9 *This )
         } while (var);
 
         if (This->ff_cso) {
-            if (This->ff_cso == This->base.device->context.cso.ps)
+            if (This->ff_cso == This->base.device->context.cso_shader.ps)
                 pipe->bind_fs_state(pipe, NULL);
             pipe->delete_fs_state(pipe, This->ff_cso);
         }
diff --git a/src/gallium/state_trackers/nine/vertexshader9.c b/src/gallium/state_trackers/nine/vertexshader9.c
index 28c40f4..b1ee7ac 100644
--- a/src/gallium/state_trackers/nine/vertexshader9.c
+++ b/src/gallium/state_trackers/nine/vertexshader9.c
@@ -116,7 +116,7 @@ NineVertexShader9_dtor( struct NineVertexShader9 *This )
 
         do {
             if (var->cso) {
-                if (This->base.device->context.cso.vs == var->cso)
+                if (This->base.device->context.cso_shader.vs == var->cso)
                     pipe->bind_vs_state(pipe, NULL);
                 pipe->delete_vs_state(pipe, var->cso);
             }
@@ -131,7 +131,7 @@ NineVertexShader9_dtor( struct NineVertexShader9 *This )
         }
 
         if (This->ff_cso) {
-            if (This->ff_cso == This->base.device->context.cso.vs)
+            if (This->ff_cso == This->base.device->context.cso_shader.vs)
                 pipe->bind_vs_state(pipe, NULL);
             pipe->delete_vs_state(pipe, This->ff_cso);
         }
-- 
2.10.2



More information about the mesa-dev mailing list