nv50,nvc0: don't initialize the draw module, we don't use it
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 24 Apr 2012 11:35:44 +0000 (13:35 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 24 Apr 2012 11:35:44 +0000 (13:35 +0200)
But some day we might (e.g. for blending 16 bpp formats on nv50).

src/gallium/drivers/nv50/Makefile.sources
src/gallium/drivers/nv50/nv50_context.c
src/gallium/drivers/nv50/nv50_context.h
src/gallium/drivers/nvc0/Makefile.sources
src/gallium/drivers/nvc0/nvc0_context.c
src/gallium/drivers/nvc0/nvc0_context.h

index eeb0e11652adbcddfd908297ef1df43cf4a198cb..c112e82e9c0b20791d5186a27b6fe38bce067c3d 100644 (file)
@@ -1,6 +1,5 @@
 C_SOURCES := \
        nv50_context.c \
-       nv50_draw.c \
        nv50_formats.c \
        nv50_miptree.c \
        nv50_resource.c \
index 8651be01c5c66ddea589fdfbe07704712b3f3c20..558fe0b3684d578ef2f7be14a46566a8678add59 100644 (file)
  * SOFTWARE.
  */
 
-#include "draw/draw_context.h"
 #include "pipe/p_defines.h"
 #include "util/u_framebuffer.h"
 
+#ifdef NV50_WITH_DRAW_MODULE
+#include "draw/draw_context.h"
+#endif
+
 #include "nv50_context.h"
 #include "nv50_screen.h"
 #include "nv50_resource.h"
@@ -103,7 +106,9 @@ nv50_destroy(struct pipe_context *pipe)
 
    nv50_context_unreference_resources(nv50);
 
+#ifdef NV50_WITH_DRAW_MODULE
    draw_destroy(nv50->draw);
+#endif
 
    FREE(nv50);
 }
@@ -157,9 +162,12 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
    nv50_init_state_functions(nv50);
    nv50_init_resource_functions(pipe);
 
+#ifdef NV50_WITH_DRAW_MODULE
+   /* no software fallbacks implemented */
    nv50->draw = draw_create(pipe);
    assert(nv50->draw);
    draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));
+#endif
 
    nouveau_context_init_vdec(&nv50->base);
 
index 65304a8f1ffac9f12cce38fa4a2a61f180046072..1cee0e06c02e2a85a509384636fbb5f291e6f0f4 100644 (file)
@@ -10,7 +10,9 @@
 #include "util/u_inlines.h"
 #include "util/u_dynarray.h"
 
+#ifdef NV50_WITH_DRAW_MODULE
 #include "draw/draw_vertex.h"
+#endif
 
 #include "nv50_debug.h"
 #include "nv50_winsys.h"
@@ -136,7 +138,9 @@ struct nv50_context {
 
    boolean vbo_push_hint;
 
+#ifdef NV50_WITH_DRAW_MODULE
    struct draw_context *draw;
+#endif
 };
 
 static INLINE struct nv50_context *
index 394c5b9220ec5ae8c71e6a75559328e76668c01c..d74ecf385f52d9ef146c8f43978d756645c41903 100644 (file)
@@ -1,6 +1,5 @@
 C_SOURCES := \
        nvc0_context.c \
-       nvc0_draw.c \
        nvc0_formats.c \
        nvc0_miptree.c \
        nvc0_resource.c \
index 8abac09ffd5ded884f8d7720f29e834e0011f506..b0ab5bdc504cef93c751d1a80ac2b2745400c6fd 100644 (file)
  * 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);
 
index 140ce1ac7ef07563ea8c0e98f7ead9d9736d1c2d..d2dee03a19e4bde5d66d8ee8f72d7432abf6a0be 100644 (file)
@@ -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 *