Read/Write (UAV) resources
-
namespace d3d
Functions
-
bool set_rwtex(uint32_t shader_stage, uint32_t slot, BaseTexture *tex, uint32_t face, uint32_t mip_level, bool as_uint = false)
Set the read/write (UAV) texture to slot.
- Parameters:
shader_stage – shader stage (VS, PS, CS)
slot – slot index
tex – texture to set as UAV resoruce
face – face index for cubemaps, 3D textures and texture arrays
mip_level – mip level
as_uint – if true then texture will be viewed as uint in UAV. The texture type should be 32-bit format. https://msdn.microsoft.com/en-us/library/windows/desktop/ff728749(v=vs.85).aspx
- Returns:
true if success, false otherwise
-
bool clear_rwtexi(BaseTexture *tex, const uint32_t val[4], uint32_t face, uint32_t mip_level)
Clear UAV texture with integer values.
- Parameters:
tex – texture to clear
val – clear value
face – face index for cubemaps, 3D textures and texture arrays
mip_level – mip level
- Returns:
true if success, false otherwise
-
bool clear_rwtexf(BaseTexture *tex, const float val[4], uint32_t face, uint32_t mip_level)
Clear UAV texture with float values.
- Parameters:
tex – texture to clear
val – clear value
face – face index for cubemaps, 3D textures and texture arrays
mip_level – mip level
- Returns:
true if success, false otherwise
-
bool set_rwtex(uint32_t shader_stage, uint32_t slot, BaseTexture *tex, uint32_t face, uint32_t mip_level, bool as_uint = false)