Run format_all.sh.
This commit is contained in:
parent
3fa6cc8f2c
commit
54a065bb5f
@ -5912,7 +5912,8 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
|
||||
case OpFRem:
|
||||
{
|
||||
if (is_legacy())
|
||||
SPIRV_CROSS_THROW("OpFRem requires trunc() and is only supported on non-legacy targets. A workaround is needed for legacy.");
|
||||
SPIRV_CROSS_THROW("OpFRem requires trunc() and is only supported on non-legacy targets. A workaround is "
|
||||
"needed for legacy.");
|
||||
|
||||
uint32_t result_type = ops[0];
|
||||
uint32_t result_id = ops[1];
|
||||
@ -5921,15 +5922,8 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
|
||||
|
||||
// Needs special handling.
|
||||
bool forward = should_forward(op0) && should_forward(op1);
|
||||
auto expr = join(to_enclosed_expression(op0),
|
||||
" - ",
|
||||
to_enclosed_expression(op1),
|
||||
" * ",
|
||||
"trunc(",
|
||||
to_enclosed_expression(op0),
|
||||
" / ",
|
||||
to_enclosed_expression(op1),
|
||||
")");
|
||||
auto expr = join(to_enclosed_expression(op0), " - ", to_enclosed_expression(op1), " * ", "trunc(",
|
||||
to_enclosed_expression(op0), " / ", to_enclosed_expression(op1), ")");
|
||||
|
||||
emit_op(result_type, result_id, expr, forward);
|
||||
inherit_expression_dependencies(result_id, op0);
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include "GLSL.std.450.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <assert.h>
|
||||
#include <numeric>
|
||||
|
||||
using namespace spv;
|
||||
using namespace spirv_cross;
|
||||
@ -66,8 +66,7 @@ void CompilerMSL::build_implicit_builtins()
|
||||
|
||||
auto &var = id.get<SPIRVariable>();
|
||||
|
||||
if (var.storage == StorageClassInput &&
|
||||
meta[var.self].decoration.builtin &&
|
||||
if (var.storage == StorageClassInput && meta[var.self].decoration.builtin &&
|
||||
meta[var.self].decoration.builtin_type == BuiltInFragCoord)
|
||||
{
|
||||
builtin_frag_coord_id = var.self;
|
||||
|
Loading…
Reference in New Issue
Block a user