[Bf-committers] Backbuff hang with patch.
Robert Wenzlaff
bf-committers@blender.org
Sun, 23 Nov 2003 19:44:08 -0500
--Boundary-00=_YRVw/Q/ITk1nA9c
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
RE: Line 328 rendercore.c:
I think I've figured out what's happening. Whether it should or not, sp is
getting ofs's attributes during the assign. This is why setting sp as
volatile didn'r seem to work on some systems. It was over written when
assigned the value &ofs. I think the value of the pointer gets assigned to a
volatile table at declaration time. Later when sp is assigned, that table
entry is invalid.
I set ofs as volatile and the problem vanished. But if what I think is
happening is happening, then on big endian systems, sp!=&ofs, and the value
is not in the volatile table.
So safe bet is to make ofs and sp volatile.
The patch below does that, please test on various platforms with various
compliers and get back to me. Don't know if it can make it in 2.31 or not,
but maybe we can squeeze it in.
--
**********************************************
Robert Wenzlaff rwenzlaff@soylent-green.com
--Boundary-00=_YRVw/Q/ITk1nA9c
Content-Type: text/x-diff;
charset="us-ascii";
name="BackBuffHang.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="BackBuffHang.diff"
Index: source/blender/render/intern/source/rendercore.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/render/intern/source/rendercore.c,v
retrieving revision 1.17
diff -u -r1.17 rendercore.c
--- source/blender/render/intern/source/rendercore.c 7 Nov 2003 19:23:13 -0000 1.17
+++ source/blender/render/intern/source/rendercore.c 24 Nov 2003 00:40:27 -0000
@@ -236,9 +236,10 @@
* unmangle this shit... */
void (*alphafunc)();
float fac;
- int dx, x, ofs;
+ int dx, x;
+ volatile int ofs;
unsigned int col=0, *rt;
- short *sp;
+ volatile short *sp;
char *cp, *cp1;
float u, v;
--Boundary-00=_YRVw/Q/ITk1nA9c--