iphone - glScissor(0,0,0,0) hard-crashes Apple iOS devices -
according opengl docs, it's legal:
http://www.opengl.org/sdk/docs/man/xhtml/glscissor.xml
"and glscissor(0,0,0,0) doesn't allow modification of pixels in window."
...but when on ios 6, triggers dreaded "powervr sgx chip crashed":
gpus_returnguiltyforhardwarerestart ()
on ios 5.x, had no crash (updated: discovered when moving 5 6 changed animation counter start @ 0 rather one, it's possible had same crash on ios 5) - whether that's because ios 6 bug, or because ios 6 changes timing of code, can't tell. in ios 5 never submitted 0,0,0,0, instead submitted 0,0,0,1 first call (the scissor being animated frame frame).
update: height can zero, powervr crashes if width 0.
x, y, (width==0)? 1 : width, height -- never crashes x, y, width, (height==0 ? 1 : height -- crashes whenever width==0
nb: i've checked, asserted, , used logging prove width , height never less 0 (that first thought!)
more info, possibly related (apparently causes problem in previous apple opengl drivers):
i'm using multiple fbos, , each frame do:
- glbindframebuffer( gl_framebuffer, framebuffer1.glname );
- (render texture 1)
- glbindframebuffer( gl_framebuffer, framebuffer2.glname );
- (render texture 2)
- glbindframebuffer( gl_framebuffer, framebuffer3.glname );
- (read texture 2, render texture 3)
- [((glkview*)self.view) binddrawable];
- (render texture 1 screen)
- [((glkview*)self.view) binddrawable];
- glscissor( 0, 0, width, height ) // width , height increase each frame
- (render texture 3 screen)
i tried , seems work expected me.
glenable(gl_scissor_test); glscissor(0, 0, 0, 0);
... results in no rendering @ on ios 6.1.4 on iphone 5. using non-zero size renders expected, too.
the crash might connected setup differs mine. i'm rendering glkview
. if need more info, let me know. try on ios 7 device, example.
Comments
Post a Comment