gpus_ReturnGuiltyForHardwareRestart

﹥>﹥吖頭↗ 提交于 2019-12-11 03:29:36

问题


I found more details about the bug. it seems related with the information, gpus_ReturnGuiltyForHardwareRestart. after google it, it seems that there is quite limited information about this bug. Have you ever met this before and know how to solve this?


I think it is necessary for me to update what i have found about the crash.

It seems that the crashed described above is not related with subview for that after i disabled all the lines for processing the subview, the crash still happens.

The related code is as follows,

{

    float scissor_x = _xMin;
    float scissor_y = _yMin;
    float scissor_w = _xAdd;
    float scissor_h = _yAdd;
    glEnable(GL_SCISSOR_TEST);
    glScissor(scissor_x, scissor_y, scissor_w, scissor_h);
    computeXY();//process some computation. 

    glDisable(GL_SCISSOR_TEST);
    drawImage();//render the result computed above to the screen.

    _xAdd++;
    _yAdd++;

    _xAdd = (_xAdd > 300) ? 100 : _xAdd;
    _yAdd = (_yAdd > 300) ? 100 : _yAdd;

}

The lines listed above will be called during each frame. I do not know whether there is some requirements for using glscissor(). If the value of _xAdd, _yAdd, is set as invariable, then the program goes successfully. But, if both of them are changed during each frame, the program is sure to crash after a few steps.

I really puzzled about it.

Here is the output of debugger,

(lldb) bt
* thread #1: tid = 0x7262e, 0x337bc94a    libGPUSupportMercury.dylib`gpus_ReturnGuiltyForHardwareRestart + 10, queue = 'com.apple.main-  thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1)
frame #0: 0x337bc94a libGPUSupportMercury.dylib`gpus_ReturnGuiltyForHardwareRestart + 10

回答1:


I have solved this problem. When gl_scissor() is called, you have to make sure the pixel/texel, taking part in following computation own effective values. So, before i use gl_scissor(), i will initialize all the FBO buffers to make are that all the pixels or texels own effective value.

Thx.



来源:https://stackoverflow.com/questions/22877492/gpus-returnguiltyforhardwarerestart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!