Go to the documentation of this file.
36 template <
typename BufferViewImplType>
39 if (pViewD3D ==
nullptr)
42 const auto& ViewDesc = pViewD3D->GetDesc();
43 const auto& BuffDesc = pViewD3D->GetBuffer()->GetDesc();
45 auto LogBufferBindingError = [&](
const char* Msg)
48 "' bound to shader variable '", Attribs.
Name,
"' in shader '", ShaderName,
"' is invalid: ", Msg);
54 case D3D_SIT_UAV_RWTYPED:
57 LogBufferBindingError(
"formatted buffer view is expected.");
62 case D3D_SIT_STRUCTURED:
63 case D3D_SIT_UAV_RWSTRUCTURED:
66 LogBufferBindingError(
"structured buffer view is expected.");
71 case D3D_SIT_BYTEADDRESS:
72 case D3D_SIT_UAV_RWBYTEADDRESS:
75 LogBufferBindingError(
"raw buffer view is expected.");
#define LOG_ERROR_MESSAGE(...)
Definition: Errors.hpp:122
bool VerifyBufferViewModeD3D(BufferViewImplType *pViewD3D, const D3DShaderResourceAttribs &Attribs, const char *ShaderName)
Definition: ShaderVariableD3D.hpp:37
@ VT_UNDEFINED
Undefined type.
Definition: GraphicsTypes.h:51
const char *const Name
Definition: ShaderResources.hpp:84
@ BUFFER_MODE_FORMATTED
Formated buffer. Access to the buffer will use format conversion operations. In this mode,...
Definition: Buffer.h:56
D3D_SHADER_INPUT_TYPE GetInputType() const
Definition: ShaderResources.hpp:192
Definition: ShaderResources.hpp:80
@ BUFFER_MODE_STRUCTURED
Structured buffer. In this mode, ElementByteStride member of BufferDesc defines the structure stride.
Definition: Buffer.h:60
@ BUFFER_MODE_RAW
Raw buffer. In this mode, the buffer is accessed as raw bytes. Formatted views of a raw buffer can al...
Definition: Buffer.h:67
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37