summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-11 18:54:31 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-11 18:55:58 -0600
commit339e7ec6805e6de8794514c0a935081b5d36d38f (patch)
tree19a929546b9c5c6ffed958378a23c84eaa4c67a6 /src/gallium/auxiliary/draw
parent21ff00306131cd5598f95285badaaabc98021e11 (diff)
gallium: rework CSO-related code in state tracker
Use the code in cso_context.c rather than st_cache.c. Basically, binding of state objects now goes through the CSO module. But Vertex/fragment shaders go through pipe->bind_fs/vs_state() since they're not cached by the CSO module at this time. Also, update softpipe driver to handle NULL state objects in various places. This happens during context destruction. May need to update other drivers...
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_aaline.c3
-rw-r--r--src/gallium/auxiliary/draw/draw_aapoint.c3
-rw-r--r--src/gallium/auxiliary/draw/draw_pstipple.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_aaline.c b/src/gallium/auxiliary/draw/draw_aaline.c
index 3ec73b0800..6b1e640ae9 100644
--- a/src/gallium/auxiliary/draw/draw_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_aaline.c
@@ -733,7 +733,8 @@ aaline_bind_fs_state(struct pipe_context *pipe, void *fs)
/* save current */
aaline->fs = aafs;
/* pass-through */
- aaline->driver_bind_fs_state(aaline->pipe, aafs->driver_fs);
+ aaline->driver_bind_fs_state(aaline->pipe,
+ (aafs ? aafs->driver_fs : NULL));
}
diff --git a/src/gallium/auxiliary/draw/draw_aapoint.c b/src/gallium/auxiliary/draw/draw_aapoint.c
index 70f696475f..99e9e9fe34 100644
--- a/src/gallium/auxiliary/draw/draw_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_aapoint.c
@@ -800,7 +800,8 @@ aapoint_bind_fs_state(struct pipe_context *pipe, void *fs)
/* save current */
aapoint->fs = aafs;
/* pass-through */
- aapoint->driver_bind_fs_state(aapoint->pipe, aafs->driver_fs);
+ aapoint->driver_bind_fs_state(aapoint->pipe,
+ (aafs ? aafs->driver_fs : NULL));
}
diff --git a/src/gallium/auxiliary/draw/draw_pstipple.c b/src/gallium/auxiliary/draw/draw_pstipple.c
index b3e52dc1c7..ed50d0805a 100644
--- a/src/gallium/auxiliary/draw/draw_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pstipple.c
@@ -595,7 +595,8 @@ pstip_bind_fs_state(struct pipe_context *pipe, void *fs)
/* save current */
pstip->fs = aafs;
/* pass-through */
- pstip->driver_bind_fs_state(pstip->pipe, aafs->driver_fs);
+ pstip->driver_bind_fs_state(pstip->pipe,
+ (aafs ? aafs->driver_fs : NULL));
}