summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2009-10-17 20:49:18 +0200
committerPatrice Mandin <[email protected]>2009-10-17 20:49:18 +0200
commit114417a2f52ab463f37fcabb5e9b0636574623dc (patch)
treeda5ac2e08b542c6fa7e23ceed89ce08e617af6f4 /src/gallium/drivers
parent66aab9a1f6de241687a14f7aed45226061c1b84b (diff)
nouveau: nv40: Use same workaround as i915 for segfault related to vbo
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv40/nv40_context.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gallium/drivers/nv40/nv40_context.c b/src/gallium/drivers/nv40/nv40_context.c
index 8eba6a43ef9..4e236712027 100644
--- a/src/gallium/drivers/nv40/nv40_context.c
+++ b/src/gallium/drivers/nv40/nv40_context.c
@@ -10,7 +10,7 @@ nv40_flush(struct pipe_context *pipe, unsigned flags,
struct pipe_fence_handle **fence)
{
struct nv40_context *nv40 = nv40_context(pipe);
-
+
if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
BEGIN_RING(curie, 0x1fd8, 1);
OUT_RING (2);
@@ -37,10 +37,14 @@ nv40_is_texture_referenced( struct pipe_context *pipe,
unsigned face, unsigned level)
{
/**
- * FIXME: Optimize.
+ * FIXME: Return the correct result. We can't always return referenced
+ * since it causes a double flush within the vbo module.
*/
-
+#if 0
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+#else
+ return 0;
+#endif
}
static unsigned int
@@ -48,10 +52,14 @@ nv40_is_buffer_referenced( struct pipe_context *pipe,
struct pipe_buffer *buf)
{
/**
- * FIXME: Optimize.
+ * FIXME: Return the correct result. We can't always return referenced
+ * since it causes a double flush within the vbo module.
*/
-
+#if 0
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+#else
+ return 0;
+#endif
}
struct pipe_context *
@@ -95,4 +103,3 @@ nv40_create(struct pipe_screen *pscreen, unsigned pctx_id)
return &nv40->pipe;
}
-