• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

111 Neutral

About ankan_ban

  • Rank
  1. 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.
  2. C++ Graphics help.

    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
  3. Hi, Is it possible to create an array of similar constant buffers in DX11 and then index them on constant slot number? This is an example what what I want to do (but it doesn't work): cbuffer cIndexableCB [3] { uint4 myIndexableConst[4]; }; // the paramaters below are number of threads in a thread group/CTA in each direction [numthreads(256, 1, 1)] void cs_main( uint3 threadID : SV_DispatchThreadID ) { uint v1 = uav1[threadID.x]; uint multiplier = cIndexableCB[1].myIndexableConst[2].x; uav1[threadID.x] = multiplier*v1; } Thanks
  • Advertisement