如何调试 DirectX 11 计算着色器?

发布于 2024-08-15 08:39:42 字数 346 浏览 4 评论 0原文

我开始使用 DirectX 11 Compute Shader 技术进行 GP-GPU 编程。我在 HLSL 上编写了一个相当复杂的程序,当我想调试它时,我意识到 DX SDK August 2009 中的 PIX 实用程序不支持计算着色器...我知道 Nvidia 将要发布Nexus for Visual Studio,它将支持直接计算调试,但仅限于尚未发布的下一代 NVidia GPU :( 由于设备独立性,计算着色器技术在我看来非常有前途,但它如果没有调试支持,将很难使用。

您知道现在可用或计划在不久的将来发布的可用于计算着色器调试的工具或方法吗?

I've started using DirectX 11 Compute Shader technology for GP-GPU programming. I had written quite a complex program on HLSL and when I wanted to debug it, I realized that PIX utility from DX SDK August 2009 does not support Compute Shaders... I know that Nvidia is going to release Nexus for Visual Studio, which will support Direct Compute debugging, but only on next generation of NVidia GPUs which are not released yet :( Compute Shader technology looks very promising to me, because of device independence, but it would be very hard to use without debugging support.

Do you know any tools or approaches, which can be used for Compute Shader debugging, available now or planned for release in the near future?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

黯淡〆 2024-08-22 08:39:42

我正在等待 NVIDIA Nexus 广泛使用。也许微软可以想出一些与参考光栅器配合使用的东西,但我想说重要的是与硬件紧密集成:在这种情况下,只有供应商才能提供必要的工具。

有人可能知道 AMD 是否计划在 GPU PerfStudio 中添加对计算着色器的支持。

I am waiting for NVIDIA Nexus to become widely available. Maybe Microsoft could come up with something that works with the reference rasterizer but I would say what's important is to get tight integration with the hardware: in such a case, only vendors could provide the necessary tools.

Someone might know whether AMD plans to add support for compute shaders in GPU PerfStudio.

热风软妹 2024-08-22 08:39:42

开发和调试复杂 HLSL 计算着色器的有效方法是将其编译为 C++。一旦实现了这一点,您就可以利用通常与 C++ 一起使用的 IDE 调试功能,例如内存和变量查找等。下面是一个概念验证演示项目,展示了如何调试示例 DirectX HLSL 计算着色器:

https://github.com/cezbloch/shaderator

一旦您的代码正常工作并正确,您就可以在 GPU - C++ 上执行它版本仅用于帮助开发。

An efficient way to develop and debug complex HLSL Compute Shader is to compile it to C++. Once you have achieved that you can leverage your IDE debugging features that you normally use with C++ like memory and variable look-up etc. Below is a proof of concept demo project showing how to debug a sample DirectX HLSL Compute Shader:

https://github.com/cezbloch/shaderator

Once your code is working and correct you execute it on GPU - the C++ verion is only meant to help with development.

梦行七里 2024-08-22 08:39:42

抱歉,目前这个问题还没有简单的答案。

也许尝试注册 NVIDIA Nexus beta 计划:
http://supportcenteronline.com/ics/support/default.asp?deptID= 4639

您在哪里读到 Nexus 需要基于 Fermi 的 GPU?我认为要求是具有 SLI 功能的工作站,配备 2 个最新的 NVIDIA GPU,或 2 个基于 NVIDIA 的工作站(然后远程调试目标)。

Sorry but there's no trivial answer to that question for the moment.

Maybe try to enrolled in NVIDIA Nexus beta program:
http://supportcenteronline.com/ics/support/default.asp?deptID=4639

Where did you read Nexus need a Fermi-based GPU? I thought that the requirements where a SLI capable workstation with 2 recents NVIDIA GPUs, or 2 NVIDIA-based workstations (and then debugging the target remotely).

恏ㄋ傷疤忘ㄋ疼 2024-08-22 08:39:42

不幸的是,调试计算着色器非常类似于过去调试顶点和像素着色器......我发现的最好方法是执行小的更改并将测试值输出到临时纹理资源。然后,您可以将纹理资源渲染到应用程序的屏幕上(甚至保存到文件中),并使用它来提取有关着色器中发生的情况的信息。

这确实是一个可怕的情况,但这就是现在的工具情况......

Unfortunately, debugging compute shaders is very much like debugging vertex and pixel shaders used to be... The best way that I have found is to perform small changes and output test values to a temporary texture resource. Then you can render the texture resource to the screen of your application (or even saved to file), and use that to extract info about what is going on in shader.

It is really a terrible situation, but that is how the tooling situation is right now...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文