textureDesc.BindFlags = D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_SHADER_RESOURCE;
In Compute Shader
RWTexture2D<float4> data;
Afterward I want to bind this texture for Read only (srv, some errors) or Write (uav) or Read/Write (uav)...
If I bind this texture as SRV or UAV and read from it, i got this error:
- typed UAV loads are only allowed for single-component 32-bit element types
- if my code contains for-loop with break: Loop termination conditions in varying flow control cannot depend on data read from a UAV
First one is limitation of DX SDK as i found... co i can do only RWTexture2D<int> if I want to use it as read only (srv).
Second error is mystery Even if I change float4 to int
Thanks