aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0
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
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')
-rw-r--r--src/gallium/drivers/nvc0/Makefile.sources1
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.c10
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.h4
3 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvc0/Makefile.sources b/src/gallium/drivers/nvc0/Makefile.sources
index 394c5b9220e..d74ecf385f5 100644
--- a/src/gallium/drivers/nvc0/Makefile.sources
+++ b/src/gallium/drivers/nvc0/Makefile.sources
@@ -1,6 +1,5 @@
C_SOURCES := \
nvc0_context.c \
- nvc0_draw.c \
nvc0_formats.c \
nvc0_miptree.c \
nvc0_resource.c \
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);
diff --git a/src/gallium/drivers/nvc0/nvc0_context.h b/src/gallium/drivers/nvc0/nvc0_context.h
index 140ce1ac7ef..d2dee03a19e 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.h
+++ b/src/gallium/drivers/nvc0/nvc0_context.h
@@ -10,7 +10,9 @@
#include "util/u_inlines.h"
#include "util/u_dynarray.h"
+#ifdef NVC0_WITH_DRAW_MODULE
#include "draw/draw_vertex.h"
+#endif
#include "nv50/nv50_debug.h"
#include "nvc0_winsys.h"
@@ -155,7 +157,9 @@ struct nvc0_context {
struct pipe_stream_output_target *tfbbuf[4];
unsigned num_tfbbufs;
+#ifdef NVC0_WITH_DRAW_MODULE
struct draw_context *draw;
+#endif
};
static INLINE struct nvc0_context *