summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvfx/nvfx_context.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-08-03 05:47:41 +0200
committerLuca Barbieri <[email protected]>2010-08-21 20:42:14 +0200
commit28eb392a853bb43bdc6cfe7ba814f046c39ca7ae (patch)
tree6e7cc6d42f4a439aa8e543976e3893829a23be85 /src/gallium/drivers/nvfx/nvfx_context.c
parentff74143fcc80b0157875bb0ce4b34a80f92e09c2 (diff)
nvfx: new 2D: new render temporaries with resources
This patch adds support for creating temporary surfaces to allow rendering to surfaces that cannot be rendered to. It uses the _second_ version of the render temporary infrastructure. This is necessary for swizzled 3D textures and small mipmaps of swizzled 2D textures. This version of the patch creates a resource to use as a temporary instead of a raw BO, making the code simpler.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_context.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c
index 3d45f5f0baf..7ab81de7dd5 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.c
+++ b/src/gallium/drivers/nvfx/nvfx_context.c
@@ -15,6 +15,7 @@ nvfx_flush(struct pipe_context *pipe, unsigned flags,
struct nouveau_channel *chan = screen->base.channel;
struct nouveau_grobj *eng3d = screen->eng3d;
+ /* XXX: we need to actually be intelligent here */
if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
BEGIN_RING(chan, eng3d, 0x1fd8, 1);
OUT_RING (chan, 2);
@@ -87,5 +88,8 @@ nvfx_create(struct pipe_screen *pscreen, void *priv)
/* set these to that we init them on first validation */
nvfx->state.scissor_enabled = ~0;
nvfx->state.stipple_enabled = ~0;
+
+ LIST_INITHEAD(&nvfx->render_cache);
+
return &nvfx->pipe;
}