Jump to content

  • Log In with Google      Sign In   
  • Create Account

ankan_ban

Member Since 08 Aug 2010
Offline Last Active Jan 27 2016 11:46 AM

Posts I've Made

In Topic: D3d12 : d24_x8 format to rgba8?

27 January 2016 - 08:17 AM

I think the correct way to access depth-stencil surface as texture (SRV) is to

 

1. create the resource as:

DXGI_FORMAT_R24G8_TYPELESS     

 

2. create depth stencil surface as:

DXGI_FORMAT_D24_UNORM_S8_UINT

 

3. Create *two* separate SRVs for accessing depth and stencil parts of the surface of formats:

DXGI_FORMAT_R24_UNORM_X8_TYPELESS

DXGI_FORMAT_X24_TYPELESS_G8_UINT

 

You can only access depth from the first SRV (by reading red/x component of the texture as normalized float value) and only access stencil component from the second SRV (reading as unsigned integer).

 

This should work on all IHVs.


In Topic: C++ Graphics help.

01 January 2013 - 10:34 PM

Once you are comfortable with drawing pixels using openGL, you may also try cuda-opengl interop feature. This allows openGL to directly access texture from GPU device memory without needing to copy it to CPU memory. This tutorial could be helpful:

http://3dgep.com/?p=2082


PARTNERS