Expand description
Helpers for the hlsl backend
Important note about Expression::ImageQuery
/Expression::ArrayLength
and hlsl backend:
Due to implementation of GetDimensions
function in hlsl (https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-to-getdimensions)
backend canβt work with it as an expression.
Instead, it generates a unique wrapped function per Expression::ImageQuery
, based on texture info and query function.
See WrappedImageQuery
struct that represents a unique function and will be generated before writing all statements and expressions.
This allowed to works with Expression::ImageQuery
as expression and write wrapped function.
For example:
let dim_1d = textureDimensions(image_1d);
int NagaDimensions1D(Texture1D<float4>)
{
uint4 ret;
image_1d.GetDimensions(ret.x);
return ret.x;
}
int dim_1d = NagaDimensions1D(image_1d);
Structs§
- Wrapped
Array πLength - Wrapped
Constructor π - Wrapped
Image πQuery - Wrapped
MatCx2 π - Wrapped
Math π - Wrapped
Zero πValue
Enums§
- Image
Query πHLSL backend requires its ownImageQuery
enum.