MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / IsValid

Method IsValid

GTE/Graphics/DX11/HLSLShader.cpp:115–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool HLSLShader::IsValid(Data const& goal, ConstantBuffer* resource) const
116{
117 if (!resource)
118 {
119 // resource is null
120 return false;
121 }
122
123 if (goal.type != GT_CONSTANT_BUFFER)
124 {
125 // mismatch of buffer type
126 return false;
127 }
128
129 if (resource->GetNumBytes() >= static_cast<size_t>(goal.numBytes))
130 {
131 return true;
132 }
133
134 // invalid number of bytes
135 return false;
136}
137
138bool HLSLShader::IsValid(Data const& goal, TextureBuffer* resource) const
139{

Callers 3

CreateFromBytecodeMethod · 0.45
CreateFromNamedSourceMethod · 0.45

Calls 4

GetCounterTypeMethod · 0.80
GetNumBytesMethod · 0.45
GetUsageMethod · 0.45
GetNumDimensionsMethod · 0.45

Tested by

no test coverage detected