#include "draw/draw_context.h"
#include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
-#include "pipe/p_util.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "nv40_context.h"
#include "nv40_screen.h"
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);
FREE(nv40);
}
+static unsigned int
+nv40_is_texture_referenced( struct pipe_context *pipe,
+ struct pipe_texture *texture,
+ unsigned face, unsigned level)
+{
+ /**
+ * 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
+nv40_is_buffer_referenced( struct pipe_context *pipe,
+ struct pipe_buffer *buf)
+{
+ /**
+ * 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 *
nv40_create(struct pipe_screen *pscreen, unsigned pctx_id)
{
nv40->pipe.clear = nv40_clear;
nv40->pipe.flush = nv40_flush;
+ nv40->pipe.is_texture_referenced = nv40_is_texture_referenced;
+ nv40->pipe.is_buffer_referenced = nv40_is_buffer_referenced;
+
nv40_init_query_functions(nv40);
nv40_init_surface_functions(nv40);
nv40_init_state_functions(nv40);
return &nv40->pipe;
}
-