From 12311c7c525ce835f97571d0ec58a23feb92f876 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 5 Sep 2014 22:55:01 -0400 Subject: [PATCH] nv50,nvc0: get rid of draw module support This hasn't been enabled in a long time and is completely stale and unnecessary. Remove, esp since it doesn't build. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/Makefile.sources | 2 - .../drivers/nouveau/nv50/nv50_context.c | 15 ---- .../drivers/nouveau/nv50/nv50_context.h | 8 -- src/gallium/drivers/nouveau/nv50/nv50_draw.c | 88 ------------------- .../drivers/nouveau/nvc0/nvc0_context.c | 15 ---- .../drivers/nouveau/nvc0/nvc0_context.h | 8 -- src/gallium/drivers/nouveau/nvc0/nvc0_draw.c | 88 ------------------- 7 files changed, 224 deletions(-) delete mode 100644 src/gallium/drivers/nouveau/nv50/nv50_draw.c delete mode 100644 src/gallium/drivers/nouveau/nvc0/nvc0_draw.c diff --git a/src/gallium/drivers/nouveau/Makefile.sources b/src/gallium/drivers/nouveau/Makefile.sources index c79360a5a56..951f3eed8bd 100644 --- a/src/gallium/drivers/nouveau/Makefile.sources +++ b/src/gallium/drivers/nouveau/Makefile.sources @@ -67,7 +67,6 @@ NV50_C_SOURCES := \ nv50/nv50_context.c \ nv50/nv50_context.h \ nv50/nv50_defs.xml.h \ - nv50/nv50_draw.c \ nv50/nv50_formats.c \ nv50/nv50_miptree.c \ nv50/nv50_program.c \ @@ -146,7 +145,6 @@ NVC0_C_SOURCES := \ nvc0/nvc0_compute.xml.h \ nvc0/nvc0_context.c \ nvc0/nvc0_context.h \ - nvc0/nvc0_draw.c \ nvc0/nvc0_formats.c \ nvc0/nvc0_m2mf.xml.h \ nvc0/nvc0_miptree.c \ diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c index c2eb0c000ec..07f6378c6ae 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c @@ -23,10 +23,6 @@ #include "pipe/p_defines.h" #include "util/u_framebuffer.h" -#ifdef NV50_WITH_DRAW_MODULE -#include "draw/draw_context.h" -#endif - #include "nv50/nv50_context.h" #include "nv50/nv50_screen.h" #include "nv50/nv50_resource.h" @@ -149,10 +145,6 @@ nv50_destroy(struct pipe_context *pipe) nv50_context_unreference_resources(nv50); -#ifdef NV50_WITH_DRAW_MODULE - draw_destroy(nv50->draw); -#endif - FREE(nv50->blit); nouveau_context_destroy(&nv50->base); @@ -309,13 +301,6 @@ nv50_create(struct pipe_screen *pscreen, void *priv) nv50->base.invalidate_resource_storage = nv50_invalidate_resource_storage; -#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 - if (screen->base.device->chipset < 0x84 || debug_get_bool_option("NOUVEAU_PMPEG", FALSE)) { /* PMPEG */ diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.h b/src/gallium/drivers/nouveau/nv50/nv50_context.h index 9c2af40e53b..9557317af9f 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.h @@ -10,10 +10,6 @@ #include "util/u_inlines.h" #include "util/u_dynarray.h" -#ifdef NV50_WITH_DRAW_MODULE -#include "draw/draw_vertex.h" -#endif - #include "nv50/nv50_winsys.h" #include "nv50/nv50_stateobj.h" #include "nv50/nv50_screen.h" @@ -186,10 +182,6 @@ struct nv50_context { uint cond_mode; struct nv50_blitctx *blit; - -#ifdef NV50_WITH_DRAW_MODULE - struct draw_context *draw; -#endif }; static INLINE struct nv50_context * diff --git a/src/gallium/drivers/nouveau/nv50/nv50_draw.c b/src/gallium/drivers/nouveau/nv50/nv50_draw.c deleted file mode 100644 index fa68cd8ee6a..00000000000 --- a/src/gallium/drivers/nouveau/nv50/nv50_draw.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2008 Ben Skeggs - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "draw/draw_pipe.h" - -#include "nv50/nv50_context.h" - -struct nv50_render_stage { - struct draw_stage stage; - struct nv50_context *nv50; -}; - -static INLINE struct nv50_render_stage * -nv50_render_stage(struct draw_stage *stage) -{ - return (struct nv50_render_stage *)stage; -} - -static void -nv50_render_point(struct draw_stage *stage, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nv50_render_line(struct draw_stage *stage, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nv50_render_tri(struct draw_stage *stage, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nv50_render_flush(struct draw_stage *stage, unsigned flags) -{ -} - -static void -nv50_render_reset_stipple_counter(struct draw_stage *stage) -{ - NOUVEAU_ERR("\n"); -} - -static void -nv50_render_destroy(struct draw_stage *stage) -{ - FREE(stage); -} - -struct draw_stage * -nv50_draw_render_stage(struct nv50_context *nv50) -{ - struct nv50_render_stage *rs = CALLOC_STRUCT(nv50_render_stage); - - rs->nv50 = nv50; - rs->stage.draw = nv50->draw; - rs->stage.destroy = nv50_render_destroy; - rs->stage.point = nv50_render_point; - rs->stage.line = nv50_render_line; - rs->stage.tri = nv50_render_tri; - rs->stage.flush = nv50_render_flush; - rs->stage.reset_stipple_counter = nv50_render_reset_stipple_counter; - - return &rs->stage; -} diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c index 5928c994c5d..50c2058efca 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c @@ -23,10 +23,6 @@ #include "pipe/p_defines.h" #include "util/u_framebuffer.h" -#ifdef NVC0_WITH_DRAW_MODULE -#include "draw/draw_context.h" -#endif - #include "nvc0/nvc0_context.h" #include "nvc0/nvc0_screen.h" #include "nvc0/nvc0_resource.h" @@ -154,10 +150,6 @@ nvc0_destroy(struct pipe_context *pipe) nvc0_context_unreference_resources(nvc0); nvc0_blitctx_destroy(nvc0); -#ifdef NVC0_WITH_DRAW_MODULE - draw_destroy(nvc0->draw); -#endif - nouveau_context_destroy(&nvc0->base); } @@ -322,13 +314,6 @@ nvc0_create(struct pipe_screen *pscreen, void *priv) nvc0->base.invalidate_resource_storage = nvc0_invalidate_resource_storage; -#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 - pipe->create_video_codec = nvc0_create_decoder; pipe->create_video_buffer = nvc0_video_buffer_create; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h index 8ae78e9f328..63e73aeaed7 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h @@ -10,10 +10,6 @@ #include "util/u_inlines.h" #include "util/u_dynarray.h" -#ifdef NVC0_WITH_DRAW_MODULE -#include "draw/draw_vertex.h" -#endif - #include "nvc0/nvc0_winsys.h" #include "nvc0/nvc0_stateobj.h" #include "nvc0/nvc0_screen.h" @@ -207,10 +203,6 @@ struct nvc0_context { uint16_t surfaces_valid[2]; struct util_dynarray global_residents; - -#ifdef NVC0_WITH_DRAW_MODULE - struct draw_context *draw; -#endif }; static INLINE struct nvc0_context * diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_draw.c b/src/gallium/drivers/nouveau/nvc0/nvc0_draw.c deleted file mode 100644 index e261d5058fc..00000000000 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_draw.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2008 Ben Skeggs - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "draw/draw_pipe.h" - -#include "nvc0/nvc0_context.h" - -struct nvc0_render_stage { - struct draw_stage stage; - struct nvc0_context *nvc0; -}; - -static INLINE struct nvc0_render_stage * -nvc0_render_stage(struct draw_stage *stage) -{ - return (struct nvc0_render_stage *)stage; -} - -static void -nvc0_render_point(struct draw_stage *stage, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nvc0_render_line(struct draw_stage *stage, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nvc0_render_tri(struct draw_stage *stage, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nvc0_render_flush(struct draw_stage *stage, unsigned flags) -{ -} - -static void -nvc0_render_reset_stipple_counter(struct draw_stage *stage) -{ - NOUVEAU_ERR("\n"); -} - -static void -nvc0_render_destroy(struct draw_stage *stage) -{ - FREE(stage); -} - -struct draw_stage * -nvc0_draw_render_stage(struct nvc0_context *nvc0) -{ - struct nvc0_render_stage *rs = CALLOC_STRUCT(nvc0_render_stage); - - rs->nvc0 = nvc0; - rs->stage.draw = nvc0->draw; - rs->stage.destroy = nvc0_render_destroy; - rs->stage.point = nvc0_render_point; - rs->stage.line = nvc0_render_line; - rs->stage.tri = nvc0_render_tri; - rs->stage.flush = nvc0_render_flush; - rs->stage.reset_stipple_counter = nvc0_render_reset_stipple_counter; - - return &rs->stage; -} -- 2.30.2