summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_context.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-04-24 13:35:44 +0200
committerChristoph Bumiller <[email protected]>2012-04-24 13:35:44 +0200
commita48e5dee94460fb9b70a193069daca5f5b3e575b (patch)
tree0743084c50e80730d4ee3779de76bfd14621034c /src/gallium/drivers/nvc0/nvc0_context.c
parent2170fed8f4c01e719b8fc9d6ff42f3214dadc267 (diff)
nv50,nvc0: don't initialize the draw module, we don't use it
But some day we might (e.g. for blending 16 bpp formats on nv50).
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_context.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
index 8abac09ffd5..b0ab5bdc504 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
@@ -20,10 +20,13 @@
* SOFTWARE.
*/
-#include "draw/draw_context.h"
#include "pipe/p_defines.h"
#include "util/u_framebuffer.h"
+#ifdef NVC0_WITH_DRAW_MODULE
+#include "draw/draw_context.h"
+#endif
+
#include "nvc0_context.h"
#include "nvc0_screen.h"
#include "nvc0_resource.h"
@@ -91,7 +94,9 @@ nvc0_destroy(struct pipe_context *pipe)
nvc0_context_unreference_resources(nvc0);
+#ifdef NVC0_WITH_DRAW_MODULE
draw_destroy(nvc0->draw);
+#endif
FREE(nvc0);
}
@@ -158,9 +163,12 @@ nvc0_create(struct pipe_screen *pscreen, void *priv)
nvc0_init_transfer_functions(nvc0);
nvc0_init_resource_functions(pipe);
+#ifdef NVC0_WITH_DRAW_MODULE
+ /* no software fallbacks implemented */
nvc0->draw = draw_create(pipe);
assert(nvc0->draw);
draw_set_rasterize_stage(nvc0->draw, nvc0_draw_render_stage(nvc0));
+#endif
nouveau_context_init_vdec(&nvc0->base);