[Bf-committers] ati slow swap buffer perfomance
john tuffen
john at namke.com
Thu Sep 9 23:21:07 CEST 2004
Ok, this is what I've dug out... the patches are (obviously) against old file
versions...
interface.c 1.119
interface_draw.c 1.15
(actually, those are just diffs... I have a feeling they might not work as
patches? Anyway, it doesn't matter really, the code seems to have changed a
fair bit)
I had a vague feeling that I'd changed three files, but I can only find these
two that are different.
Anyway, it's currently too late in the evening for me to start anything
meanigful with them - I'd love to try and move this on (in collaboration with
someone who knows the UI code a bit better!) - but not right now ;-)
john..
--
Quoting Tom Musgrove <tommusgrove__ at hotmail.com>:
> In April and in June there was discussion regarding fixing the slow drawing
> of menus for ATI cards..
>
> Specifically John Tuffen had mentioned his personal progress in April, and
> Ton had mentioned a discussion with Daniel on potential solutions.
>
> http://www.blender.org/pipermail/bf-committers/2004-April/005784.html
> http://www.blender.org/pipermail/bf-committers/2004-April/005791.html
>
> http://www.blender.org/pipermail/bf-committers/2004-June/006450.html
>
> Is there still a plan to fix this issue?
>
> If not, if John is still around could I see your patch?
>
> Thanks,
>
> Tom M.
> LetterRip
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
-------------- next part --------------
cvs -z3 diff -r 1.119 interface.c (in directory E:\cygwin\home\admin\bf-blender\blender\source\blender\src)
Index: interface.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/interface.c,v
retrieving revision 1.119
diff -r1.119 interface.c
37c37,39
<
---
> int swap_req = 0;
>
> #define DISPLAYBUT() { myswapbuffers(); swap_req = 0;}
245,252d246
< /* tinsy bit larger, 1 pixel on the edge */
<
< glReadBuffer(GL_FRONT);
< glDrawBuffer(GL_FRONT);
<
< /* for geforce and other cards */
< glFinish();
<
266,273d259
<
< /* for geforce and other cards */
<
< glReadBuffer(GL_FRONT);
< glDrawBuffer(GL_FRONT);
<
< glFinish();
<
277,278c263
< glReadBuffer(GL_BACK);
< glDrawBuffer(GL_BACK);
---
> DISPLAYBUT(); /* Display the original panel again */
282d266
<
598,605d581
<
< if(but->block->frontbuf==UI_NEED_DRAW_FRONT) {
< but->block->frontbuf= UI_HAS_DRAW_FRONT;
<
< glDrawBuffer(GL_FRONT);
< if(but->win==curarea->headwin) curarea->head_swap= WIN_FRONT_OK;
< else curarea->win_swap= WIN_FRONT_OK;
< }
614a591
> swap_req = 1;
641c618
<
---
> // printf("uiDrawBlock %s\n",block->name);
648c625
<
---
>
827c804,805
< ui_draw_but(but);
---
> printf("BEEP\n");
> ui_draw_but(but); /* draws highlighted 'menu item' button */
926a905
> printf("about to do uiDoBlocks\n");
928c907,908
<
---
> printf("done uiDoBlocks\n");
>
1032c1012,1013
< glFinish(); // flush display in subloops
---
>
> DISPLAYBUT();
1181c1162
< glFinish(); // flush display in subloops
---
> DISPLAYBUT();
1277c1258
< glFinish(); // flush display in subloops
---
> DISPLAYBUT();
1359c1340
< glFinish(); // flush display before subloop
---
> DISPLAYBUT();
1417,1418d1397
< glFinish(); // flush display in subloops
<
1441d1419
< glFinish(); // flush display in subloops
1446a1425,1429
>
> if (swap_req) {
> DISPLAYBUT();
> }
>
1449c1432
<
---
>
1476d1458
< glFinish(); // flush display in subloops
1705c1687,1689
< glFinish(); // flush display in subloops
---
> if (swap_req) {
> DISPLAYBUT();
> }
1757d1740
< glFinish(); // flush display in subloops
2160c2143
< glFinish();
---
> DISPLAYBUT();
2865,2866c2848
< if(mywinget()==G.curscreen->mainwin);
< else {
---
> if(mywinget() != G.curscreen->mainwin) {
2913c2895
< glFinish(); /* to show it in the frontbuffer */
---
> DISPLAYBUT(); /* to show it in the frontbuffer */
2941c2923,2925
<
---
>
> #if 0
> myswapbuffers();
2961a2946
> #endif
2990,2996d2974
< /* this is a caching mechanism, to prevent too many calls to glFrontBuffer and glFinish, which slows down interface */
< block= lb->first;
< while(block) {
< block->frontbuf= UI_NEED_DRAW_FRONT; // signal
< block= block->next;
< }
<
3012d2989
< block->frontbuf= UI_HAS_DRAW_FRONT;
3013a2991
> printf("xxx\n");
3014a2993
> printf("XXX\n");
3021,3030d2999
< /* now a new block could be created for menus, this is
< inserted in the beginning of a list */
<
< /* is there a glfinish cached? */
< if(block->frontbuf == UI_HAS_DRAW_FRONT) {
< glFinish();
< glDrawBuffer(GL_BACK);
< block->frontbuf= UI_NEED_DRAW_FRONT;
< }
<
3037c3006,3009
<
---
> if (swap_req) {
> DISPLAYBUT();
> }
>
3050d3021
< block->frontbuf= UI_HAS_DRAW_FRONT;
3051a3023
> printf("yyy\n");
3057,3059c3029,3030
< if(block->frontbuf == UI_HAS_DRAW_FRONT) {
< glFinish();
< block->frontbuf= UI_NEED_DRAW_FRONT;
---
> if (swap_req) {
> DISPLAYBUT();
3061d3031
<
3070a3041
> DISPLAYBUT();
3078a3050
> DISPLAYBUT();
3093,3100d3064
< }
<
< /* cleanup frontbuffer & flags */
< block= lb->first;
< while(block) {
< if(block->frontbuf==UI_HAS_DRAW_FRONT) glFinish();
< block->frontbuf= 0;
< block= block->next;
-------------- next part --------------
cvs -z3 diff -r 1.15 interface_draw.c (in directory E:\cygwin\home\admin\bf-blender\blender\source\blender\src)
Index: interface_draw.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/interface_draw.c,v
retrieving revision 1.15
diff -r1.15 interface_draw.c
1301c1301
<
---
>
1347d1346
<
1533a1533
> extern int swap_req;
1542,1547c1542,1545
< if(but->block->frontbuf==UI_NEED_DRAW_FRONT) {
< but->block->frontbuf= UI_HAS_DRAW_FRONT;
<
< glDrawBuffer(GL_FRONT);
< if(but->win==curarea->headwin) curarea->head_swap= WIN_FRONT_OK;
< else curarea->win_swap= WIN_FRONT_OK;
---
> if(but->win==curarea->headwin) {
> curarea->head_swap= WIN_BACK_OK;
> } else {
> curarea->win_swap= WIN_BACK_OK;
1549d1546
<
1585d1581
<
1586a1583
> swap_req = 1;
More information about the Bf-committers
mailing list