From 08cbddf06398d69f72af3629f61d95efb48ceff1 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 21 Jun 2017 22:20:00 +0100 Subject: [PATCH] Fix clang-format problems that were included * My git hook got silently broken :(. --- qrenderdoc/Code/Interface/CommonPipelineState.cpp | 2 +- renderdoc/driver/shaders/spirv/spirv_disassemble.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/qrenderdoc/Code/Interface/CommonPipelineState.cpp b/qrenderdoc/Code/Interface/CommonPipelineState.cpp index f69e0fce5..96d11c34a 100644 --- a/qrenderdoc/Code/Interface/CommonPipelineState.cpp +++ b/qrenderdoc/Code/Interface/CommonPipelineState.cpp @@ -1318,7 +1318,7 @@ QVector CommonPipelineState::GetOutputTargets() int idx = 0; - ret.resize(rp.colorAttachments.count+rp.resolveAttachments.count); + ret.resize(rp.colorAttachments.count + rp.resolveAttachments.count); for(int i = 0; i < rp.colorAttachments.count; i++) { if(rp.colorAttachments[i] < (uint32_t)fb.attachments.count) diff --git a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp index 85817f13c..4d1c4c923 100644 --- a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp @@ -1256,7 +1256,8 @@ struct SPVInstruction if(arg0type->type == SPVTypeData::ePointer) arg0type = arg0type->baseType; - bool accessChain = (opcode == spv::OpAccessChain || opcode == spv::OpInBoundsAccessChain || opcode == spv::OpVectorExtractDynamic); + bool accessChain = (opcode == spv::OpAccessChain || opcode == spv::OpInBoundsAccessChain || + opcode == spv::OpVectorExtractDynamic); size_t start = (accessChain ? 1 : 0); size_t count = (accessChain ? op->arguments.size() : op->literals.size()); @@ -2434,7 +2435,8 @@ string SPVModule::Disassemble(const string &entryPoint) instr->op->complexity = maxcomplex; if(instr->opcode != spv::OpStore && instr->opcode != spv::OpLoad && - instr->opcode != spv::OpCompositeExtract && instr->opcode != spv::OpVectorExtractDynamic && instr->op->inlineArgs) + instr->opcode != spv::OpCompositeExtract && + instr->opcode != spv::OpVectorExtractDynamic && instr->op->inlineArgs) instr->op->complexity++; // we try to merge away temp variables that are only used for a single store then a single @@ -2827,8 +2829,7 @@ string SPVModule::Disassemble(const string &entryPoint) // the extract elsewhere for(size_t o = 0; o < funcops.size();) { - if(funcops[o]->opcode == spv::OpCompositeExtract && - funcops[o]->op->arguments[0]->op && + if(funcops[o]->opcode == spv::OpCompositeExtract && funcops[o]->op->arguments[0]->op && funcops[o]->op->arguments[0]->op->type->type == SPVTypeData::eVector) { // count how many times this extract is used in constructing a vector