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:
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 clear_rwbufi(Sbuffer *buf, const uint32_t val[4])

Clear UAV buffer with integer values.

4 components are required by DirectX API, so the buffer will be cleared with the same 4 dwords pattern.

Parameters:
  • buf – buffer to clear

  • val – clear value

Returns:

true if success, false otherwise

bool clear_rwbuff(Sbuffer *buf, const float val[4])

Clear UAV buffer with float values.

4 components are required by DirectX API, so the buffer will be cleared with the same 4 dwords pattern.

Parameters:
  • buf – buffer to clear

  • val – clear value

Returns:

true if success, false otherwise