RetroArch
Macros | Functions
spirv_glsl.cpp File Reference
#include "spirv_glsl.hpp"
#include "GLSL.std.450.h"
#include "spirv_common.hpp"
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <utility>
Include dependency graph for spirv_glsl.cpp:

Macros

#define GLSL_BOP(opname, x)
 
#define GLSL_UOP(opname, x)
 
#define GLSL_GROUP_OP(op, glsl_op)
 
#define GLSL_BOP(op)   emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op)
 
#define GLSL_BOP_CAST(op, type)   emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, glsl_opcode_is_sign_invariant(opcode))
 
#define GLSL_UOP(op)   emit_unary_op(ops[0], ops[1], ops[2], #op)
 
#define GLSL_QFOP(op)   emit_quaternary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], #op)
 
#define GLSL_TFOP(op)   emit_trinary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], #op)
 
#define GLSL_BFOP(op)   emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op)
 
#define GLSL_BFOP_CAST(op, type)   emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, glsl_opcode_is_sign_invariant(opcode))
 
#define GLSL_BFOP(op)   emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op)
 
#define GLSL_UFOP(op)   emit_unary_func_op(ops[0], ops[1], ops[2], #op)
 

Functions

static bool is_unsigned_opcode (Op op)
 
static bool is_unsigned_glsl_opcode (GLSLstd450 op)
 
static bool packing_is_vec4_padded (BufferPackingStandard packing)
 
static bool packing_is_hlsl (BufferPackingStandard packing)
 
static bool packing_has_flexible_offset (BufferPackingStandard packing)
 
static BufferPackingStandard packing_to_substruct_packing (BufferPackingStandard packing)
 
static bool glsl_opcode_is_sign_invariant (Op opcode)
 
static const char * to_pls_layout (PlsFormat format)
 
static SPIRType::BaseType pls_format_to_basetype (PlsFormat format)
 
static uint32_t pls_format_to_components (PlsFormat format)
 
static const char * vector_swizzle (int vecsize, int index)
 

Macro Definition Documentation

◆ GLSL_BFOP [1/2]

#define GLSL_BFOP (   op)    emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op)

◆ GLSL_BFOP [2/2]

#define GLSL_BFOP (   op)    emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op)

◆ GLSL_BFOP_CAST

#define GLSL_BFOP_CAST (   op,
  type 
)    emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, glsl_opcode_is_sign_invariant(opcode))

◆ GLSL_BOP [1/2]

#define GLSL_BOP (   opname,
  x 
)
Value:
case Op##opname: \
binary = true; \
op = x; \
break
Op
Definition: spirv.hpp:714
GLint GLint GLint GLint GLint x
Definition: glext.h:6295

◆ GLSL_BOP [2/2]

#define GLSL_BOP (   op)    emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op)

◆ GLSL_BOP_CAST

#define GLSL_BOP_CAST (   op,
  type 
)    emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, glsl_opcode_is_sign_invariant(opcode))

◆ GLSL_GROUP_OP

#define GLSL_GROUP_OP (   op,
  glsl_op 
)
Value:
case OpGroupNonUniform##op: \
{ \
auto operation = static_cast<GroupOperation>(ops[3]); \
if (operation == GroupOperationReduce) \
emit_unary_func_op(result_type, id, ops[4], "subgroup" #glsl_op); \
else if (operation == GroupOperationInclusiveScan) \
emit_unary_func_op(result_type, id, ops[4], "subgroupInclusive" #glsl_op); \
else if (operation == GroupOperationExclusiveScan) \
emit_unary_func_op(result_type, id, ops[4], "subgroupExclusive" #glsl_op); \
else if (operation == GroupOperationClusteredReduce) \
emit_binary_func_op(result_type, id, ops[4], ops[5], "subgroupClustered" #glsl_op); \
SPIRV_CROSS_THROW("Invalid group operation."); \
break; \
}
Definition: spirv.hpp:572
set set set set set set set macro pixldst1 op
Definition: pixman-arm-neon-asm.h:54
#define SPIRV_CROSS_THROW(x)
Definition: spirv_common.hpp:68
Definition: spirv.hpp:574
GroupOperation
Definition: spirv.hpp:571
Definition: spirv.hpp:575
Definition: spirv.hpp:573

◆ GLSL_QFOP

#define GLSL_QFOP (   op)    emit_quaternary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], #op)

◆ GLSL_TFOP

#define GLSL_TFOP (   op)    emit_trinary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], #op)

◆ GLSL_UFOP

#define GLSL_UFOP (   op)    emit_unary_func_op(ops[0], ops[1], ops[2], #op)

◆ GLSL_UOP [1/2]

#define GLSL_UOP (   opname,
  x 
)
Value:
case Op##opname: \
unary = true; \
op = x; \
break
Op
Definition: spirv.hpp:714
GLint GLint GLint GLint GLint x
Definition: glext.h:6295

◆ GLSL_UOP [2/2]

#define GLSL_UOP (   op)    emit_unary_op(ops[0], ops[1], ops[2], #op)

Function Documentation

◆ glsl_opcode_is_sign_invariant()

static bool glsl_opcode_is_sign_invariant ( Op  opcode)
static
Here is the caller graph for this function:

◆ is_unsigned_glsl_opcode()

static bool is_unsigned_glsl_opcode ( GLSLstd450  op)
static
Here is the caller graph for this function:

◆ is_unsigned_opcode()

static bool is_unsigned_opcode ( Op  op)
static
Here is the caller graph for this function:

◆ packing_has_flexible_offset()

static bool packing_has_flexible_offset ( BufferPackingStandard  packing)
static
Here is the caller graph for this function:

◆ packing_is_hlsl()

static bool packing_is_hlsl ( BufferPackingStandard  packing)
static
Here is the caller graph for this function:

◆ packing_is_vec4_padded()

static bool packing_is_vec4_padded ( BufferPackingStandard  packing)
static
Here is the caller graph for this function:

◆ packing_to_substruct_packing()

static BufferPackingStandard packing_to_substruct_packing ( BufferPackingStandard  packing)
static
Here is the caller graph for this function:

◆ pls_format_to_basetype()

static SPIRType::BaseType pls_format_to_basetype ( PlsFormat  format)
static
Here is the caller graph for this function:

◆ pls_format_to_components()

static uint32_t pls_format_to_components ( PlsFormat  format)
static
Here is the caller graph for this function:

◆ to_pls_layout()

static const char* to_pls_layout ( PlsFormat  format)
static
Here is the caller graph for this function:

◆ vector_swizzle()

static const char* vector_swizzle ( int  vecsize,
int  index 
)
static
Here is the caller graph for this function: