| 113 | } |
| 114 | |
| 115 | bool 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 | |
| 138 | bool HLSLShader::IsValid(Data const& goal, TextureBuffer* resource) const |
| 139 | { |
no test coverage detected