@@ -2141,7 +2141,6 @@ bool CoreChecks::ValidateDrawDepthStencilAttachments(const LastBound &last_bound
2141
2141
2142
2142
bool CoreChecks::ValidateDrawTessellation (const LastBound &last_bound_state, const vvl::DrawDispatchVuid &vuid) const {
2143
2143
bool skip = false ;
2144
- // Already validation to ensure there is both a Control and Eval
2145
2144
if ((last_bound_state.GetAllActiveBoundStages () & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) == 0 ) {
2146
2145
return skip;
2147
2146
}
@@ -2150,7 +2149,7 @@ bool CoreChecks::ValidateDrawTessellation(const LastBound &last_bound_state, con
2150
2149
const spirv::ExecutionModeSet *tese_execution_mode = nullptr ;
2151
2150
2152
2151
if (last_bound_state.pipeline_state ) {
2153
- for (auto &stage_state : last_bound_state.pipeline_state ->stage_states ) {
2152
+ for (const auto &stage_state : last_bound_state.pipeline_state ->stage_states ) {
2154
2153
const VkShaderStageFlagBits stage = stage_state.GetStage ();
2155
2154
if (stage & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) {
2156
2155
if (stage_state.entrypoint ) {
@@ -2173,12 +2172,15 @@ bool CoreChecks::ValidateDrawTessellation(const LastBound &last_bound_state, con
2173
2172
}
2174
2173
}
2175
2174
2176
- ASSERT_AND_RETURN_SKIP (tesc_execution_mode && tese_execution_mode);
2175
+ if (!tesc_execution_mode || !tese_execution_mode) {
2176
+ return skip; // Occurs if using binary shader object
2177
+ }
2177
2178
2178
2179
// VUID being added in https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/7694
2179
2180
const uint32_t tesc_subdivision = tesc_execution_mode->GetTessellationSubdivision ();
2180
2181
const uint32_t tese_subdivision = tese_execution_mode->GetTessellationSubdivision ();
2181
- if (tesc_subdivision != 0 && tese_subdivision != 0 && tesc_subdivision != tese_subdivision) {
2182
+ if (tesc_subdivision != spirv::kInvalidValue && tese_subdivision != spirv::kInvalidValue &&
2183
+ tesc_subdivision != tese_subdivision) {
2182
2184
skip |= LogError (" UNASSIGNED-vkCmdDraw-tessellation-subdivision" ,
2183
2185
last_bound_state.cb_state .GetObjectList (VK_PIPELINE_BIND_POINT_GRAPHICS), vuid.loc (),
2184
2186
" The subdivision specified in tessellation control shader (%s) does not match the subdivision in "
@@ -2188,7 +2190,8 @@ bool CoreChecks::ValidateDrawTessellation(const LastBound &last_bound_state, con
2188
2190
2189
2191
const uint32_t tesc_orientation = tesc_execution_mode->GetTessellationOrientation ();
2190
2192
const uint32_t tese_orientation = tese_execution_mode->GetTessellationOrientation ();
2191
- if (tesc_orientation != 0 && tese_orientation != 0 && tesc_orientation != tese_orientation) {
2193
+ if (tesc_orientation != spirv::kInvalidValue && tese_orientation != spirv::kInvalidValue &&
2194
+ tesc_orientation != tese_orientation) {
2192
2195
skip |= LogError (" UNASSIGNED-vkCmdDraw-tessellation-orientation" ,
2193
2196
last_bound_state.cb_state .GetObjectList (VK_PIPELINE_BIND_POINT_GRAPHICS), vuid.loc (),
2194
2197
" The orientation specified in tessellation control shader (%s) does not match the orientation in "
@@ -2198,7 +2201,7 @@ bool CoreChecks::ValidateDrawTessellation(const LastBound &last_bound_state, con
2198
2201
2199
2202
const uint32_t tesc_spacing = tesc_execution_mode->GetTessellationSpacing ();
2200
2203
const uint32_t tese_spacing = tese_execution_mode->GetTessellationSpacing ();
2201
- if (tesc_spacing != 0 && tese_spacing != 0 && tesc_spacing != tese_spacing) {
2204
+ if (tesc_spacing != spirv:: kInvalidValue && tese_spacing != spirv:: kInvalidValue && tesc_spacing != tese_spacing) {
2202
2205
skip |= LogError (" UNASSIGNED-vkCmdDraw-tessellation-spacing" ,
2203
2206
last_bound_state.cb_state .GetObjectList (VK_PIPELINE_BIND_POINT_GRAPHICS), vuid.loc (),
2204
2207
" The spacing specified in tessellation control shader (%s) does not match the spacing in "
0 commit comments