diff options
author | George Sapountzis <gsapountzis@gmail.com> | 2010-05-26 01:08:15 +0300 |
---|---|---|
committer | George Sapountzis <gsapountzis@gmail.com> | 2010-07-30 23:43:26 +0300 |
commit | a30b966f8345cb99922a416fce2da6edb70f864c (patch) | |
tree | 4d78fcb19e905b6caefb5854eb530fc701fc70e6 /src/gallium/state_trackers/dri/sw | |
parent | 2e4ad14a525f4028f0e0a93de2f8db785df33fb7 (diff) |
st/dri: drop dri1_helper
Diffstat (limited to 'src/gallium/state_trackers/dri/sw')
-rw-r--r-- | src/gallium/state_trackers/dri/sw/Makefile | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/sw/SConscript | 1 | ||||
l--------- | src/gallium/state_trackers/dri/sw/dri1_helper.c | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/sw/drisw.c | 25 |
4 files changed, 19 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/dri/sw/Makefile b/src/gallium/state_trackers/dri/sw/Makefile index a1dadeba5e..33bc0ed9c9 100644 --- a/src/gallium/state_trackers/dri/sw/Makefile +++ b/src/gallium/state_trackers/dri/sw/Makefile @@ -20,7 +20,6 @@ C_SOURCES = \ dri_context.c \ dri_screen.c \ dri_drawable.c \ - dri1_helper.c \ drisw.c include ../../../Makefile.template diff --git a/src/gallium/state_trackers/dri/sw/SConscript b/src/gallium/state_trackers/dri/sw/SConscript index 0c5194d6ed..d2eb66668e 100644 --- a/src/gallium/state_trackers/dri/sw/SConscript +++ b/src/gallium/state_trackers/dri/sw/SConscript @@ -21,7 +21,6 @@ if env['dri']: source = [ 'dri_context.c', 'dri_drawable.c', 'dri_screen.c', - 'dri1_helper.c', 'drisw.c', ] ) diff --git a/src/gallium/state_trackers/dri/sw/dri1_helper.c b/src/gallium/state_trackers/dri/sw/dri1_helper.c deleted file mode 120000 index c45ebf5c10..0000000000 --- a/src/gallium/state_trackers/dri/sw/dri1_helper.c +++ /dev/null @@ -1 +0,0 @@ -../common/dri1_helper.c
\ No newline at end of file diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c index 9edade9dc9..d2210098d1 100644 --- a/src/gallium/state_trackers/dri/sw/drisw.c +++ b/src/gallium/state_trackers/dri/sw/drisw.c @@ -43,7 +43,6 @@ #include "dri_screen.h" #include "dri_context.h" #include "dri_drawable.h" -#include "dri1_helper.h" DEBUG_GET_ONCE_BOOL_OPTION(swrast_no_present, "SWRAST_NO_PRESENT", FALSE); static boolean swrast_no_present = FALSE; @@ -88,6 +87,24 @@ drisw_put_image(struct dri_drawable *drawable, put_image(dPriv, data, width, height); } +static struct pipe_surface * +drisw_get_pipe_surface(struct dri_drawable *drawable, struct pipe_resource *ptex) +{ + struct pipe_screen *pipe_screen = dri_screen(drawable->sPriv)->base.screen; + struct pipe_surface *psurf = drawable->drisw_surface; + + if (!psurf || psurf->texture != ptex) { + pipe_surface_reference(&drawable->drisw_surface, NULL); + + drawable->drisw_surface = pipe_screen->get_tex_surface(pipe_screen, + ptex, 0, 0, 0, 0/* no bind flag???*/); + + psurf = drawable->drisw_surface; + } + + return psurf; +} + static INLINE void drisw_present_texture(__DRIdrawable *dPriv, struct pipe_resource *ptex) @@ -99,7 +116,7 @@ drisw_present_texture(__DRIdrawable *dPriv, if (swrast_no_present) return; - psurf = dri1_get_pipe_surface(drawable, ptex); + psurf = drisw_get_pipe_surface(drawable, ptex); if (!psurf) return; @@ -174,10 +191,6 @@ drisw_flush_frontbuffer(struct dri_drawable *drawable, * During fixed-size operation, the function keeps allocating new attachments * as they are requested. Unused attachments are not removed, not until the * framebuffer is resized or destroyed. - * - * It should be possible for DRI1 and DRISW to share this function, but it - * seems a better seperation and safer for each DRI version to provide its own - * function. */ static void drisw_allocate_textures(struct dri_drawable *drawable, |