gpus_ReturnGuiltyForHardwareRestart [英] gpus_ReturnGuiltyForHardwareRestart

查看:70
本文介绍了gpus_ReturnGuiltyForHardwareRestart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了有关该错误的更多详细信息.它似乎与 gpus_ReturnGuiltyForHardwareRestart 信息有关.在谷歌之后,似乎关于这个错误的信息非常有限.您以前遇到过这种情况并知道如何解决吗?

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.

相关代码如下,

{

    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;

}

上面列出的行将在每一帧期间调用.不知道使用glscissor()有没有什么要求.如果_xAdd、_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.

我真的很困惑.

这是调试器的输出,

(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

推荐答案

我已经解决了这个问题.当 gl_scissor() 被调用时,您必须确保像素/纹素,参与以下计算自己的有效值.因此,在使用 gl_scissor() 之前,我将初始化所有 FBO 缓冲区,以使所有像素或纹素都具有有效值.

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.

谢谢.

这篇关于gpus_ReturnGuiltyForHardwareRestart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆