• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By turanszkij
      Hi,
      I finally managed to get the DX11 emulating Vulkan device working but everything is flipped vertically now because Vulkan has a different clipping space. What are the best practices out there to keep these implementation consistent? I tried using a vertically flipped viewport, and while it works on Nvidia 1050, the Vulkan debug layer is throwing error messages that this is not supported in the spec so it might not work on others. There is also the possibility to flip the clip scpace position Y coordinate before writing out with vertex shader, but that requires changing and recompiling every shader. I could also bake it into the camera projection matrices, though I want to avoid that because then I need to track down for the whole engine where I upload matrices... Any chance of an easy extension or something? If not, I will probably go with changing the vertex shaders.
    • By NikiTo
      Some people say "discard" has not a positive effect on optimization. Other people say it will at least spare the fetches of textures.
       
      if (color.A < 0.1f) { //discard; clip(-1); } // tons of reads of textures following here // and loops too
      Some people say that "discard" will only mask out the output of the pixel shader, while still evaluates all the statements after the "discard" instruction.

      MSN>
      discard: Do not output the result of the current pixel.
      clip: Discards the current pixel..
      <MSN

      As usual it is unclear, but it suggests that "clip" could discard the whole pixel(maybe stopping execution too)

      I think, that at least, because of termal and energy consuming reasons, GPU should not evaluate the statements after "discard", but some people on internet say that GPU computes the statements anyways. What I am more worried about, are the texture fetches after discard/clip.

      (what if after discard, I have an expensive branch decision that makes the approved cheap branch neighbor pixels stall for nothing? this is crazy)
    • By NikiTo
      I have a problem. My shaders are huge, in the meaning that they have lot of code inside. Many of my pixels should be completely discarded. I could use in the very beginning of the shader a comparison and discard, But as far as I understand, discard statement does not save workload at all, as it has to stale until the long huge neighbor shaders complete.
      Initially I wanted to use stencil to discard pixels before the execution flow enters the shader. Even before the GPU distributes/allocates resources for this shader, avoiding stale of pixel shaders execution flow, because initially I assumed that Depth/Stencil discards pixels before the pixel shader, but I see now that it happens inside the very last Output Merger state. It seems extremely inefficient to render that way a little mirror in a scene with big viewport. Why they've put the stencil test in the output merger anyway? Handling of Stencil is so limited compared to other resources. Does people use Stencil functionality at all for games, or they prefer discard/clip?

      Will GPU stale the pixel if I issue a discard in the very beginning of the pixel shader, or GPU will already start using the freed up resources to render another pixel?!?!



       
    • By Axiverse
      I'm wondering when upload buffers are copied into the GPU. Basically I want to pool buffers and want to know when I can reuse and write new data into the buffers.
    • By NikiTo
      AMD forces me to use MipLevels in order to can read from a heap previously used as RTV. Intel's integrated GPU works fine with MipLevels = 1 inside the D3D12_RESOURCE_DESC. For AMD I have to set it to 0(or 2). MSDN says 0 means max levels. With MipLevels = 1, AMD is rendering fine to the RTV, but reading from the RTV it shows the image reordered.

      Is setting MipLevels to something other than 1 going to cost me too much memory or execution time during rendering to RTVs, because I really don't need mipmaps at all(not for the 99% of my app)?

      (I use the same 2D D3D12_RESOURCE_DESC for both the SRV and RTV sharing the same heap. Using 1 for MipLevels in that D3D12_RESOURCE_DESC gives me results like in the photos attached below. Using 0 or 2 makes AMD read fine from the RTV. I wish I could sort this somehow, but in the last two days I've tried almost anything to sort this problem, and this is the only way it works on my machine.)


  • Advertisement
  • Advertisement
Sign in to follow this  

DX12 No way to debug D3D12's HLSL code with Visual Studio 2015

This topic is 713 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using the in-build capture mechanism in VS2015(VC2015 accurately), when I was about to open the UI for shader tracing, it showed "such functionality is not supported for DX12".

 

Is that true? If so, Microsoft doesn't support its flagship API compared to the existing D3D11?

Share this post


Link to post
Share on other sites
Advertisement

 

Is that true? If so, Microsoft doesn't support its flagship API compared to the existing D3D11?

I haven't tried it yet.

You could always try RenderDoc in the meantime. It's better than the MS tools anyway.

 

Thanks. I briefly read through RenderDoc's introduction, it's said to support D3D11 only.

 

BTW, VS2015 actually can debug DX12 shader code if setting the device feature level as 11.

 

Though neither is perfect.

Share this post


Link to post
Share on other sites

I'm using the in-build capture mechanism in VS2015(VC2015 accurately), when I was about to open the UI for shader tracing, it showed "such functionality is not supported for DX12".

 

Is that true? If so, Microsoft doesn't support its flagship API compared to the existing D3D11?

 

D3D12 is young still -- vendors have only within the past handful of months gotten some validated drivers out. Tools always lag behind, but it just takes time. And D3D12 is pretty fundamentally different than 11, not only the API, but the also in the way that you would want to expose the API usage in the Graphics Diagnostics UI. Its a lot of work on their plate.

Edited by Ravyne

Share this post


Link to post
Share on other sites

I can access resource data but I can't do shader debugging like before. Trying to debug a compute works great:

 

http://i.imgur.com/Dw1Xx1K.png

 

Since the data visualizers seem okay that's how I've been working.

Edited by Dingleberry

Share this post


Link to post
Share on other sites

I can access resource data but I can't do shader debugging like before. Trying to debug a compute works great:

 

http://i.imgur.com/Dw1Xx1K.png

 

Since the data visualizers seem okay that's how I've been working.

 

MS demonstrated everything but the shader debugging.

 

 But we can debug on DX12 device feature level 11.

Share this post


Link to post
Share on other sites

 

I'm using the in-build capture mechanism in VS2015(VC2015 accurately), when I was about to open the UI for shader tracing, it showed "such functionality is not supported for DX12".

 

Is that true? If so, Microsoft doesn't support its flagship API compared to the existing D3D11?

 

D3D12 is young still -- vendors have only within the past handful of months gotten some validated drivers out. Tools always lag behind, but it just takes time. And D3D12 is pretty fundamentally different than 11, not only the API, but the also in the way that you would want to expose the API usage in the Graphics Diagnostics UI. Its a lot of work on their plate.

 

Truly it takes time for vendors to follow. But the thing is NVIDIA/AMD has already offered their DX12 drivers but Microsoft the DX12 creator itself hasn't finished its dev tool.

Share this post


Link to post
Share on other sites

Use HIVs debugging tools. On AMD cards GPUPerfstrudio and CodeXL have a pretty nice D3D12 support, intel GPA support is in alpha but better than nothing, while nvidia nsight support isn't that great now..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement