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 zero_rwbufi(Sbuffer *buf)

Zero out UAV buffer as uint. Distinction between types is needed for DX.

Parameters:

buf – buffer to clear

Returns:

true if success, false otherwise