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
Binary 🔒Op - Wrapped
Cast 🔒 - Wrapped
Constructor 🔒 - Wrapped
Image 🔒Load - Wrapped
Image 🔒Query - Wrapped
Image 🔒Sample - Wrapped
MatCx2 🔒 - Wrapped
Math 🔒 - Wrapped
Struct 🔒Matrix Access - Wrapped
Unary 🔒Op - Wrapped
Zero 🔒Value
Enums§
- Image
Query 🔒 - HLSL backend requires its own
ImageQuery
enum.