Skip to content

Commit 86cba34

Browse files
committed
HLSL: Added support for tessellation
1 parent 707bc66 commit 86cba34

5 files changed

Lines changed: 975 additions & 26 deletions

File tree

spirv_cross.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4500,6 +4500,8 @@ void Compiler::ActiveBuiltinHandler::handle_builtin(const SPIRType &type, BuiltI
45004500
}
45014501
else if (builtin == BuiltInPosition)
45024502
{
4503+
if (type.storage == StorageClassInput && type.array_size_literal[0])
4504+
compiler.position_input_count = type.array[0];
45034505
if (decoration_flags.get(DecorationInvariant))
45044506
compiler.position_invariant = true;
45054507
}

spirv_cross.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,7 @@ class Compiler
957957
uint32_t clip_distance_count = 0;
958958
uint32_t cull_distance_count = 0;
959959
bool position_invariant = false;
960+
int position_input_count = 0;
960961

961962
void analyze_parameter_preservation(
962963
SPIRFunction &entry, const CFG &cfg,

spirv_glsl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class CompilerGLSL : public Compiler
412412
uint32_t src_id;
413413
};
414414
TemporaryCopy handle_instruction_precision(const Instruction &instr);
415-
void emit_block_instructions(SPIRBlock &block);
415+
virtual void emit_block_instructions(SPIRBlock &block);
416416
void emit_block_instructions_with_masked_debug(SPIRBlock &block);
417417

418418
// For relax_nan_checks.

0 commit comments

Comments
 (0)