diff --git a/DEPS b/DEPS index 866f98e91a..7ba5521ae0 100644 --- a/DEPS +++ b/DEPS @@ -13,7 +13,7 @@ vars = { 'protobuf_revision': 'v21.12', 're2_revision': '264e71e88e1c8a4b5ec326e70e9cf1d476f58a58', - 'spirv_headers_revision': '7b0309708da5126b89e4ce6f19835f36dc912f2f', + 'spirv_headers_revision': 'ae6a8b39717523d96683bc0d20b541944e28072f', } deps = { diff --git a/source/opt/modify_maximal_reconvergence.cpp b/source/opt/modify_maximal_reconvergence.cpp index d21c37c159..dd79b6283f 100644 --- a/source/opt/modify_maximal_reconvergence.cpp +++ b/source/opt/modify_maximal_reconvergence.cpp @@ -22,7 +22,7 @@ namespace opt { Pass::Status ModifyMaximalReconvergence::Process() { bool changed = false; - if (_add) { + if (add_) { changed = AddMaximalReconvergence(); } else { changed = RemoveMaximalReconvergence(); diff --git a/source/opt/modify_maximal_reconvergence.h b/source/opt/modify_maximal_reconvergence.h index 94acf58534..8d9a698e9e 100644 --- a/source/opt/modify_maximal_reconvergence.h +++ b/source/opt/modify_maximal_reconvergence.h @@ -31,7 +31,7 @@ class ModifyMaximalReconvergence : public Pass { const char* name() const override { return "modify-maximal-reconvergence"; } Status Process() override; - explicit ModifyMaximalReconvergence(bool add = true) : Pass(), _add(add) {} + explicit ModifyMaximalReconvergence(bool add = true) : Pass(), add_(add) {} IRContext::Analysis GetPreservedAnalyses() override { return IRContext::kAnalysisDefUse | @@ -45,7 +45,7 @@ class ModifyMaximalReconvergence : public Pass { bool AddMaximalReconvergence(); bool RemoveMaximalReconvergence(); - bool _add; + bool add_; }; } // namespace opt } // namespace spvtools diff --git a/source/val/validate_cfg.cpp b/source/val/validate_cfg.cpp index 6c3d7af80a..9b7161fc44 100644 --- a/source/val/validate_cfg.cpp +++ b/source/val/validate_cfg.cpp @@ -878,12 +878,14 @@ spv_result_t StructuredControlFlowChecks( } spv_result_t MaximalReconvergenceChecks(ValidationState_t& _) { - // Find all the entry points with the MaximallReconvergencesKHR execution mode. + // Find all the entry points with the MaximallyReconvergencesKHR execution + // mode. std::unordered_set maximal_funcs; std::unordered_set maximal_entry_points; for (auto entry_point : _.entry_points()) { const auto* exec_modes = _.GetExecutionModes(entry_point); - if (exec_modes && exec_modes->count(spv::ExecutionMode::MaximallyReconvergesKHR)) { + if (exec_modes && + exec_modes->count(spv::ExecutionMode::MaximallyReconvergesKHR)) { maximal_entry_points.insert(entry_point); maximal_funcs.insert(entry_point); } @@ -920,9 +922,8 @@ spv_result_t MaximalReconvergenceChecks(ValidationState_t& _) { // Check for invalid multiple predecessors. Only loop headers, continue // targets, merge targets or switch targets or defaults may have multiple // unique predecessors. - for (const auto &func : _.functions()) { - if (!maximal_funcs.count(func.id())) - continue; + for (const auto& func : _.functions()) { + if (!maximal_funcs.count(func.id())) continue; for (const auto* block : func.ordered_blocks()) { std::unordered_set unique_preds; @@ -934,14 +935,12 @@ spv_result_t MaximalReconvergenceChecks(ValidationState_t& _) { } if (unique_preds.size() < 2) continue; - - const auto *terminator = block->terminator(); + const auto* terminator = block->terminator(); const auto index = terminator - &_.ordered_instructions()[0]; - const auto *pre_terminator = &_.ordered_instructions()[index - 1]; - if (pre_terminator->opcode() == spv::Op::OpLoopMerge) - continue; + const auto* pre_terminator = &_.ordered_instructions()[index - 1]; + if (pre_terminator->opcode() == spv::Op::OpLoopMerge) continue; - const auto *label = _.FindDef(block->id()); + const auto* label = _.FindDef(block->id()); bool ok = false; for (const auto& pair : label->uses()) { const auto* use_inst = pair.first; diff --git a/test/operand_capabilities_test.cpp b/test/operand_capabilities_test.cpp index 4872228170..aac910d938 100644 --- a/test/operand_capabilities_test.cpp +++ b/test/operand_capabilities_test.cpp @@ -486,7 +486,7 @@ INSTANTIATE_TEST_SUITE_P( CASE1(DECORATION, Decoration::XfbBuffer, TransformFeedback), CASE1(DECORATION, Decoration::XfbStride, TransformFeedback), CASE1(DECORATION, Decoration::FuncParamAttr, Kernel), - CASE1(DECORATION, Decoration::FPFastMathMode, Kernel), + CASE2(DECORATION, Decoration::FPFastMathMode, Kernel, FloatControls2), CASE1(DECORATION, Decoration::LinkageAttributes, Linkage), CASE1(DECORATION, Decoration::NoContraction, Shader), CASE1(DECORATION, Decoration::InputAttachmentIndex,