OpenGL Compute Shaders是否有时间边界? [英] Is there a time border for OpenGL Compute Shaders?

查看:100
本文介绍了OpenGL Compute Shaders是否有时间边界?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OpenGL Compute Shaders对数据进行一些计算.一切正常,除了运行一个着色器似乎不可能超过10秒之外. 我用glBeginQuery(...)glEndQuery(...)测量时间.着色器的运行时间在1毫秒至10秒之间.我只是添加了一些数据,而没有任何着色器调用,以增加着色器所需的时间.但是,当着色器需要多于10秒时,我无法添加更多数据.然后,该程序冻结,我无能为力.我测量的最高值为11.02秒.

I am using the OpenGL Compute Shaders to do some calculation on data. Everything works fine except that it does not seem to be possible to run one shader much more than 10 seconds. I measure the time with glBeginQuery(...) and glEndQuery(...). The shader runs between 1 ms and 10 seconds good. I just add some data without any shader invocations to increase the time the shader needs. But I can not add more Data when the shader needs a bit more than 10 seconds. Then, the program freezes and I can not do anything more. The highest value I measured, was 11.02 seconds.

那么,计算着色器是否有时间边界?还是我做错了什么明显的东西?

So, is there a time border for compute shaders? Or is there something obvious which I made wrong?

一些其他信息:我正在使用装有Nvidia GT 555M的笔记本电脑工作.我使用大黄蜂,并使用optirun启动QtCreator以使用Nvidia卡运行它. 如果您需要更多信息来帮助我,请询问.我只是不知道,需要什么来解决它.

Some additional information: I work on a notebook with an Nvidia GT 555M in it. I use bumblebee and start the QtCreator with optirun to run it with the Nvidia card. If you need more information to help me, please, just ask. I just do not know, what is needed to answer it.

推荐答案

听起来您已达到Windows的超时检测和恢复"限制.

It sounds like you're hitting Windows' Timeout Detection and Recovery limit.

通常,此默认设置为2秒,而不是10或11秒,但可能是某人或某人修改了您的注册表.

Usually the default for this is 2 seconds, not 10 or 11, but it's possible something or someone has modified your registry.

此处,然后查看您的注册表项是否已设置好,以便获得10/11秒的TDR.

Take a look here and see whether your registry keys are setup such that you would get a 10/11 second TDR.

如果这是您自己的应用程序,并且只打算在自己的计算机上运行,​​请随时将此限制增加到您喜欢的任何值.但是,如果您打算让其他人运行您的应用程序,那么不要期望其他人修改他们的注册表设置来容纳您的应用程序.

If this is your own app that you only intend to run on your own machine then feel free to increase this limit to whatever you like. However if you intend to have other people run your application then don't expect anyone else to modify their registry settings to accommodate your application.

您应该将Compute工作分解为可管理的工作块,这些工作最多(最多)数十毫秒,而不是数千毫秒.

You should be breaking up your Compute work into manageable chunks of work that take (at most) tens of milliseconds, not thousands.

由于您已经说过您正在使用Linux,因此NVIDIA驱动程序具有

Since you've commented to say that you're using Linux, the NVIDIA driver has an option to override the 'watchdog' timer.

这篇关于OpenGL Compute Shaders是否有时间边界?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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