From 59a12c7e7187492d95b903c00ec5b1f63719cc30 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 3 Feb 2018 23:23:30 +0100 Subject: [PATCH] Uniquely name these static functions --- spirv_glsl.cpp | 8 ++++---- spirv_hlsl.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index 10c61b82..8bdc3766 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp @@ -109,7 +109,7 @@ string CompilerGLSL::sanitize_underscores(const string &str) } // Returns true if an arithmetic operation does not change behavior depending on signedness. -static bool opcode_is_sign_invariant(Op opcode) +static bool glsl_opcode_is_sign_invariant(Op opcode) { switch (opcode) { @@ -2402,7 +2402,7 @@ string CompilerGLSL::constant_op_expression(const SPIRConstantOp &cop) } SPIRType::BaseType input_type; - bool skip_cast_if_equal_type = opcode_is_sign_invariant(cop.opcode); + bool skip_cast_if_equal_type = glsl_opcode_is_sign_invariant(cop.opcode); switch (cop.opcode) { @@ -5225,13 +5225,13 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction) #define BOP(op) emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op) #define BOP_CAST(op, type) \ - emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) + emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, glsl_opcode_is_sign_invariant(opcode)) #define UOP(op) emit_unary_op(ops[0], ops[1], ops[2], #op) #define QFOP(op) emit_quaternary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], #op) #define TFOP(op) emit_trinary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], #op) #define BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define BFOP_CAST(op, type) \ - emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) + emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, glsl_opcode_is_sign_invariant(opcode)) #define BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define UFOP(op) emit_unary_func_op(ops[0], ops[1], ops[2], #op) diff --git a/spirv_hlsl.cpp b/spirv_hlsl.cpp index 3f2227cf..9fbcccf6 100644 --- a/spirv_hlsl.cpp +++ b/spirv_hlsl.cpp @@ -204,7 +204,7 @@ static string image_format_to_type(ImageFormat fmt, SPIRType::BaseType basetype) } // Returns true if an arithmetic operation does not change behavior depending on signedness. -static bool opcode_is_sign_invariant(Op opcode) +static bool hlsl_opcode_is_sign_invariant(Op opcode) { switch (opcode) { @@ -3056,13 +3056,13 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) #define BOP(op) emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op) #define BOP_CAST(op, type) \ - emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) + emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, hlsl_opcode_is_sign_invariant(opcode)) #define UOP(op) emit_unary_op(ops[0], ops[1], ops[2], #op) #define QFOP(op) emit_quaternary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], #op) #define TFOP(op) emit_trinary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], #op) #define BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define BFOP_CAST(op, type) \ - emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) + emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, hlsl_opcode_is_sign_invariant(opcode)) #define BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define UFOP(op) emit_unary_func_op(ops[0], ops[1], ops[2], #op)