• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About xhcao

  • Rank

Personal Information

  • Interests
  1. Before using void glBindImageTexture( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format), does need to make sure that texture is completeness.
  2. Sorry, I did not understand you clearly. What is the same space? What is the meaning that the registers are shared between descriptors. I need to implement two HLSL RWTexture2D binding to the same resource on D3D11. Is it possible? In my opinion, if separate registers on D3D11, the two RWTexture2D variable must be bound to different resource.
  3. In Direct3D 11, Could I define two RWTexture2D resource variables which share the same register in pixel shader as below, RWTexture2D<float4> tex1 : register(u0); RWTexture2D<float4> tex2 : register(u0); Compile error: error X4500: overlapping register semantics not yet implemented 'u0' It seems that it is illegal to define as above. The reason to define as above is that I want to these two resource variable bind the same texture. I try to create two different unodered access views, and their resources are the same texture. But Two UAVs conflict if they share a subresource (and therefore share the same resource), reference to https://msdn.microsoft.com/en-us/library/windows/desktop/ff476465(v=vs.85).aspx
  4. Thank you. As we all known, unordered access views(UAVs) are available on all shader stages, and the UAVs that are shared across all pipeline stages. For example, a UAV that is bound at slot 0 at the output-merger stage is available at slot 0 to VS/HS/DS/GS/PS. If a RWTexture2D variable are declared the same in vertex shader and pixel shader. Does the compiler ensure to assigned the same slot for the two variables? The vertex shader and pixel shader all declare a variable as below, RWTexture2D<float4> texture; In OpenGL, if two uniform exist in vertex shader and pixel shader respectively, with the same name, they are bound the the same binding value. Does d3d11 is like it?
  5. Thank you for your reply. I have another question, for D3D11, if I declare a RWTexture2D variable without specifying the register in compute shader, for example RWTexture2D<float4> texture; when I call void CSSetUnorderedAccessViews( [in] UINT StartSlot, [in] UINT NumUAVs, [in, optional] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, [in, optional] const UINT *pUAVInitialCounts ); How I know the “StartSlot” for HLSL texture variable. Does it has a default slot for non-register variable, like zero?
  6. Hi, I am newer of Direct3D 11, and I want to get help from you. In Direct3D samples, we usually define RWTexture2D variables globally, and use it in functions directly. Is it legal to transfer this variable as a parameter of a user-defined function? RWTexture2D<float4> texture : regiters(u0); void setData(RWTexture2D<float4> tex, float2 data) { tex[uint2(0, 0)] = data; } PS_OUTPUT main(PS_INPUT input) { setData(texture, float2(0.0, 0.0)); PS_OUTPUT output; return output; }