[Vulkan] Add tesselation support
Pretty much just following the D3D12 implementation
This commit is contained in:
68
src/xenia/gpu/shaders/adaptive_quad.hs.glsl
Normal file
68
src/xenia/gpu/shaders/adaptive_quad.hs.glsl
Normal file
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for adaptive quad tessellation.
|
||||
// Edge factors come from the vertex shader (read from the index buffer).
|
||||
// Uses fractional_even spacing for smooth tessellation.
|
||||
|
||||
layout(vertices = 1) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - edge tessellation factor (already processed:
|
||||
// 1.0 added and clamped to range in the vertex shader).
|
||||
layout(location = 0) in float in_edge_factor[];
|
||||
|
||||
// Output to tessellation evaluation shader - patch index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// 1.0 added to the factors according to the images in
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
// (fractional_even also requires a factor of at least 2.0), to the min/max it
|
||||
// has already been added on the CPU.
|
||||
|
||||
// Vulkan/OpenGL (goes in a direction along the perimeter):
|
||||
// [0] - between U0V1 and U0V0.
|
||||
// [1] - between U0V0 and U1V0.
|
||||
// [2] - between U1V0 and U1V1.
|
||||
// [3] - between U1V1 and U0V1.
|
||||
//
|
||||
// Xbox 360 factors go along the perimeter too according to the example of
|
||||
// edge factors in Next Generation Graphics Programming on Xbox 360.
|
||||
// However, if v0->v1... that seems to be working for triangle patches applies
|
||||
// here too, with the swizzle Xenia uses in domain shaders:
|
||||
// [0] - between U0V0 and U1V0.
|
||||
// [1] - between U1V0 and U1V1.
|
||||
// [2] - between U1V1 and U0V1.
|
||||
// [3] - between U0V1 and U0V0.
|
||||
gl_TessLevelOuter[0] = in_edge_factor[3];
|
||||
gl_TessLevelOuter[1] = in_edge_factor[0];
|
||||
gl_TessLevelOuter[2] = in_edge_factor[1];
|
||||
gl_TessLevelOuter[3] = in_edge_factor[2];
|
||||
|
||||
// On the Xbox 360, according to the presentation, the inside factor is the
|
||||
// minimum of the factors of the edges along the axis.
|
||||
// Vulkan/OpenGL:
|
||||
// [0] - along U.
|
||||
// [1] - along V.
|
||||
gl_TessLevelInner[0] = min(gl_TessLevelOuter[1], gl_TessLevelOuter[3]);
|
||||
gl_TessLevelInner[1] = min(gl_TessLevelOuter[0], gl_TessLevelOuter[2]);
|
||||
|
||||
// Output the patch index.
|
||||
// Only the lower 24 bits of the vertex index are used (tested on an Adreno
|
||||
// 200 phone). `((index & 0xFFFFFF) + offset) & 0xFFFFFF` is the same as
|
||||
// `(index + offset) & 0xFFFFFF`.
|
||||
out_index[gl_InvocationID] =
|
||||
float(clamp((gl_PrimitiveID + xe_vertex_index_offset) & 0xFFFFFFu,
|
||||
xe_vertex_index_min_max.x, xe_vertex_index_min_max.y));
|
||||
}
|
||||
71
src/xenia/gpu/shaders/adaptive_triangle.hs.glsl
Normal file
71
src/xenia/gpu/shaders/adaptive_triangle.hs.glsl
Normal file
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for adaptive triangle tessellation.
|
||||
// Edge factors come from the vertex shader (read from the index buffer).
|
||||
// Uses fractional_even spacing for smooth tessellation.
|
||||
|
||||
layout(vertices = 1) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - edge tessellation factor (already processed:
|
||||
// 1.0 added and clamped to range in the vertex shader).
|
||||
layout(location = 0) in float in_edge_factor[];
|
||||
|
||||
// Output to tessellation evaluation shader - patch index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Factors for adaptive tessellation are taken from the index buffer.
|
||||
//
|
||||
// 1.0 added to the factors according to the images in
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
// (fractional_even also requires a factor of at least 2.0), to the min/max it
|
||||
// has already been added on the CPU.
|
||||
|
||||
// It appears that on the Xbox 360:
|
||||
// - [0] is the factor for the v0->v1 edge.
|
||||
// - [1] is the factor for the v1->v2 edge.
|
||||
// - [2] is the factor for the v2->v0 edge.
|
||||
// Where v0 is the U1V0W0 vertex, v1 is the U0V1W0 vertex, and v2 is the
|
||||
// U0V0W1 vertex.
|
||||
// The hint at the order was provided in the Code Listing 15 of:
|
||||
// http://www.uraldev.ru/files/download/21/Real-Time_Tessellation_on_GPU.pdf
|
||||
//
|
||||
// In Vulkan/OpenGL:
|
||||
// - gl_TessLevelOuter[0] is the factor for the U0 edge (v1->v2).
|
||||
// - gl_TessLevelOuter[1] is the factor for the V0 edge (v2->v0).
|
||||
// - gl_TessLevelOuter[2] is the factor for the W0 edge (v0->v1).
|
||||
//
|
||||
// In Xenia's domain shaders, the barycentric coordinates are handled as:
|
||||
// 1) gl_TessCoord.xyz -> r0.zyx by Xenia.
|
||||
// 2) r0.zyx -> r0.zyx by the guest (because r1.y is set to 0 by Xenia, which
|
||||
// apparently means identity swizzle to games).
|
||||
// 3) r0.z * v0 + r0.y * v1 + r0.x * v2 by the guest.
|
||||
// With this order, there are no cracks in 4D5307E6 water.
|
||||
gl_TessLevelOuter[0] = in_edge_factor[1]; // v1->v2 edge
|
||||
gl_TessLevelOuter[1] = in_edge_factor[2]; // v2->v0 edge
|
||||
gl_TessLevelOuter[2] = in_edge_factor[0]; // v0->v1 edge
|
||||
|
||||
// Inside factor is the minimum of edge factors.
|
||||
gl_TessLevelInner[0] = min(min(gl_TessLevelOuter[0], gl_TessLevelOuter[1]),
|
||||
gl_TessLevelOuter[2]);
|
||||
|
||||
// Output the patch index.
|
||||
// Only the lower 24 bits of the vertex index are used (tested on an Adreno
|
||||
// 200 phone). `((index & 0xFFFFFF) + offset) & 0xFFFFFF` is the same as
|
||||
// `(index + offset) & 0xFFFFFF`.
|
||||
out_index[gl_InvocationID] =
|
||||
float(clamp((gl_PrimitiveID + xe_vertex_index_offset) & 0xFFFFFFu,
|
||||
xe_vertex_index_min_max.x, xe_vertex_index_min_max.y));
|
||||
}
|
||||
191
src/xenia/gpu/shaders/bytecode/vulkan_spirv/adaptive_quad_hs.h
generated
Normal file
191
src/xenia/gpu/shaders/bytecode/vulkan_spirv/adaptive_quad_hs.h
generated
Normal file
@@ -0,0 +1,191 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24500
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %gl_TessLevelOuter %4243 %gl_TessLevelInner %3307 %gl_InvocationID %gl_PrimitiveID
|
||||
OpExecutionMode %5663 OutputVertices 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %4243 Location 0
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %gl_PrimitiveID BuiltIn PrimitiveId
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%4243 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%_ptr_Output__arr_float_uint_1 = OpTypePointer Output %_arr_float_uint_1
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_1 Output
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%gl_PrimitiveID = OpVariable %_ptr_Input_int Input
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
||||
%uint_16777215 = OpConstant %uint 16777215
|
||||
%int_4 = OpConstant %int 4
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%5663 = OpFunction %void None %1282
|
||||
%23915 = OpLabel
|
||||
%7129 = OpAccessChain %_ptr_Input_float %4243 %int_3
|
||||
%15646 = OpLoad %float %7129
|
||||
%19981 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19981 %15646
|
||||
%19905 = OpAccessChain %_ptr_Input_float %4243 %int_0
|
||||
%7391 = OpLoad %float %19905
|
||||
%19982 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19982 %7391
|
||||
%19906 = OpAccessChain %_ptr_Input_float %4243 %int_1
|
||||
%7392 = OpLoad %float %19906
|
||||
%19983 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19983 %7392
|
||||
%19907 = OpAccessChain %_ptr_Input_float %4243 %int_2
|
||||
%7393 = OpLoad %float %19907
|
||||
%19908 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_3
|
||||
OpStore %19908 %7393
|
||||
%13565 = OpLoad %float %19982
|
||||
%12692 = OpLoad %float %19908
|
||||
%7944 = OpExtInst %float %1 FMin %13565 %12692
|
||||
%14721 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %14721 %7944
|
||||
%13566 = OpLoad %float %19981
|
||||
%12693 = OpLoad %float %19983
|
||||
%7945 = OpExtInst %float %1 FMin %13566 %12693
|
||||
%14722 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_1
|
||||
OpStore %14722 %7945
|
||||
%15656 = OpLoad %int %gl_InvocationID
|
||||
%23765 = OpLoad %int %gl_PrimitiveID
|
||||
%9548 = OpBitcast %uint %23765
|
||||
%7395 = OpAccessChain %_ptr_Uniform_uint %4930 %int_3
|
||||
%22970 = OpLoad %uint %7395
|
||||
%7652 = OpIAdd %uint %9548 %22970
|
||||
%18847 = OpBitwiseAnd %uint %7652 %uint_16777215
|
||||
%10702 = OpAccessChain %_ptr_Uniform_uint %4930 %int_4 %uint_0
|
||||
%24236 = OpLoad %uint %10702
|
||||
%19191 = OpAccessChain %_ptr_Uniform_uint %4930 %int_4 %uint_1
|
||||
%22108 = OpLoad %uint %19191
|
||||
%23780 = OpExtInst %uint %1 UClamp %18847 %24236 %22108
|
||||
%24499 = OpConvertUToF %float %23780
|
||||
%12694 = OpAccessChain %_ptr_Output_float %3307 %15656
|
||||
OpStore %12694 %24499
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t adaptive_quad_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x00005FB4, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000B000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00001548, 0x00001093, 0x00000CDA,
|
||||
0x00000CEB, 0x000011E9, 0x000014CB, 0x00040010, 0x0000161F, 0x0000001A,
|
||||
0x00000001, 0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047,
|
||||
0x00001548, 0x0000000F, 0x00040047, 0x00001093, 0x0000001E, 0x00000000,
|
||||
0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047, 0x00000CDA,
|
||||
0x0000000F, 0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047,
|
||||
0x000011E9, 0x0000000B, 0x00000008, 0x00040047, 0x000014CB, 0x0000000B,
|
||||
0x00000007, 0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457,
|
||||
0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001,
|
||||
0x00000023, 0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023,
|
||||
0x00000010, 0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014,
|
||||
0x00050048, 0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047,
|
||||
0x00001342, 0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022,
|
||||
0x00000001, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
|
||||
0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B, 0x00000020,
|
||||
0x00000000, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004, 0x0004001C,
|
||||
0x00000225, 0x0000000D, 0x00000A16, 0x00040020, 0x000004A2, 0x00000003,
|
||||
0x00000225, 0x0004003B, 0x000004A2, 0x00001548, 0x00000003, 0x00040015,
|
||||
0x0000000C, 0x00000020, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A0B,
|
||||
0x00000000, 0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C,
|
||||
0x00000243, 0x0000000D, 0x00000A6A, 0x00040020, 0x000004C0, 0x00000001,
|
||||
0x00000243, 0x0004003B, 0x000004C0, 0x00001093, 0x00000001, 0x0004002B,
|
||||
0x0000000C, 0x00000A14, 0x00000003, 0x00040020, 0x0000028A, 0x00000001,
|
||||
0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000B, 0x00000A10, 0x00000002, 0x0004001C,
|
||||
0x000002AC, 0x0000000D, 0x00000A10, 0x00040020, 0x00000529, 0x00000003,
|
||||
0x000002AC, 0x0004003B, 0x00000529, 0x00000CDA, 0x00000003, 0x0004002B,
|
||||
0x0000000B, 0x00000A0D, 0x00000001, 0x0004001C, 0x000002FC, 0x0000000D,
|
||||
0x00000A0D, 0x00040020, 0x00000579, 0x00000003, 0x000002FC, 0x0004003B,
|
||||
0x00000579, 0x00000CEB, 0x00000003, 0x00040020, 0x00000289, 0x00000001,
|
||||
0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001, 0x0004003B,
|
||||
0x00000289, 0x000014CB, 0x00000001, 0x00040017, 0x00000013, 0x0000000D,
|
||||
0x00000002, 0x00040017, 0x00000011, 0x0000000B, 0x00000002, 0x0007001E,
|
||||
0x00000457, 0x00000013, 0x00000013, 0x0000000B, 0x0000000B, 0x00000011,
|
||||
0x00040020, 0x000006D4, 0x00000002, 0x00000457, 0x0004003B, 0x000006D4,
|
||||
0x00001342, 0x00000002, 0x00040020, 0x00000288, 0x00000002, 0x0000000B,
|
||||
0x0004002B, 0x0000000B, 0x00000923, 0x00FFFFFF, 0x0004002B, 0x0000000C,
|
||||
0x00000A17, 0x00000004, 0x0004002B, 0x0000000B, 0x00000A0A, 0x00000000,
|
||||
0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8,
|
||||
0x00005D6B, 0x00050041, 0x0000028A, 0x00001BD9, 0x00001093, 0x00000A14,
|
||||
0x0004003D, 0x0000000D, 0x00003D1E, 0x00001BD9, 0x00050041, 0x0000028B,
|
||||
0x00004E0D, 0x00001548, 0x00000A0B, 0x0003003E, 0x00004E0D, 0x00003D1E,
|
||||
0x00050041, 0x0000028A, 0x00004DC1, 0x00001093, 0x00000A0B, 0x0004003D,
|
||||
0x0000000D, 0x00001CDF, 0x00004DC1, 0x00050041, 0x0000028B, 0x00004E0E,
|
||||
0x00001548, 0x00000A0E, 0x0003003E, 0x00004E0E, 0x00001CDF, 0x00050041,
|
||||
0x0000028A, 0x00004DC2, 0x00001093, 0x00000A0E, 0x0004003D, 0x0000000D,
|
||||
0x00001CE0, 0x00004DC2, 0x00050041, 0x0000028B, 0x00004E0F, 0x00001548,
|
||||
0x00000A11, 0x0003003E, 0x00004E0F, 0x00001CE0, 0x00050041, 0x0000028A,
|
||||
0x00004DC3, 0x00001093, 0x00000A11, 0x0004003D, 0x0000000D, 0x00001CE1,
|
||||
0x00004DC3, 0x00050041, 0x0000028B, 0x00004DC4, 0x00001548, 0x00000A14,
|
||||
0x0003003E, 0x00004DC4, 0x00001CE1, 0x0004003D, 0x0000000D, 0x000034FD,
|
||||
0x00004E0E, 0x0004003D, 0x0000000D, 0x00003194, 0x00004DC4, 0x0007000C,
|
||||
0x0000000D, 0x00001F08, 0x00000001, 0x00000025, 0x000034FD, 0x00003194,
|
||||
0x00050041, 0x0000028B, 0x00003981, 0x00000CDA, 0x00000A0B, 0x0003003E,
|
||||
0x00003981, 0x00001F08, 0x0004003D, 0x0000000D, 0x000034FE, 0x00004E0D,
|
||||
0x0004003D, 0x0000000D, 0x00003195, 0x00004E0F, 0x0007000C, 0x0000000D,
|
||||
0x00001F09, 0x00000001, 0x00000025, 0x000034FE, 0x00003195, 0x00050041,
|
||||
0x0000028B, 0x00003982, 0x00000CDA, 0x00000A0E, 0x0003003E, 0x00003982,
|
||||
0x00001F09, 0x0004003D, 0x0000000C, 0x00003D28, 0x000011E9, 0x0004003D,
|
||||
0x0000000C, 0x00005CD5, 0x000014CB, 0x0004007C, 0x0000000B, 0x0000254C,
|
||||
0x00005CD5, 0x00050041, 0x00000288, 0x00001CE3, 0x00001342, 0x00000A14,
|
||||
0x0004003D, 0x0000000B, 0x000059BA, 0x00001CE3, 0x00050080, 0x0000000B,
|
||||
0x00001DE4, 0x0000254C, 0x000059BA, 0x000500C7, 0x0000000B, 0x0000499F,
|
||||
0x00001DE4, 0x00000923, 0x00060041, 0x00000288, 0x000029CE, 0x00001342,
|
||||
0x00000A17, 0x00000A0A, 0x0004003D, 0x0000000B, 0x00005EAC, 0x000029CE,
|
||||
0x00060041, 0x00000288, 0x00004AF7, 0x00001342, 0x00000A17, 0x00000A0D,
|
||||
0x0004003D, 0x0000000B, 0x0000565C, 0x00004AF7, 0x0008000C, 0x0000000B,
|
||||
0x00005CE4, 0x00000001, 0x0000002C, 0x0000499F, 0x00005EAC, 0x0000565C,
|
||||
0x00040070, 0x0000000D, 0x00005FB3, 0x00005CE4, 0x00050041, 0x0000028B,
|
||||
0x00003196, 0x00000CEB, 0x00003D28, 0x0003003E, 0x00003196, 0x00005FB3,
|
||||
0x000100FD, 0x00010038,
|
||||
};
|
||||
179
src/xenia/gpu/shaders/bytecode/vulkan_spirv/adaptive_triangle_hs.h
generated
Normal file
179
src/xenia/gpu/shaders/bytecode/vulkan_spirv/adaptive_triangle_hs.h
generated
Normal file
@@ -0,0 +1,179 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24500
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %gl_TessLevelOuter %4243 %gl_TessLevelInner %3307 %gl_InvocationID %gl_PrimitiveID
|
||||
OpExecutionMode %5663 OutputVertices 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %4243 Location 0
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %gl_PrimitiveID BuiltIn PrimitiveId
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%4243 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%_ptr_Output__arr_float_uint_1 = OpTypePointer Output %_arr_float_uint_1
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_1 Output
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%gl_PrimitiveID = OpVariable %_ptr_Input_int Input
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
||||
%uint_16777215 = OpConstant %uint 16777215
|
||||
%int_4 = OpConstant %int 4
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%5663 = OpFunction %void None %1282
|
||||
%23915 = OpLabel
|
||||
%7129 = OpAccessChain %_ptr_Input_float %4243 %int_1
|
||||
%15646 = OpLoad %float %7129
|
||||
%19981 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19981 %15646
|
||||
%19905 = OpAccessChain %_ptr_Input_float %4243 %int_2
|
||||
%7391 = OpLoad %float %19905
|
||||
%19982 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19982 %7391
|
||||
%19906 = OpAccessChain %_ptr_Input_float %4243 %int_0
|
||||
%7392 = OpLoad %float %19906
|
||||
%19907 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19907 %7392
|
||||
%13565 = OpLoad %float %19981
|
||||
%12616 = OpLoad %float %19982
|
||||
%7723 = OpExtInst %float %1 FMin %13565 %12616
|
||||
%6699 = OpLoad %float %19907
|
||||
%21028 = OpExtInst %float %1 FMin %7723 %6699
|
||||
%14721 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %14721 %21028
|
||||
%15656 = OpLoad %int %gl_InvocationID
|
||||
%23765 = OpLoad %int %gl_PrimitiveID
|
||||
%9548 = OpBitcast %uint %23765
|
||||
%7395 = OpAccessChain %_ptr_Uniform_uint %4930 %int_3
|
||||
%22970 = OpLoad %uint %7395
|
||||
%7652 = OpIAdd %uint %9548 %22970
|
||||
%18847 = OpBitwiseAnd %uint %7652 %uint_16777215
|
||||
%10702 = OpAccessChain %_ptr_Uniform_uint %4930 %int_4 %uint_0
|
||||
%24236 = OpLoad %uint %10702
|
||||
%19191 = OpAccessChain %_ptr_Uniform_uint %4930 %int_4 %uint_1
|
||||
%22108 = OpLoad %uint %19191
|
||||
%23780 = OpExtInst %uint %1 UClamp %18847 %24236 %22108
|
||||
%24499 = OpConvertUToF %float %23780
|
||||
%12692 = OpAccessChain %_ptr_Output_float %3307 %15656
|
||||
OpStore %12692 %24499
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t adaptive_triangle_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x00005FB4, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000B000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00001548, 0x00001093, 0x00000CDA,
|
||||
0x00000CEB, 0x000011E9, 0x000014CB, 0x00040010, 0x0000161F, 0x0000001A,
|
||||
0x00000001, 0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047,
|
||||
0x00001548, 0x0000000F, 0x00040047, 0x00001093, 0x0000001E, 0x00000000,
|
||||
0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047, 0x00000CDA,
|
||||
0x0000000F, 0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047,
|
||||
0x000011E9, 0x0000000B, 0x00000008, 0x00040047, 0x000014CB, 0x0000000B,
|
||||
0x00000007, 0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457,
|
||||
0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001,
|
||||
0x00000023, 0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023,
|
||||
0x00000010, 0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014,
|
||||
0x00050048, 0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047,
|
||||
0x00001342, 0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022,
|
||||
0x00000001, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
|
||||
0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B, 0x00000020,
|
||||
0x00000000, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004, 0x0004001C,
|
||||
0x00000225, 0x0000000D, 0x00000A16, 0x00040020, 0x000004A2, 0x00000003,
|
||||
0x00000225, 0x0004003B, 0x000004A2, 0x00001548, 0x00000003, 0x00040015,
|
||||
0x0000000C, 0x00000020, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A0B,
|
||||
0x00000000, 0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C,
|
||||
0x00000243, 0x0000000D, 0x00000A6A, 0x00040020, 0x000004C0, 0x00000001,
|
||||
0x00000243, 0x0004003B, 0x000004C0, 0x00001093, 0x00000001, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x00040020, 0x0000028A, 0x00000001,
|
||||
0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D, 0x0004002B,
|
||||
0x0000000C, 0x00000A11, 0x00000002, 0x0004002B, 0x0000000B, 0x00000A10,
|
||||
0x00000002, 0x0004001C, 0x00000298, 0x0000000D, 0x00000A10, 0x00040020,
|
||||
0x00000515, 0x00000003, 0x00000298, 0x0004003B, 0x00000515, 0x00000CDA,
|
||||
0x00000003, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001, 0x0004001C,
|
||||
0x000002D9, 0x0000000D, 0x00000A0D, 0x00040020, 0x00000556, 0x00000003,
|
||||
0x000002D9, 0x0004003B, 0x00000556, 0x00000CEB, 0x00000003, 0x00040020,
|
||||
0x00000289, 0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9,
|
||||
0x00000001, 0x0004003B, 0x00000289, 0x000014CB, 0x00000001, 0x00040017,
|
||||
0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011, 0x0000000B,
|
||||
0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013, 0x0000000B,
|
||||
0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002, 0x00000457,
|
||||
0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B, 0x0000000C,
|
||||
0x00000A14, 0x00000003, 0x00040020, 0x00000288, 0x00000002, 0x0000000B,
|
||||
0x0004002B, 0x0000000B, 0x00000923, 0x00FFFFFF, 0x0004002B, 0x0000000C,
|
||||
0x00000A17, 0x00000004, 0x0004002B, 0x0000000B, 0x00000A0A, 0x00000000,
|
||||
0x00050036, 0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8,
|
||||
0x00005D6B, 0x00050041, 0x0000028A, 0x00001BD9, 0x00001093, 0x00000A0E,
|
||||
0x0004003D, 0x0000000D, 0x00003D1E, 0x00001BD9, 0x00050041, 0x0000028B,
|
||||
0x00004E0D, 0x00001548, 0x00000A0B, 0x0003003E, 0x00004E0D, 0x00003D1E,
|
||||
0x00050041, 0x0000028A, 0x00004DC1, 0x00001093, 0x00000A11, 0x0004003D,
|
||||
0x0000000D, 0x00001CDF, 0x00004DC1, 0x00050041, 0x0000028B, 0x00004E0E,
|
||||
0x00001548, 0x00000A0E, 0x0003003E, 0x00004E0E, 0x00001CDF, 0x00050041,
|
||||
0x0000028A, 0x00004DC2, 0x00001093, 0x00000A0B, 0x0004003D, 0x0000000D,
|
||||
0x00001CE0, 0x00004DC2, 0x00050041, 0x0000028B, 0x00004DC3, 0x00001548,
|
||||
0x00000A11, 0x0003003E, 0x00004DC3, 0x00001CE0, 0x0004003D, 0x0000000D,
|
||||
0x000034FD, 0x00004E0D, 0x0004003D, 0x0000000D, 0x00003148, 0x00004E0E,
|
||||
0x0007000C, 0x0000000D, 0x00001E2B, 0x00000001, 0x00000025, 0x000034FD,
|
||||
0x00003148, 0x0004003D, 0x0000000D, 0x00001A2B, 0x00004DC3, 0x0007000C,
|
||||
0x0000000D, 0x00005224, 0x00000001, 0x00000025, 0x00001E2B, 0x00001A2B,
|
||||
0x00050041, 0x0000028B, 0x00003981, 0x00000CDA, 0x00000A0B, 0x0003003E,
|
||||
0x00003981, 0x00005224, 0x0004003D, 0x0000000C, 0x00003D28, 0x000011E9,
|
||||
0x0004003D, 0x0000000C, 0x00005CD5, 0x000014CB, 0x0004007C, 0x0000000B,
|
||||
0x0000254C, 0x00005CD5, 0x00050041, 0x00000288, 0x00001CE3, 0x00001342,
|
||||
0x00000A14, 0x0004003D, 0x0000000B, 0x000059BA, 0x00001CE3, 0x00050080,
|
||||
0x0000000B, 0x00001DE4, 0x0000254C, 0x000059BA, 0x000500C7, 0x0000000B,
|
||||
0x0000499F, 0x00001DE4, 0x00000923, 0x00060041, 0x00000288, 0x000029CE,
|
||||
0x00001342, 0x00000A17, 0x00000A0A, 0x0004003D, 0x0000000B, 0x00005EAC,
|
||||
0x000029CE, 0x00060041, 0x00000288, 0x00004AF7, 0x00001342, 0x00000A17,
|
||||
0x00000A0D, 0x0004003D, 0x0000000B, 0x0000565C, 0x00004AF7, 0x0008000C,
|
||||
0x0000000B, 0x00005CE4, 0x00000001, 0x0000002C, 0x0000499F, 0x00005EAC,
|
||||
0x0000565C, 0x00040070, 0x0000000D, 0x00005FB3, 0x00005CE4, 0x00050041,
|
||||
0x0000028B, 0x00003194, 0x00000CEB, 0x00003D28, 0x0003003E, 0x00003194,
|
||||
0x00005FB3, 0x000100FD, 0x00010038,
|
||||
};
|
||||
143
src/xenia/gpu/shaders/bytecode/vulkan_spirv/continuous_quad_1cp_hs.h
generated
Normal file
143
src/xenia/gpu/shaders/bytecode/vulkan_spirv/continuous_quad_1cp_hs.h
generated
Normal file
@@ -0,0 +1,143 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24684
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %3307 %gl_InvocationID %3884 %gl_TessLevelOuter %gl_TessLevelInner
|
||||
OpExecutionMode %5663 OutputVertices 1
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %3884 Location 0
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%_ptr_Output__arr_float_uint_1 = OpTypePointer Output %_arr_float_uint_1
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_1 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%3884 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%5663 = OpFunction %void None %1282
|
||||
%24683 = OpLabel
|
||||
%20062 = OpLoad %int %gl_InvocationID
|
||||
%10147 = OpAccessChain %_ptr_Input_float %3884 %20062
|
||||
%22427 = OpLoad %float %10147
|
||||
%19981 = OpAccessChain %_ptr_Output_float %3307 %20062
|
||||
OpStore %19981 %22427
|
||||
%19905 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%7391 = OpLoad %float %19905
|
||||
%19982 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19982 %7391
|
||||
%19732 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19732 %7391
|
||||
%19733 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19733 %7391
|
||||
%19734 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_3
|
||||
OpStore %19734 %7391
|
||||
%19735 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %19735 %7391
|
||||
%23304 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_1
|
||||
OpStore %23304 %7391
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t continuous_quad_1cp_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x0000606C, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000A000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00000CEB, 0x000011E9, 0x00000F2C,
|
||||
0x00001548, 0x00000CDA, 0x00040010, 0x0000161F, 0x0000001A, 0x00000001,
|
||||
0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047, 0x000011E9,
|
||||
0x0000000B, 0x00000008, 0x00040047, 0x00000F2C, 0x0000001E, 0x00000000,
|
||||
0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457, 0x00000000,
|
||||
0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001, 0x00000023,
|
||||
0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023, 0x00000010,
|
||||
0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014, 0x00050048,
|
||||
0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047, 0x00001342,
|
||||
0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022, 0x00000001,
|
||||
0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047, 0x00001548,
|
||||
0x0000000F, 0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047,
|
||||
0x00000CDA, 0x0000000F, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
|
||||
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B,
|
||||
0x00000020, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
|
||||
0x0004001C, 0x00000225, 0x0000000D, 0x00000A0D, 0x00040020, 0x000004A2,
|
||||
0x00000003, 0x00000225, 0x0004003B, 0x000004A2, 0x00000CEB, 0x00000003,
|
||||
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289,
|
||||
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001,
|
||||
0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C, 0x0000024D,
|
||||
0x0000000D, 0x00000A6A, 0x00040020, 0x000004CA, 0x00000001, 0x0000024D,
|
||||
0x0004003B, 0x000004CA, 0x00000F2C, 0x00000001, 0x00040020, 0x0000028A,
|
||||
0x00000001, 0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D,
|
||||
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011,
|
||||
0x0000000B, 0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013,
|
||||
0x0000000B, 0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002,
|
||||
0x00000457, 0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B,
|
||||
0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000028C, 0x00000002,
|
||||
0x0000000D, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004, 0x0004001C,
|
||||
0x000002B6, 0x0000000D, 0x00000A16, 0x00040020, 0x00000533, 0x00000003,
|
||||
0x000002B6, 0x0004003B, 0x00000533, 0x00001548, 0x00000003, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000C, 0x00000A14, 0x00000003, 0x0004002B,
|
||||
0x0000000B, 0x00000A10, 0x00000002, 0x0004001C, 0x00000301, 0x0000000D,
|
||||
0x00000A10, 0x00040020, 0x0000057E, 0x00000003, 0x00000301, 0x0004003B,
|
||||
0x0000057E, 0x00000CDA, 0x00000003, 0x00050036, 0x00000008, 0x0000161F,
|
||||
0x00000000, 0x00000502, 0x000200F8, 0x0000606B, 0x0004003D, 0x0000000C,
|
||||
0x00004E5E, 0x000011E9, 0x00050041, 0x0000028A, 0x000027A3, 0x00000F2C,
|
||||
0x00004E5E, 0x0004003D, 0x0000000D, 0x0000579B, 0x000027A3, 0x00050041,
|
||||
0x0000028B, 0x00004E0D, 0x00000CEB, 0x00004E5E, 0x0003003E, 0x00004E0D,
|
||||
0x0000579B, 0x00060041, 0x0000028C, 0x00004DC1, 0x00001342, 0x00000A0B,
|
||||
0x00000A0D, 0x0004003D, 0x0000000D, 0x00001CDF, 0x00004DC1, 0x00050041,
|
||||
0x0000028B, 0x00004E0E, 0x00001548, 0x00000A0B, 0x0003003E, 0x00004E0E,
|
||||
0x00001CDF, 0x00050041, 0x0000028B, 0x00004D14, 0x00001548, 0x00000A0E,
|
||||
0x0003003E, 0x00004D14, 0x00001CDF, 0x00050041, 0x0000028B, 0x00004D15,
|
||||
0x00001548, 0x00000A11, 0x0003003E, 0x00004D15, 0x00001CDF, 0x00050041,
|
||||
0x0000028B, 0x00004D16, 0x00001548, 0x00000A14, 0x0003003E, 0x00004D16,
|
||||
0x00001CDF, 0x00050041, 0x0000028B, 0x00004D17, 0x00000CDA, 0x00000A0B,
|
||||
0x0003003E, 0x00004D17, 0x00001CDF, 0x00050041, 0x0000028B, 0x00005B08,
|
||||
0x00000CDA, 0x00000A0E, 0x0003003E, 0x00005B08, 0x00001CDF, 0x000100FD,
|
||||
0x00010038,
|
||||
};
|
||||
150
src/xenia/gpu/shaders/bytecode/vulkan_spirv/continuous_quad_4cp_hs.h
generated
Normal file
150
src/xenia/gpu/shaders/bytecode/vulkan_spirv/continuous_quad_4cp_hs.h
generated
Normal file
@@ -0,0 +1,150 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24684
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %3307 %gl_InvocationID %3884 %gl_TessLevelOuter %gl_TessLevelInner
|
||||
OpExecutionMode %5663 OutputVertices 4
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %3884 Location 0
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%3884 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%int_0 = OpConstant %int 0
|
||||
%bool = OpTypeBool
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%5663 = OpFunction %void None %1282
|
||||
%24683 = OpLabel
|
||||
%20062 = OpLoad %int %gl_InvocationID
|
||||
%10147 = OpAccessChain %_ptr_Input_float %3884 %20062
|
||||
%22427 = OpLoad %float %10147
|
||||
%21976 = OpAccessChain %_ptr_Output_float %3307 %20062
|
||||
OpStore %21976 %22427
|
||||
%20857 = OpIEqual %bool %20062 %int_0
|
||||
OpSelectionMerge %19578 None
|
||||
OpBranchConditional %20857 %12129 %19578
|
||||
%12129 = OpLabel
|
||||
%18210 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%15646 = OpLoad %float %18210
|
||||
%19981 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19981 %15646
|
||||
%19732 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19732 %15646
|
||||
%19733 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19733 %15646
|
||||
%19734 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_3
|
||||
OpStore %19734 %15646
|
||||
%19735 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %19735 %15646
|
||||
%23228 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_1
|
||||
OpStore %23228 %15646
|
||||
OpBranch %19578
|
||||
%19578 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t continuous_quad_4cp_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x0000606C, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000A000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00000CEB, 0x000011E9, 0x00000F2C,
|
||||
0x00001548, 0x00000CDA, 0x00040010, 0x0000161F, 0x0000001A, 0x00000004,
|
||||
0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047, 0x000011E9,
|
||||
0x0000000B, 0x00000008, 0x00040047, 0x00000F2C, 0x0000001E, 0x00000000,
|
||||
0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457, 0x00000000,
|
||||
0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001, 0x00000023,
|
||||
0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023, 0x00000010,
|
||||
0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014, 0x00050048,
|
||||
0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047, 0x00001342,
|
||||
0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022, 0x00000001,
|
||||
0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047, 0x00001548,
|
||||
0x0000000F, 0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047,
|
||||
0x00000CDA, 0x0000000F, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
|
||||
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B,
|
||||
0x00000020, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004,
|
||||
0x0004001C, 0x00000225, 0x0000000D, 0x00000A16, 0x00040020, 0x000004A2,
|
||||
0x00000003, 0x00000225, 0x0004003B, 0x000004A2, 0x00000CEB, 0x00000003,
|
||||
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289,
|
||||
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001,
|
||||
0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C, 0x0000024D,
|
||||
0x0000000D, 0x00000A6A, 0x00040020, 0x000004CA, 0x00000001, 0x0000024D,
|
||||
0x0004003B, 0x000004CA, 0x00000F2C, 0x00000001, 0x00040020, 0x0000028A,
|
||||
0x00000001, 0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D,
|
||||
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00020014, 0x00000009,
|
||||
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011,
|
||||
0x0000000B, 0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013,
|
||||
0x0000000B, 0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002,
|
||||
0x00000457, 0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B,
|
||||
0x0000000B, 0x00000A0D, 0x00000001, 0x00040020, 0x0000028C, 0x00000002,
|
||||
0x0000000D, 0x0004003B, 0x000004A2, 0x00001548, 0x00000003, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000C, 0x00000A14, 0x00000003, 0x0004002B,
|
||||
0x0000000B, 0x00000A10, 0x00000002, 0x0004001C, 0x00000310, 0x0000000D,
|
||||
0x00000A10, 0x00040020, 0x0000058D, 0x00000003, 0x00000310, 0x0004003B,
|
||||
0x0000058D, 0x00000CDA, 0x00000003, 0x00050036, 0x00000008, 0x0000161F,
|
||||
0x00000000, 0x00000502, 0x000200F8, 0x0000606B, 0x0004003D, 0x0000000C,
|
||||
0x00004E5E, 0x000011E9, 0x00050041, 0x0000028A, 0x000027A3, 0x00000F2C,
|
||||
0x00004E5E, 0x0004003D, 0x0000000D, 0x0000579B, 0x000027A3, 0x00050041,
|
||||
0x0000028B, 0x000055D8, 0x00000CEB, 0x00004E5E, 0x0003003E, 0x000055D8,
|
||||
0x0000579B, 0x000500AA, 0x00000009, 0x00005179, 0x00004E5E, 0x00000A0B,
|
||||
0x000300F7, 0x00004C7A, 0x00000000, 0x000400FA, 0x00005179, 0x00002F61,
|
||||
0x00004C7A, 0x000200F8, 0x00002F61, 0x00060041, 0x0000028C, 0x00004722,
|
||||
0x00001342, 0x00000A0B, 0x00000A0D, 0x0004003D, 0x0000000D, 0x00003D1E,
|
||||
0x00004722, 0x00050041, 0x0000028B, 0x00004E0D, 0x00001548, 0x00000A0B,
|
||||
0x0003003E, 0x00004E0D, 0x00003D1E, 0x00050041, 0x0000028B, 0x00004D14,
|
||||
0x00001548, 0x00000A0E, 0x0003003E, 0x00004D14, 0x00003D1E, 0x00050041,
|
||||
0x0000028B, 0x00004D15, 0x00001548, 0x00000A11, 0x0003003E, 0x00004D15,
|
||||
0x00003D1E, 0x00050041, 0x0000028B, 0x00004D16, 0x00001548, 0x00000A14,
|
||||
0x0003003E, 0x00004D16, 0x00003D1E, 0x00050041, 0x0000028B, 0x00004D17,
|
||||
0x00000CDA, 0x00000A0B, 0x0003003E, 0x00004D17, 0x00003D1E, 0x00050041,
|
||||
0x0000028B, 0x00005ABC, 0x00000CDA, 0x00000A0E, 0x0003003E, 0x00005ABC,
|
||||
0x00003D1E, 0x000200F9, 0x00004C7A, 0x000200F8, 0x00004C7A, 0x000100FD,
|
||||
0x00010038,
|
||||
};
|
||||
134
src/xenia/gpu/shaders/bytecode/vulkan_spirv/continuous_triangle_1cp_hs.h
generated
Normal file
134
src/xenia/gpu/shaders/bytecode/vulkan_spirv/continuous_triangle_1cp_hs.h
generated
Normal file
@@ -0,0 +1,134 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24684
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %3307 %gl_InvocationID %3884 %gl_TessLevelOuter %gl_TessLevelInner
|
||||
OpExecutionMode %5663 OutputVertices 1
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %3884 Location 0
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%_ptr_Output__arr_float_uint_1 = OpTypePointer Output %_arr_float_uint_1
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_1 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%3884 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%5663 = OpFunction %void None %1282
|
||||
%24683 = OpLabel
|
||||
%20062 = OpLoad %int %gl_InvocationID
|
||||
%10147 = OpAccessChain %_ptr_Input_float %3884 %20062
|
||||
%22427 = OpLoad %float %10147
|
||||
%19981 = OpAccessChain %_ptr_Output_float %3307 %20062
|
||||
OpStore %19981 %22427
|
||||
%19905 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%7391 = OpLoad %float %19905
|
||||
%19982 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19982 %7391
|
||||
%19732 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19732 %7391
|
||||
%19733 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19733 %7391
|
||||
%23304 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %23304 %7391
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t continuous_triangle_1cp_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x0000606C, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000A000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00000CEB, 0x000011E9, 0x00000F2C,
|
||||
0x00001548, 0x00000CDA, 0x00040010, 0x0000161F, 0x0000001A, 0x00000001,
|
||||
0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047, 0x000011E9,
|
||||
0x0000000B, 0x00000008, 0x00040047, 0x00000F2C, 0x0000001E, 0x00000000,
|
||||
0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457, 0x00000000,
|
||||
0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001, 0x00000023,
|
||||
0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023, 0x00000010,
|
||||
0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014, 0x00050048,
|
||||
0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047, 0x00001342,
|
||||
0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022, 0x00000001,
|
||||
0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047, 0x00001548,
|
||||
0x0000000F, 0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047,
|
||||
0x00000CDA, 0x0000000F, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
|
||||
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B,
|
||||
0x00000020, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
|
||||
0x0004001C, 0x00000225, 0x0000000D, 0x00000A0D, 0x00040020, 0x000004A2,
|
||||
0x00000003, 0x00000225, 0x0004003B, 0x000004A2, 0x00000CEB, 0x00000003,
|
||||
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289,
|
||||
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001,
|
||||
0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C, 0x0000024D,
|
||||
0x0000000D, 0x00000A6A, 0x00040020, 0x000004CA, 0x00000001, 0x0000024D,
|
||||
0x0004003B, 0x000004CA, 0x00000F2C, 0x00000001, 0x00040020, 0x0000028A,
|
||||
0x00000001, 0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D,
|
||||
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011,
|
||||
0x0000000B, 0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013,
|
||||
0x0000000B, 0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002,
|
||||
0x00000457, 0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B,
|
||||
0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000028C, 0x00000002,
|
||||
0x0000000D, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004, 0x0004001C,
|
||||
0x000002B6, 0x0000000D, 0x00000A16, 0x00040020, 0x00000533, 0x00000003,
|
||||
0x000002B6, 0x0004003B, 0x00000533, 0x00001548, 0x00000003, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000B, 0x00000A10, 0x00000002, 0x0004001C,
|
||||
0x000002F2, 0x0000000D, 0x00000A10, 0x00040020, 0x0000056F, 0x00000003,
|
||||
0x000002F2, 0x0004003B, 0x0000056F, 0x00000CDA, 0x00000003, 0x00050036,
|
||||
0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x0000606B,
|
||||
0x0004003D, 0x0000000C, 0x00004E5E, 0x000011E9, 0x00050041, 0x0000028A,
|
||||
0x000027A3, 0x00000F2C, 0x00004E5E, 0x0004003D, 0x0000000D, 0x0000579B,
|
||||
0x000027A3, 0x00050041, 0x0000028B, 0x00004E0D, 0x00000CEB, 0x00004E5E,
|
||||
0x0003003E, 0x00004E0D, 0x0000579B, 0x00060041, 0x0000028C, 0x00004DC1,
|
||||
0x00001342, 0x00000A0B, 0x00000A0D, 0x0004003D, 0x0000000D, 0x00001CDF,
|
||||
0x00004DC1, 0x00050041, 0x0000028B, 0x00004E0E, 0x00001548, 0x00000A0B,
|
||||
0x0003003E, 0x00004E0E, 0x00001CDF, 0x00050041, 0x0000028B, 0x00004D14,
|
||||
0x00001548, 0x00000A0E, 0x0003003E, 0x00004D14, 0x00001CDF, 0x00050041,
|
||||
0x0000028B, 0x00004D15, 0x00001548, 0x00000A11, 0x0003003E, 0x00004D15,
|
||||
0x00001CDF, 0x00050041, 0x0000028B, 0x00005B08, 0x00000CDA, 0x00000A0B,
|
||||
0x0003003E, 0x00005B08, 0x00001CDF, 0x000100FD, 0x00010038,
|
||||
};
|
||||
146
src/xenia/gpu/shaders/bytecode/vulkan_spirv/continuous_triangle_3cp_hs.h
generated
Normal file
146
src/xenia/gpu/shaders/bytecode/vulkan_spirv/continuous_triangle_3cp_hs.h
generated
Normal file
@@ -0,0 +1,146 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24684
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %3307 %gl_InvocationID %3884 %gl_TessLevelOuter %gl_TessLevelInner
|
||||
OpExecutionMode %5663 OutputVertices 3
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %3884 Location 0
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_arr_float_uint_3 = OpTypeArray %float %uint_3
|
||||
%_ptr_Output__arr_float_uint_3 = OpTypePointer Output %_arr_float_uint_3
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_3 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%3884 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%int_0 = OpConstant %int 0
|
||||
%bool = OpTypeBool
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%5663 = OpFunction %void None %1282
|
||||
%24683 = OpLabel
|
||||
%20062 = OpLoad %int %gl_InvocationID
|
||||
%10147 = OpAccessChain %_ptr_Input_float %3884 %20062
|
||||
%22427 = OpLoad %float %10147
|
||||
%21976 = OpAccessChain %_ptr_Output_float %3307 %20062
|
||||
OpStore %21976 %22427
|
||||
%20857 = OpIEqual %bool %20062 %int_0
|
||||
OpSelectionMerge %19578 None
|
||||
OpBranchConditional %20857 %12129 %19578
|
||||
%12129 = OpLabel
|
||||
%18210 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%15646 = OpLoad %float %18210
|
||||
%19981 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19981 %15646
|
||||
%19732 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19732 %15646
|
||||
%19733 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19733 %15646
|
||||
%23228 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %23228 %15646
|
||||
OpBranch %19578
|
||||
%19578 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t continuous_triangle_3cp_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x0000606C, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000A000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00000CEB, 0x000011E9, 0x00000F2C,
|
||||
0x00001548, 0x00000CDA, 0x00040010, 0x0000161F, 0x0000001A, 0x00000003,
|
||||
0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047, 0x000011E9,
|
||||
0x0000000B, 0x00000008, 0x00040047, 0x00000F2C, 0x0000001E, 0x00000000,
|
||||
0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457, 0x00000000,
|
||||
0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001, 0x00000023,
|
||||
0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023, 0x00000010,
|
||||
0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014, 0x00050048,
|
||||
0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047, 0x00001342,
|
||||
0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022, 0x00000001,
|
||||
0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047, 0x00001548,
|
||||
0x0000000F, 0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047,
|
||||
0x00000CDA, 0x0000000F, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
|
||||
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B,
|
||||
0x00000020, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A13, 0x00000003,
|
||||
0x0004001C, 0x00000225, 0x0000000D, 0x00000A13, 0x00040020, 0x000004A2,
|
||||
0x00000003, 0x00000225, 0x0004003B, 0x000004A2, 0x00000CEB, 0x00000003,
|
||||
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289,
|
||||
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001,
|
||||
0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C, 0x0000024D,
|
||||
0x0000000D, 0x00000A6A, 0x00040020, 0x000004CA, 0x00000001, 0x0000024D,
|
||||
0x0004003B, 0x000004CA, 0x00000F2C, 0x00000001, 0x00040020, 0x0000028A,
|
||||
0x00000001, 0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D,
|
||||
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00020014, 0x00000009,
|
||||
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011,
|
||||
0x0000000B, 0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013,
|
||||
0x0000000B, 0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002,
|
||||
0x00000457, 0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B,
|
||||
0x0000000B, 0x00000A0D, 0x00000001, 0x00040020, 0x0000028C, 0x00000002,
|
||||
0x0000000D, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004, 0x0004001C,
|
||||
0x000002D4, 0x0000000D, 0x00000A16, 0x00040020, 0x00000551, 0x00000003,
|
||||
0x000002D4, 0x0004003B, 0x00000551, 0x00001548, 0x00000003, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000B, 0x00000A10, 0x00000002, 0x0004001C,
|
||||
0x00000310, 0x0000000D, 0x00000A10, 0x00040020, 0x0000058D, 0x00000003,
|
||||
0x00000310, 0x0004003B, 0x0000058D, 0x00000CDA, 0x00000003, 0x00050036,
|
||||
0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x0000606B,
|
||||
0x0004003D, 0x0000000C, 0x00004E5E, 0x000011E9, 0x00050041, 0x0000028A,
|
||||
0x000027A3, 0x00000F2C, 0x00004E5E, 0x0004003D, 0x0000000D, 0x0000579B,
|
||||
0x000027A3, 0x00050041, 0x0000028B, 0x000055D8, 0x00000CEB, 0x00004E5E,
|
||||
0x0003003E, 0x000055D8, 0x0000579B, 0x000500AA, 0x00000009, 0x00005179,
|
||||
0x00004E5E, 0x00000A0B, 0x000300F7, 0x00004C7A, 0x00000000, 0x000400FA,
|
||||
0x00005179, 0x00002F61, 0x00004C7A, 0x000200F8, 0x00002F61, 0x00060041,
|
||||
0x0000028C, 0x00004722, 0x00001342, 0x00000A0B, 0x00000A0D, 0x0004003D,
|
||||
0x0000000D, 0x00003D1E, 0x00004722, 0x00050041, 0x0000028B, 0x00004E0D,
|
||||
0x00001548, 0x00000A0B, 0x0003003E, 0x00004E0D, 0x00003D1E, 0x00050041,
|
||||
0x0000028B, 0x00004D14, 0x00001548, 0x00000A0E, 0x0003003E, 0x00004D14,
|
||||
0x00003D1E, 0x00050041, 0x0000028B, 0x00004D15, 0x00001548, 0x00000A11,
|
||||
0x0003003E, 0x00004D15, 0x00003D1E, 0x00050041, 0x0000028B, 0x00005ABC,
|
||||
0x00000CDA, 0x00000A0B, 0x0003003E, 0x00005ABC, 0x00003D1E, 0x000200F9,
|
||||
0x00004C7A, 0x000200F8, 0x00004C7A, 0x000100FD, 0x00010038,
|
||||
};
|
||||
143
src/xenia/gpu/shaders/bytecode/vulkan_spirv/discrete_quad_1cp_hs.h
generated
Normal file
143
src/xenia/gpu/shaders/bytecode/vulkan_spirv/discrete_quad_1cp_hs.h
generated
Normal file
@@ -0,0 +1,143 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24684
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %3307 %gl_InvocationID %3884 %gl_TessLevelOuter %gl_TessLevelInner
|
||||
OpExecutionMode %5663 OutputVertices 1
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %3884 Location 0
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%_ptr_Output__arr_float_uint_1 = OpTypePointer Output %_arr_float_uint_1
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_1 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%3884 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%5663 = OpFunction %void None %1282
|
||||
%24683 = OpLabel
|
||||
%20062 = OpLoad %int %gl_InvocationID
|
||||
%10147 = OpAccessChain %_ptr_Input_float %3884 %20062
|
||||
%22427 = OpLoad %float %10147
|
||||
%19981 = OpAccessChain %_ptr_Output_float %3307 %20062
|
||||
OpStore %19981 %22427
|
||||
%19905 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%7391 = OpLoad %float %19905
|
||||
%19982 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19982 %7391
|
||||
%19732 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19732 %7391
|
||||
%19733 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19733 %7391
|
||||
%19734 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_3
|
||||
OpStore %19734 %7391
|
||||
%19735 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %19735 %7391
|
||||
%23304 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_1
|
||||
OpStore %23304 %7391
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t discrete_quad_1cp_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x0000606C, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000A000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00000CEB, 0x000011E9, 0x00000F2C,
|
||||
0x00001548, 0x00000CDA, 0x00040010, 0x0000161F, 0x0000001A, 0x00000001,
|
||||
0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047, 0x000011E9,
|
||||
0x0000000B, 0x00000008, 0x00040047, 0x00000F2C, 0x0000001E, 0x00000000,
|
||||
0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457, 0x00000000,
|
||||
0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001, 0x00000023,
|
||||
0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023, 0x00000010,
|
||||
0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014, 0x00050048,
|
||||
0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047, 0x00001342,
|
||||
0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022, 0x00000001,
|
||||
0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047, 0x00001548,
|
||||
0x0000000F, 0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047,
|
||||
0x00000CDA, 0x0000000F, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
|
||||
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B,
|
||||
0x00000020, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
|
||||
0x0004001C, 0x00000225, 0x0000000D, 0x00000A0D, 0x00040020, 0x000004A2,
|
||||
0x00000003, 0x00000225, 0x0004003B, 0x000004A2, 0x00000CEB, 0x00000003,
|
||||
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289,
|
||||
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001,
|
||||
0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C, 0x0000024D,
|
||||
0x0000000D, 0x00000A6A, 0x00040020, 0x000004CA, 0x00000001, 0x0000024D,
|
||||
0x0004003B, 0x000004CA, 0x00000F2C, 0x00000001, 0x00040020, 0x0000028A,
|
||||
0x00000001, 0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D,
|
||||
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011,
|
||||
0x0000000B, 0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013,
|
||||
0x0000000B, 0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002,
|
||||
0x00000457, 0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B,
|
||||
0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000028C, 0x00000002,
|
||||
0x0000000D, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004, 0x0004001C,
|
||||
0x000002B6, 0x0000000D, 0x00000A16, 0x00040020, 0x00000533, 0x00000003,
|
||||
0x000002B6, 0x0004003B, 0x00000533, 0x00001548, 0x00000003, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000C, 0x00000A14, 0x00000003, 0x0004002B,
|
||||
0x0000000B, 0x00000A10, 0x00000002, 0x0004001C, 0x00000301, 0x0000000D,
|
||||
0x00000A10, 0x00040020, 0x0000057E, 0x00000003, 0x00000301, 0x0004003B,
|
||||
0x0000057E, 0x00000CDA, 0x00000003, 0x00050036, 0x00000008, 0x0000161F,
|
||||
0x00000000, 0x00000502, 0x000200F8, 0x0000606B, 0x0004003D, 0x0000000C,
|
||||
0x00004E5E, 0x000011E9, 0x00050041, 0x0000028A, 0x000027A3, 0x00000F2C,
|
||||
0x00004E5E, 0x0004003D, 0x0000000D, 0x0000579B, 0x000027A3, 0x00050041,
|
||||
0x0000028B, 0x00004E0D, 0x00000CEB, 0x00004E5E, 0x0003003E, 0x00004E0D,
|
||||
0x0000579B, 0x00060041, 0x0000028C, 0x00004DC1, 0x00001342, 0x00000A0B,
|
||||
0x00000A0D, 0x0004003D, 0x0000000D, 0x00001CDF, 0x00004DC1, 0x00050041,
|
||||
0x0000028B, 0x00004E0E, 0x00001548, 0x00000A0B, 0x0003003E, 0x00004E0E,
|
||||
0x00001CDF, 0x00050041, 0x0000028B, 0x00004D14, 0x00001548, 0x00000A0E,
|
||||
0x0003003E, 0x00004D14, 0x00001CDF, 0x00050041, 0x0000028B, 0x00004D15,
|
||||
0x00001548, 0x00000A11, 0x0003003E, 0x00004D15, 0x00001CDF, 0x00050041,
|
||||
0x0000028B, 0x00004D16, 0x00001548, 0x00000A14, 0x0003003E, 0x00004D16,
|
||||
0x00001CDF, 0x00050041, 0x0000028B, 0x00004D17, 0x00000CDA, 0x00000A0B,
|
||||
0x0003003E, 0x00004D17, 0x00001CDF, 0x00050041, 0x0000028B, 0x00005B08,
|
||||
0x00000CDA, 0x00000A0E, 0x0003003E, 0x00005B08, 0x00001CDF, 0x000100FD,
|
||||
0x00010038,
|
||||
};
|
||||
150
src/xenia/gpu/shaders/bytecode/vulkan_spirv/discrete_quad_4cp_hs.h
generated
Normal file
150
src/xenia/gpu/shaders/bytecode/vulkan_spirv/discrete_quad_4cp_hs.h
generated
Normal file
@@ -0,0 +1,150 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24684
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %3307 %gl_InvocationID %3884 %gl_TessLevelOuter %gl_TessLevelInner
|
||||
OpExecutionMode %5663 OutputVertices 4
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %3884 Location 0
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%3884 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%int_0 = OpConstant %int 0
|
||||
%bool = OpTypeBool
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%5663 = OpFunction %void None %1282
|
||||
%24683 = OpLabel
|
||||
%20062 = OpLoad %int %gl_InvocationID
|
||||
%10147 = OpAccessChain %_ptr_Input_float %3884 %20062
|
||||
%22427 = OpLoad %float %10147
|
||||
%21976 = OpAccessChain %_ptr_Output_float %3307 %20062
|
||||
OpStore %21976 %22427
|
||||
%20857 = OpIEqual %bool %20062 %int_0
|
||||
OpSelectionMerge %19578 None
|
||||
OpBranchConditional %20857 %12129 %19578
|
||||
%12129 = OpLabel
|
||||
%18210 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%15646 = OpLoad %float %18210
|
||||
%19981 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19981 %15646
|
||||
%19732 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19732 %15646
|
||||
%19733 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19733 %15646
|
||||
%19734 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_3
|
||||
OpStore %19734 %15646
|
||||
%19735 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %19735 %15646
|
||||
%23228 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_1
|
||||
OpStore %23228 %15646
|
||||
OpBranch %19578
|
||||
%19578 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t discrete_quad_4cp_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x0000606C, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000A000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00000CEB, 0x000011E9, 0x00000F2C,
|
||||
0x00001548, 0x00000CDA, 0x00040010, 0x0000161F, 0x0000001A, 0x00000004,
|
||||
0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047, 0x000011E9,
|
||||
0x0000000B, 0x00000008, 0x00040047, 0x00000F2C, 0x0000001E, 0x00000000,
|
||||
0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457, 0x00000000,
|
||||
0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001, 0x00000023,
|
||||
0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023, 0x00000010,
|
||||
0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014, 0x00050048,
|
||||
0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047, 0x00001342,
|
||||
0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022, 0x00000001,
|
||||
0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047, 0x00001548,
|
||||
0x0000000F, 0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047,
|
||||
0x00000CDA, 0x0000000F, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
|
||||
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B,
|
||||
0x00000020, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004,
|
||||
0x0004001C, 0x00000225, 0x0000000D, 0x00000A16, 0x00040020, 0x000004A2,
|
||||
0x00000003, 0x00000225, 0x0004003B, 0x000004A2, 0x00000CEB, 0x00000003,
|
||||
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289,
|
||||
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001,
|
||||
0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C, 0x0000024D,
|
||||
0x0000000D, 0x00000A6A, 0x00040020, 0x000004CA, 0x00000001, 0x0000024D,
|
||||
0x0004003B, 0x000004CA, 0x00000F2C, 0x00000001, 0x00040020, 0x0000028A,
|
||||
0x00000001, 0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D,
|
||||
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00020014, 0x00000009,
|
||||
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011,
|
||||
0x0000000B, 0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013,
|
||||
0x0000000B, 0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002,
|
||||
0x00000457, 0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B,
|
||||
0x0000000B, 0x00000A0D, 0x00000001, 0x00040020, 0x0000028C, 0x00000002,
|
||||
0x0000000D, 0x0004003B, 0x000004A2, 0x00001548, 0x00000003, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000C, 0x00000A14, 0x00000003, 0x0004002B,
|
||||
0x0000000B, 0x00000A10, 0x00000002, 0x0004001C, 0x00000310, 0x0000000D,
|
||||
0x00000A10, 0x00040020, 0x0000058D, 0x00000003, 0x00000310, 0x0004003B,
|
||||
0x0000058D, 0x00000CDA, 0x00000003, 0x00050036, 0x00000008, 0x0000161F,
|
||||
0x00000000, 0x00000502, 0x000200F8, 0x0000606B, 0x0004003D, 0x0000000C,
|
||||
0x00004E5E, 0x000011E9, 0x00050041, 0x0000028A, 0x000027A3, 0x00000F2C,
|
||||
0x00004E5E, 0x0004003D, 0x0000000D, 0x0000579B, 0x000027A3, 0x00050041,
|
||||
0x0000028B, 0x000055D8, 0x00000CEB, 0x00004E5E, 0x0003003E, 0x000055D8,
|
||||
0x0000579B, 0x000500AA, 0x00000009, 0x00005179, 0x00004E5E, 0x00000A0B,
|
||||
0x000300F7, 0x00004C7A, 0x00000000, 0x000400FA, 0x00005179, 0x00002F61,
|
||||
0x00004C7A, 0x000200F8, 0x00002F61, 0x00060041, 0x0000028C, 0x00004722,
|
||||
0x00001342, 0x00000A0B, 0x00000A0D, 0x0004003D, 0x0000000D, 0x00003D1E,
|
||||
0x00004722, 0x00050041, 0x0000028B, 0x00004E0D, 0x00001548, 0x00000A0B,
|
||||
0x0003003E, 0x00004E0D, 0x00003D1E, 0x00050041, 0x0000028B, 0x00004D14,
|
||||
0x00001548, 0x00000A0E, 0x0003003E, 0x00004D14, 0x00003D1E, 0x00050041,
|
||||
0x0000028B, 0x00004D15, 0x00001548, 0x00000A11, 0x0003003E, 0x00004D15,
|
||||
0x00003D1E, 0x00050041, 0x0000028B, 0x00004D16, 0x00001548, 0x00000A14,
|
||||
0x0003003E, 0x00004D16, 0x00003D1E, 0x00050041, 0x0000028B, 0x00004D17,
|
||||
0x00000CDA, 0x00000A0B, 0x0003003E, 0x00004D17, 0x00003D1E, 0x00050041,
|
||||
0x0000028B, 0x00005ABC, 0x00000CDA, 0x00000A0E, 0x0003003E, 0x00005ABC,
|
||||
0x00003D1E, 0x000200F9, 0x00004C7A, 0x000200F8, 0x00004C7A, 0x000100FD,
|
||||
0x00010038,
|
||||
};
|
||||
134
src/xenia/gpu/shaders/bytecode/vulkan_spirv/discrete_triangle_1cp_hs.h
generated
Normal file
134
src/xenia/gpu/shaders/bytecode/vulkan_spirv/discrete_triangle_1cp_hs.h
generated
Normal file
@@ -0,0 +1,134 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24684
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %3307 %gl_InvocationID %3884 %gl_TessLevelOuter %gl_TessLevelInner
|
||||
OpExecutionMode %5663 OutputVertices 1
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %3884 Location 0
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%_ptr_Output__arr_float_uint_1 = OpTypePointer Output %_arr_float_uint_1
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_1 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%3884 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%5663 = OpFunction %void None %1282
|
||||
%24683 = OpLabel
|
||||
%20062 = OpLoad %int %gl_InvocationID
|
||||
%10147 = OpAccessChain %_ptr_Input_float %3884 %20062
|
||||
%22427 = OpLoad %float %10147
|
||||
%19981 = OpAccessChain %_ptr_Output_float %3307 %20062
|
||||
OpStore %19981 %22427
|
||||
%19905 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%7391 = OpLoad %float %19905
|
||||
%19982 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19982 %7391
|
||||
%19732 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19732 %7391
|
||||
%19733 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19733 %7391
|
||||
%23304 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %23304 %7391
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t discrete_triangle_1cp_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x0000606C, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000A000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00000CEB, 0x000011E9, 0x00000F2C,
|
||||
0x00001548, 0x00000CDA, 0x00040010, 0x0000161F, 0x0000001A, 0x00000001,
|
||||
0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047, 0x000011E9,
|
||||
0x0000000B, 0x00000008, 0x00040047, 0x00000F2C, 0x0000001E, 0x00000000,
|
||||
0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457, 0x00000000,
|
||||
0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001, 0x00000023,
|
||||
0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023, 0x00000010,
|
||||
0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014, 0x00050048,
|
||||
0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047, 0x00001342,
|
||||
0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022, 0x00000001,
|
||||
0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047, 0x00001548,
|
||||
0x0000000F, 0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047,
|
||||
0x00000CDA, 0x0000000F, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
|
||||
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B,
|
||||
0x00000020, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
|
||||
0x0004001C, 0x00000225, 0x0000000D, 0x00000A0D, 0x00040020, 0x000004A2,
|
||||
0x00000003, 0x00000225, 0x0004003B, 0x000004A2, 0x00000CEB, 0x00000003,
|
||||
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289,
|
||||
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001,
|
||||
0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C, 0x0000024D,
|
||||
0x0000000D, 0x00000A6A, 0x00040020, 0x000004CA, 0x00000001, 0x0000024D,
|
||||
0x0004003B, 0x000004CA, 0x00000F2C, 0x00000001, 0x00040020, 0x0000028A,
|
||||
0x00000001, 0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D,
|
||||
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011,
|
||||
0x0000000B, 0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013,
|
||||
0x0000000B, 0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002,
|
||||
0x00000457, 0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B,
|
||||
0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000028C, 0x00000002,
|
||||
0x0000000D, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004, 0x0004001C,
|
||||
0x000002B6, 0x0000000D, 0x00000A16, 0x00040020, 0x00000533, 0x00000003,
|
||||
0x000002B6, 0x0004003B, 0x00000533, 0x00001548, 0x00000003, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000B, 0x00000A10, 0x00000002, 0x0004001C,
|
||||
0x000002F2, 0x0000000D, 0x00000A10, 0x00040020, 0x0000056F, 0x00000003,
|
||||
0x000002F2, 0x0004003B, 0x0000056F, 0x00000CDA, 0x00000003, 0x00050036,
|
||||
0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x0000606B,
|
||||
0x0004003D, 0x0000000C, 0x00004E5E, 0x000011E9, 0x00050041, 0x0000028A,
|
||||
0x000027A3, 0x00000F2C, 0x00004E5E, 0x0004003D, 0x0000000D, 0x0000579B,
|
||||
0x000027A3, 0x00050041, 0x0000028B, 0x00004E0D, 0x00000CEB, 0x00004E5E,
|
||||
0x0003003E, 0x00004E0D, 0x0000579B, 0x00060041, 0x0000028C, 0x00004DC1,
|
||||
0x00001342, 0x00000A0B, 0x00000A0D, 0x0004003D, 0x0000000D, 0x00001CDF,
|
||||
0x00004DC1, 0x00050041, 0x0000028B, 0x00004E0E, 0x00001548, 0x00000A0B,
|
||||
0x0003003E, 0x00004E0E, 0x00001CDF, 0x00050041, 0x0000028B, 0x00004D14,
|
||||
0x00001548, 0x00000A0E, 0x0003003E, 0x00004D14, 0x00001CDF, 0x00050041,
|
||||
0x0000028B, 0x00004D15, 0x00001548, 0x00000A11, 0x0003003E, 0x00004D15,
|
||||
0x00001CDF, 0x00050041, 0x0000028B, 0x00005B08, 0x00000CDA, 0x00000A0B,
|
||||
0x0003003E, 0x00005B08, 0x00001CDF, 0x000100FD, 0x00010038,
|
||||
};
|
||||
146
src/xenia/gpu/shaders/bytecode/vulkan_spirv/discrete_triangle_3cp_hs.h
generated
Normal file
146
src/xenia/gpu/shaders/bytecode/vulkan_spirv/discrete_triangle_3cp_hs.h
generated
Normal file
@@ -0,0 +1,146 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 24684
|
||||
; Schema: 0
|
||||
OpCapability Tessellation
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint TessellationControl %5663 "main" %3307 %gl_InvocationID %3884 %gl_TessLevelOuter %gl_TessLevelInner
|
||||
OpExecutionMode %5663 OutputVertices 3
|
||||
OpDecorate %3307 Location 0
|
||||
OpDecorate %gl_InvocationID BuiltIn InvocationId
|
||||
OpDecorate %3884 Location 0
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
|
||||
OpDecorate %gl_TessLevelOuter Patch
|
||||
OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
|
||||
OpDecorate %gl_TessLevelInner Patch
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_arr_float_uint_3 = OpTypeArray %float %uint_3
|
||||
%_ptr_Output__arr_float_uint_3 = OpTypePointer Output %_arr_float_uint_3
|
||||
%3307 = OpVariable %_ptr_Output__arr_float_uint_3 Output
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_InvocationID = OpVariable %_ptr_Input_int Input
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_float_uint_32 = OpTypeArray %float %uint_32
|
||||
%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
|
||||
%3884 = OpVariable %_ptr_Input__arr_float_uint_32 Input
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%int_0 = OpConstant %int 0
|
||||
%bool = OpTypeBool
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
|
||||
%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
|
||||
%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
|
||||
%5663 = OpFunction %void None %1282
|
||||
%24683 = OpLabel
|
||||
%20062 = OpLoad %int %gl_InvocationID
|
||||
%10147 = OpAccessChain %_ptr_Input_float %3884 %20062
|
||||
%22427 = OpLoad %float %10147
|
||||
%21976 = OpAccessChain %_ptr_Output_float %3307 %20062
|
||||
OpStore %21976 %22427
|
||||
%20857 = OpIEqual %bool %20062 %int_0
|
||||
OpSelectionMerge %19578 None
|
||||
OpBranchConditional %20857 %12129 %19578
|
||||
%12129 = OpLabel
|
||||
%18210 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%15646 = OpLoad %float %18210
|
||||
%19981 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
|
||||
OpStore %19981 %15646
|
||||
%19732 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
|
||||
OpStore %19732 %15646
|
||||
%19733 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
|
||||
OpStore %19733 %15646
|
||||
%23228 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
|
||||
OpStore %23228 %15646
|
||||
OpBranch %19578
|
||||
%19578 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t discrete_triangle_3cp_hs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x0000606C, 0x00000000, 0x00020011,
|
||||
0x00000003, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x000A000F, 0x00000001,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00000CEB, 0x000011E9, 0x00000F2C,
|
||||
0x00001548, 0x00000CDA, 0x00040010, 0x0000161F, 0x0000001A, 0x00000003,
|
||||
0x00040047, 0x00000CEB, 0x0000001E, 0x00000000, 0x00040047, 0x000011E9,
|
||||
0x0000000B, 0x00000008, 0x00040047, 0x00000F2C, 0x0000001E, 0x00000000,
|
||||
0x00030047, 0x00000457, 0x00000002, 0x00050048, 0x00000457, 0x00000000,
|
||||
0x00000023, 0x00000000, 0x00050048, 0x00000457, 0x00000001, 0x00000023,
|
||||
0x00000008, 0x00050048, 0x00000457, 0x00000002, 0x00000023, 0x00000010,
|
||||
0x00050048, 0x00000457, 0x00000003, 0x00000023, 0x00000014, 0x00050048,
|
||||
0x00000457, 0x00000004, 0x00000023, 0x00000018, 0x00040047, 0x00001342,
|
||||
0x00000021, 0x00000006, 0x00040047, 0x00001342, 0x00000022, 0x00000001,
|
||||
0x00040047, 0x00001548, 0x0000000B, 0x0000000B, 0x00030047, 0x00001548,
|
||||
0x0000000F, 0x00040047, 0x00000CDA, 0x0000000B, 0x0000000C, 0x00030047,
|
||||
0x00000CDA, 0x0000000F, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
|
||||
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040015, 0x0000000B,
|
||||
0x00000020, 0x00000000, 0x0004002B, 0x0000000B, 0x00000A13, 0x00000003,
|
||||
0x0004001C, 0x00000225, 0x0000000D, 0x00000A13, 0x00040020, 0x000004A2,
|
||||
0x00000003, 0x00000225, 0x0004003B, 0x000004A2, 0x00000CEB, 0x00000003,
|
||||
0x00040015, 0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289,
|
||||
0x00000001, 0x0000000C, 0x0004003B, 0x00000289, 0x000011E9, 0x00000001,
|
||||
0x0004002B, 0x0000000B, 0x00000A6A, 0x00000020, 0x0004001C, 0x0000024D,
|
||||
0x0000000D, 0x00000A6A, 0x00040020, 0x000004CA, 0x00000001, 0x0000024D,
|
||||
0x0004003B, 0x000004CA, 0x00000F2C, 0x00000001, 0x00040020, 0x0000028A,
|
||||
0x00000001, 0x0000000D, 0x00040020, 0x0000028B, 0x00000003, 0x0000000D,
|
||||
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00020014, 0x00000009,
|
||||
0x00040017, 0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011,
|
||||
0x0000000B, 0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013,
|
||||
0x0000000B, 0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002,
|
||||
0x00000457, 0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B,
|
||||
0x0000000B, 0x00000A0D, 0x00000001, 0x00040020, 0x0000028C, 0x00000002,
|
||||
0x0000000D, 0x0004002B, 0x0000000B, 0x00000A16, 0x00000004, 0x0004001C,
|
||||
0x000002D4, 0x0000000D, 0x00000A16, 0x00040020, 0x00000551, 0x00000003,
|
||||
0x000002D4, 0x0004003B, 0x00000551, 0x00001548, 0x00000003, 0x0004002B,
|
||||
0x0000000C, 0x00000A0E, 0x00000001, 0x0004002B, 0x0000000C, 0x00000A11,
|
||||
0x00000002, 0x0004002B, 0x0000000B, 0x00000A10, 0x00000002, 0x0004001C,
|
||||
0x00000310, 0x0000000D, 0x00000A10, 0x00040020, 0x0000058D, 0x00000003,
|
||||
0x00000310, 0x0004003B, 0x0000058D, 0x00000CDA, 0x00000003, 0x00050036,
|
||||
0x00000008, 0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x0000606B,
|
||||
0x0004003D, 0x0000000C, 0x00004E5E, 0x000011E9, 0x00050041, 0x0000028A,
|
||||
0x000027A3, 0x00000F2C, 0x00004E5E, 0x0004003D, 0x0000000D, 0x0000579B,
|
||||
0x000027A3, 0x00050041, 0x0000028B, 0x000055D8, 0x00000CEB, 0x00004E5E,
|
||||
0x0003003E, 0x000055D8, 0x0000579B, 0x000500AA, 0x00000009, 0x00005179,
|
||||
0x00004E5E, 0x00000A0B, 0x000300F7, 0x00004C7A, 0x00000000, 0x000400FA,
|
||||
0x00005179, 0x00002F61, 0x00004C7A, 0x000200F8, 0x00002F61, 0x00060041,
|
||||
0x0000028C, 0x00004722, 0x00001342, 0x00000A0B, 0x00000A0D, 0x0004003D,
|
||||
0x0000000D, 0x00003D1E, 0x00004722, 0x00050041, 0x0000028B, 0x00004E0D,
|
||||
0x00001548, 0x00000A0B, 0x0003003E, 0x00004E0D, 0x00003D1E, 0x00050041,
|
||||
0x0000028B, 0x00004D14, 0x00001548, 0x00000A0E, 0x0003003E, 0x00004D14,
|
||||
0x00003D1E, 0x00050041, 0x0000028B, 0x00004D15, 0x00001548, 0x00000A11,
|
||||
0x0003003E, 0x00004D15, 0x00003D1E, 0x00050041, 0x0000028B, 0x00005ABC,
|
||||
0x00000CDA, 0x00000A0B, 0x0003003E, 0x00005ABC, 0x00003D1E, 0x000200F9,
|
||||
0x00004C7A, 0x000200F8, 0x00004C7A, 0x000100FD, 0x00010038,
|
||||
};
|
||||
203
src/xenia/gpu/shaders/bytecode/vulkan_spirv/tessellation_adaptive_vs.h
generated
Normal file
203
src/xenia/gpu/shaders/bytecode/vulkan_spirv/tessellation_adaptive_vs.h
generated
Normal file
@@ -0,0 +1,203 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 25239
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %5663 "main" %gl_VertexIndex %5229
|
||||
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %5229 Location 0
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%bool = OpTypeBool
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%uint_16711935 = OpConstant %uint 16711935
|
||||
%uint_8 = OpConstant %uint 8
|
||||
%uint_4278255360 = OpConstant %uint 4278255360
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_255 = OpConstant %uint 255
|
||||
%uint_24 = OpConstant %uint 24
|
||||
%uint_65280 = OpConstant %uint 65280
|
||||
%uint_16711680 = OpConstant %uint 16711680
|
||||
%uint_4278190080 = OpConstant %uint 4278190080
|
||||
%uint_65535 = OpConstant %uint 65535
|
||||
%uint_16 = OpConstant %uint 16
|
||||
%uint_4294901760 = OpConstant %uint 4294901760
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_VertexIndex = OpVariable %_ptr_Input_int Input
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%5229 = OpVariable %_ptr_Output_float Output
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%5663 = OpFunction %void None %1282
|
||||
%6733 = OpLabel
|
||||
%9931 = OpLoad %int %gl_VertexIndex
|
||||
%15381 = OpBitcast %uint %9931
|
||||
%9656 = OpAccessChain %_ptr_Uniform_uint %4930 %int_2
|
||||
%22442 = OpLoad %uint %9656
|
||||
OpSelectionMerge %10204 None
|
||||
OpSwitch %uint_0 %16320
|
||||
%16320 = OpLabel
|
||||
%23197 = OpIEqual %bool %22442 %uint_0
|
||||
OpSelectionMerge %25238 None
|
||||
OpBranchConditional %23197 %11868 %16569
|
||||
%16569 = OpLabel
|
||||
%19162 = OpIEqual %bool %22442 %uint_1
|
||||
OpSelectionMerge %13164 None
|
||||
OpBranchConditional %19162 %19530 %16570
|
||||
%16570 = OpLabel
|
||||
%19163 = OpIEqual %bool %22442 %uint_2
|
||||
OpSelectionMerge %13163 None
|
||||
OpBranchConditional %19163 %21863 %10583
|
||||
%10583 = OpLabel
|
||||
%18271 = OpBitwiseAnd %uint %15381 %uint_65535
|
||||
%9425 = OpShiftLeftLogical %uint %18271 %uint_16
|
||||
%20652 = OpBitwiseAnd %uint %15381 %uint_4294901760
|
||||
%17549 = OpShiftRightLogical %uint %20652 %uint_16
|
||||
%16376 = OpBitwiseOr %uint %9425 %17549
|
||||
OpBranch %10204
|
||||
%21863 = OpLabel
|
||||
%20693 = OpBitwiseAnd %uint %15381 %uint_255
|
||||
%9463 = OpShiftLeftLogical %uint %20693 %uint_24
|
||||
%20306 = OpBitwiseAnd %uint %15381 %uint_65280
|
||||
%19284 = OpShiftLeftLogical %uint %20306 %uint_8
|
||||
%17045 = OpBitwiseOr %uint %9463 %19284
|
||||
%21212 = OpBitwiseAnd %uint %15381 %uint_16711680
|
||||
%20634 = OpShiftRightLogical %uint %21212 %uint_8
|
||||
%24000 = OpBitwiseOr %uint %17045 %20634
|
||||
%19599 = OpBitwiseAnd %uint %15381 %uint_4278190080
|
||||
%21584 = OpShiftRightLogical %uint %19599 %uint_24
|
||||
%16377 = OpBitwiseOr %uint %24000 %21584
|
||||
OpBranch %10204
|
||||
%13163 = OpLabel
|
||||
OpUnreachable
|
||||
%19530 = OpLabel
|
||||
%19075 = OpBitwiseAnd %uint %15381 %uint_16711935
|
||||
%9426 = OpShiftLeftLogical %uint %19075 %uint_8
|
||||
%20653 = OpBitwiseAnd %uint %15381 %uint_4278255360
|
||||
%17550 = OpShiftRightLogical %uint %20653 %uint_8
|
||||
%16378 = OpBitwiseOr %uint %9426 %17550
|
||||
OpBranch %10204
|
||||
%13164 = OpLabel
|
||||
OpUnreachable
|
||||
%11868 = OpLabel
|
||||
OpBranch %10204
|
||||
%25238 = OpLabel
|
||||
OpUnreachable
|
||||
%10204 = OpLabel
|
||||
%15672 = OpPhi %uint %15381 %11868 %16378 %19530 %16377 %21863 %16376 %10583
|
||||
%24496 = OpBitcast %float %15672
|
||||
%21708 = OpFAdd %float %24496 %float_1
|
||||
%7335 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_0
|
||||
%12980 = OpLoad %float %7335
|
||||
%19190 = OpAccessChain %_ptr_Uniform_float %4930 %int_0 %uint_1
|
||||
%10126 = OpLoad %float %19190
|
||||
%23029 = OpExtInst %float %1 FClamp %21708 %12980 %10126
|
||||
OpStore %5229 %23029
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t tessellation_adaptive_vs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x00006297, 0x00000000, 0x00020011,
|
||||
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0007000F, 0x00000000,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00001029, 0x0000146D, 0x00040047,
|
||||
0x00001029, 0x0000000B, 0x0000002A, 0x00030047, 0x00000457, 0x00000002,
|
||||
0x00050048, 0x00000457, 0x00000000, 0x00000023, 0x00000000, 0x00050048,
|
||||
0x00000457, 0x00000001, 0x00000023, 0x00000008, 0x00050048, 0x00000457,
|
||||
0x00000002, 0x00000023, 0x00000010, 0x00050048, 0x00000457, 0x00000003,
|
||||
0x00000023, 0x00000014, 0x00050048, 0x00000457, 0x00000004, 0x00000023,
|
||||
0x00000018, 0x00040047, 0x00001342, 0x00000021, 0x00000006, 0x00040047,
|
||||
0x00001342, 0x00000022, 0x00000001, 0x00040047, 0x0000146D, 0x0000001E,
|
||||
0x00000000, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
|
||||
0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x0004002B, 0x0000000B,
|
||||
0x00000A0A, 0x00000000, 0x00020014, 0x00000009, 0x0004002B, 0x0000000B,
|
||||
0x00000A0D, 0x00000001, 0x0004002B, 0x0000000B, 0x000008A6, 0x00FF00FF,
|
||||
0x0004002B, 0x0000000B, 0x00000A22, 0x00000008, 0x0004002B, 0x0000000B,
|
||||
0x000005FD, 0xFF00FF00, 0x0004002B, 0x0000000B, 0x00000A10, 0x00000002,
|
||||
0x0004002B, 0x0000000B, 0x00000144, 0x000000FF, 0x0004002B, 0x0000000B,
|
||||
0x00000A52, 0x00000018, 0x0004002B, 0x0000000B, 0x00000A87, 0x0000FF00,
|
||||
0x0004002B, 0x0000000B, 0x000005A9, 0x00FF0000, 0x0004002B, 0x0000000B,
|
||||
0x00000580, 0xFF000000, 0x0004002B, 0x0000000B, 0x000001C1, 0x0000FFFF,
|
||||
0x0004002B, 0x0000000B, 0x00000A3A, 0x00000010, 0x0004002B, 0x0000000B,
|
||||
0x0000068D, 0xFFFF0000, 0x00040015, 0x0000000C, 0x00000020, 0x00000001,
|
||||
0x00040020, 0x00000289, 0x00000001, 0x0000000C, 0x0004003B, 0x00000289,
|
||||
0x00001029, 0x00000001, 0x00030016, 0x0000000D, 0x00000020, 0x00040017,
|
||||
0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011, 0x0000000B,
|
||||
0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013, 0x0000000B,
|
||||
0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002, 0x00000457,
|
||||
0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B, 0x0000000C,
|
||||
0x00000A11, 0x00000002, 0x00040020, 0x00000288, 0x00000002, 0x0000000B,
|
||||
0x0004002B, 0x0000000D, 0x0000008A, 0x3F800000, 0x00040020, 0x0000028A,
|
||||
0x00000003, 0x0000000D, 0x0004003B, 0x0000028A, 0x0000146D, 0x00000003,
|
||||
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000028B,
|
||||
0x00000002, 0x0000000D, 0x00050036, 0x00000008, 0x0000161F, 0x00000000,
|
||||
0x00000502, 0x000200F8, 0x00001A4D, 0x0004003D, 0x0000000C, 0x000026CB,
|
||||
0x00001029, 0x0004007C, 0x0000000B, 0x00003C15, 0x000026CB, 0x00050041,
|
||||
0x00000288, 0x000025B8, 0x00001342, 0x00000A11, 0x0004003D, 0x0000000B,
|
||||
0x000057AA, 0x000025B8, 0x000300F7, 0x000027DC, 0x00000000, 0x000300FB,
|
||||
0x00000A0A, 0x00003FC0, 0x000200F8, 0x00003FC0, 0x000500AA, 0x00000009,
|
||||
0x00005A9D, 0x000057AA, 0x00000A0A, 0x000300F7, 0x00006296, 0x00000000,
|
||||
0x000400FA, 0x00005A9D, 0x00002E5C, 0x000040B9, 0x000200F8, 0x000040B9,
|
||||
0x000500AA, 0x00000009, 0x00004ADA, 0x000057AA, 0x00000A0D, 0x000300F7,
|
||||
0x0000336C, 0x00000000, 0x000400FA, 0x00004ADA, 0x00004C4A, 0x000040BA,
|
||||
0x000200F8, 0x000040BA, 0x000500AA, 0x00000009, 0x00004ADB, 0x000057AA,
|
||||
0x00000A10, 0x000300F7, 0x0000336B, 0x00000000, 0x000400FA, 0x00004ADB,
|
||||
0x00005567, 0x00002957, 0x000200F8, 0x00002957, 0x000500C7, 0x0000000B,
|
||||
0x0000475F, 0x00003C15, 0x000001C1, 0x000500C4, 0x0000000B, 0x000024D1,
|
||||
0x0000475F, 0x00000A3A, 0x000500C7, 0x0000000B, 0x000050AC, 0x00003C15,
|
||||
0x0000068D, 0x000500C2, 0x0000000B, 0x0000448D, 0x000050AC, 0x00000A3A,
|
||||
0x000500C5, 0x0000000B, 0x00003FF8, 0x000024D1, 0x0000448D, 0x000200F9,
|
||||
0x000027DC, 0x000200F8, 0x00005567, 0x000500C7, 0x0000000B, 0x000050D5,
|
||||
0x00003C15, 0x00000144, 0x000500C4, 0x0000000B, 0x000024F7, 0x000050D5,
|
||||
0x00000A52, 0x000500C7, 0x0000000B, 0x00004F52, 0x00003C15, 0x00000A87,
|
||||
0x000500C4, 0x0000000B, 0x00004B54, 0x00004F52, 0x00000A22, 0x000500C5,
|
||||
0x0000000B, 0x00004295, 0x000024F7, 0x00004B54, 0x000500C7, 0x0000000B,
|
||||
0x000052DC, 0x00003C15, 0x000005A9, 0x000500C2, 0x0000000B, 0x0000509A,
|
||||
0x000052DC, 0x00000A22, 0x000500C5, 0x0000000B, 0x00005DC0, 0x00004295,
|
||||
0x0000509A, 0x000500C7, 0x0000000B, 0x00004C8F, 0x00003C15, 0x00000580,
|
||||
0x000500C2, 0x0000000B, 0x00005450, 0x00004C8F, 0x00000A52, 0x000500C5,
|
||||
0x0000000B, 0x00003FF9, 0x00005DC0, 0x00005450, 0x000200F9, 0x000027DC,
|
||||
0x000200F8, 0x0000336B, 0x000100FF, 0x000200F8, 0x00004C4A, 0x000500C7,
|
||||
0x0000000B, 0x00004A83, 0x00003C15, 0x000008A6, 0x000500C4, 0x0000000B,
|
||||
0x000024D2, 0x00004A83, 0x00000A22, 0x000500C7, 0x0000000B, 0x000050AD,
|
||||
0x00003C15, 0x000005FD, 0x000500C2, 0x0000000B, 0x0000448E, 0x000050AD,
|
||||
0x00000A22, 0x000500C5, 0x0000000B, 0x00003FFA, 0x000024D2, 0x0000448E,
|
||||
0x000200F9, 0x000027DC, 0x000200F8, 0x0000336C, 0x000100FF, 0x000200F8,
|
||||
0x00002E5C, 0x000200F9, 0x000027DC, 0x000200F8, 0x00006296, 0x000100FF,
|
||||
0x000200F8, 0x000027DC, 0x000B00F5, 0x0000000B, 0x00003D38, 0x00003C15,
|
||||
0x00002E5C, 0x00003FFA, 0x00004C4A, 0x00003FF9, 0x00005567, 0x00003FF8,
|
||||
0x00002957, 0x0004007C, 0x0000000D, 0x00005FB0, 0x00003D38, 0x00050081,
|
||||
0x0000000D, 0x000054CC, 0x00005FB0, 0x0000008A, 0x00060041, 0x0000028B,
|
||||
0x00001CA7, 0x00001342, 0x00000A0B, 0x00000A0A, 0x0004003D, 0x0000000D,
|
||||
0x000032B4, 0x00001CA7, 0x00060041, 0x0000028B, 0x00004AF6, 0x00001342,
|
||||
0x00000A0B, 0x00000A0D, 0x0004003D, 0x0000000D, 0x0000278E, 0x00004AF6,
|
||||
0x0008000C, 0x0000000D, 0x000059F5, 0x00000001, 0x0000002B, 0x000054CC,
|
||||
0x000032B4, 0x0000278E, 0x0003003E, 0x0000146D, 0x000059F5, 0x000100FD,
|
||||
0x00010038,
|
||||
};
|
||||
208
src/xenia/gpu/shaders/bytecode/vulkan_spirv/tessellation_indexed_vs.h
generated
Normal file
208
src/xenia/gpu/shaders/bytecode/vulkan_spirv/tessellation_indexed_vs.h
generated
Normal file
@@ -0,0 +1,208 @@
|
||||
// Generated with `xb buildshaders`.
|
||||
#if 0
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 25239
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %5663 "main" %gl_VertexIndex %3307
|
||||
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
|
||||
OpDecorate %_struct_1111 Block
|
||||
OpMemberDecorate %_struct_1111 0 Offset 0
|
||||
OpMemberDecorate %_struct_1111 1 Offset 8
|
||||
OpMemberDecorate %_struct_1111 2 Offset 16
|
||||
OpMemberDecorate %_struct_1111 3 Offset 20
|
||||
OpMemberDecorate %_struct_1111 4 Offset 24
|
||||
OpDecorate %4930 Binding 6
|
||||
OpDecorate %4930 DescriptorSet 1
|
||||
OpDecorate %3307 Location 0
|
||||
%void = OpTypeVoid
|
||||
%1282 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%bool = OpTypeBool
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%uint_16711935 = OpConstant %uint 16711935
|
||||
%uint_8 = OpConstant %uint 8
|
||||
%uint_4278255360 = OpConstant %uint 4278255360
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_255 = OpConstant %uint 255
|
||||
%uint_24 = OpConstant %uint 24
|
||||
%uint_65280 = OpConstant %uint 65280
|
||||
%uint_16711680 = OpConstant %uint 16711680
|
||||
%uint_4278190080 = OpConstant %uint 4278190080
|
||||
%uint_65535 = OpConstant %uint 65535
|
||||
%uint_16 = OpConstant %uint 16
|
||||
%uint_4294901760 = OpConstant %uint 4294901760
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_VertexIndex = OpVariable %_ptr_Input_int Input
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_struct_1111 = OpTypeStruct %v2float %v2float %uint %uint %v2uint
|
||||
%_ptr_Uniform__struct_1111 = OpTypePointer Uniform %_struct_1111
|
||||
%4930 = OpVariable %_ptr_Uniform__struct_1111 Uniform
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%3307 = OpVariable %_ptr_Output_float Output
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_16777215 = OpConstant %uint 16777215
|
||||
%int_4 = OpConstant %int 4
|
||||
%5663 = OpFunction %void None %1282
|
||||
%6733 = OpLabel
|
||||
%9931 = OpLoad %int %gl_VertexIndex
|
||||
%15381 = OpBitcast %uint %9931
|
||||
%9656 = OpAccessChain %_ptr_Uniform_uint %4930 %int_2
|
||||
%22442 = OpLoad %uint %9656
|
||||
OpSelectionMerge %9083 None
|
||||
OpSwitch %uint_0 %16320
|
||||
%16320 = OpLabel
|
||||
%23197 = OpIEqual %bool %22442 %uint_0
|
||||
OpSelectionMerge %25238 None
|
||||
OpBranchConditional %23197 %11868 %16569
|
||||
%16569 = OpLabel
|
||||
%19162 = OpIEqual %bool %22442 %uint_1
|
||||
OpSelectionMerge %13164 None
|
||||
OpBranchConditional %19162 %19530 %16570
|
||||
%16570 = OpLabel
|
||||
%19163 = OpIEqual %bool %22442 %uint_2
|
||||
OpSelectionMerge %13163 None
|
||||
OpBranchConditional %19163 %21863 %10583
|
||||
%10583 = OpLabel
|
||||
%18271 = OpBitwiseAnd %uint %15381 %uint_65535
|
||||
%9425 = OpShiftLeftLogical %uint %18271 %uint_16
|
||||
%20652 = OpBitwiseAnd %uint %15381 %uint_4294901760
|
||||
%17549 = OpShiftRightLogical %uint %20652 %uint_16
|
||||
%16376 = OpBitwiseOr %uint %9425 %17549
|
||||
OpBranch %9083
|
||||
%21863 = OpLabel
|
||||
%20693 = OpBitwiseAnd %uint %15381 %uint_255
|
||||
%9463 = OpShiftLeftLogical %uint %20693 %uint_24
|
||||
%20306 = OpBitwiseAnd %uint %15381 %uint_65280
|
||||
%19284 = OpShiftLeftLogical %uint %20306 %uint_8
|
||||
%17045 = OpBitwiseOr %uint %9463 %19284
|
||||
%21212 = OpBitwiseAnd %uint %15381 %uint_16711680
|
||||
%20634 = OpShiftRightLogical %uint %21212 %uint_8
|
||||
%24000 = OpBitwiseOr %uint %17045 %20634
|
||||
%19599 = OpBitwiseAnd %uint %15381 %uint_4278190080
|
||||
%21584 = OpShiftRightLogical %uint %19599 %uint_24
|
||||
%16377 = OpBitwiseOr %uint %24000 %21584
|
||||
OpBranch %9083
|
||||
%13163 = OpLabel
|
||||
OpUnreachable
|
||||
%19530 = OpLabel
|
||||
%19075 = OpBitwiseAnd %uint %15381 %uint_16711935
|
||||
%9426 = OpShiftLeftLogical %uint %19075 %uint_8
|
||||
%20653 = OpBitwiseAnd %uint %15381 %uint_4278255360
|
||||
%17550 = OpShiftRightLogical %uint %20653 %uint_8
|
||||
%16378 = OpBitwiseOr %uint %9426 %17550
|
||||
OpBranch %9083
|
||||
%13164 = OpLabel
|
||||
OpUnreachable
|
||||
%11868 = OpLabel
|
||||
OpBranch %9083
|
||||
%25238 = OpLabel
|
||||
OpUnreachable
|
||||
%9083 = OpLabel
|
||||
%24587 = OpPhi %uint %15381 %11868 %16378 %19530 %16377 %21863 %16376 %10583
|
||||
%24998 = OpAccessChain %_ptr_Uniform_uint %4930 %int_3
|
||||
%8159 = OpLoad %uint %24998
|
||||
%7652 = OpIAdd %uint %24587 %8159
|
||||
%18847 = OpBitwiseAnd %uint %7652 %uint_16777215
|
||||
%10702 = OpAccessChain %_ptr_Uniform_uint %4930 %int_4 %uint_0
|
||||
%24236 = OpLoad %uint %10702
|
||||
%19191 = OpAccessChain %_ptr_Uniform_uint %4930 %int_4 %uint_1
|
||||
%22108 = OpLoad %uint %19191
|
||||
%23723 = OpExtInst %uint %1 UClamp %18847 %24236 %22108
|
||||
%9576 = OpConvertUToF %float %23723
|
||||
OpStore %3307 %9576
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
#endif
|
||||
|
||||
const uint32_t tessellation_indexed_vs[] = {
|
||||
0x07230203, 0x00010000, 0x0008000B, 0x00006297, 0x00000000, 0x00020011,
|
||||
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
|
||||
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0007000F, 0x00000000,
|
||||
0x0000161F, 0x6E69616D, 0x00000000, 0x00001029, 0x00000CEB, 0x00040047,
|
||||
0x00001029, 0x0000000B, 0x0000002A, 0x00030047, 0x00000457, 0x00000002,
|
||||
0x00050048, 0x00000457, 0x00000000, 0x00000023, 0x00000000, 0x00050048,
|
||||
0x00000457, 0x00000001, 0x00000023, 0x00000008, 0x00050048, 0x00000457,
|
||||
0x00000002, 0x00000023, 0x00000010, 0x00050048, 0x00000457, 0x00000003,
|
||||
0x00000023, 0x00000014, 0x00050048, 0x00000457, 0x00000004, 0x00000023,
|
||||
0x00000018, 0x00040047, 0x00001342, 0x00000021, 0x00000006, 0x00040047,
|
||||
0x00001342, 0x00000022, 0x00000001, 0x00040047, 0x00000CEB, 0x0000001E,
|
||||
0x00000000, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
|
||||
0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x0004002B, 0x0000000B,
|
||||
0x00000A0A, 0x00000000, 0x00020014, 0x00000009, 0x0004002B, 0x0000000B,
|
||||
0x00000A0D, 0x00000001, 0x0004002B, 0x0000000B, 0x000008A6, 0x00FF00FF,
|
||||
0x0004002B, 0x0000000B, 0x00000A22, 0x00000008, 0x0004002B, 0x0000000B,
|
||||
0x000005FD, 0xFF00FF00, 0x0004002B, 0x0000000B, 0x00000A10, 0x00000002,
|
||||
0x0004002B, 0x0000000B, 0x00000144, 0x000000FF, 0x0004002B, 0x0000000B,
|
||||
0x00000A52, 0x00000018, 0x0004002B, 0x0000000B, 0x00000A87, 0x0000FF00,
|
||||
0x0004002B, 0x0000000B, 0x000005A9, 0x00FF0000, 0x0004002B, 0x0000000B,
|
||||
0x00000580, 0xFF000000, 0x0004002B, 0x0000000B, 0x000001C1, 0x0000FFFF,
|
||||
0x0004002B, 0x0000000B, 0x00000A3A, 0x00000010, 0x0004002B, 0x0000000B,
|
||||
0x0000068D, 0xFFFF0000, 0x00040015, 0x0000000C, 0x00000020, 0x00000001,
|
||||
0x00040020, 0x00000289, 0x00000001, 0x0000000C, 0x0004003B, 0x00000289,
|
||||
0x00001029, 0x00000001, 0x00030016, 0x0000000D, 0x00000020, 0x00040017,
|
||||
0x00000013, 0x0000000D, 0x00000002, 0x00040017, 0x00000011, 0x0000000B,
|
||||
0x00000002, 0x0007001E, 0x00000457, 0x00000013, 0x00000013, 0x0000000B,
|
||||
0x0000000B, 0x00000011, 0x00040020, 0x000006D4, 0x00000002, 0x00000457,
|
||||
0x0004003B, 0x000006D4, 0x00001342, 0x00000002, 0x0004002B, 0x0000000C,
|
||||
0x00000A11, 0x00000002, 0x00040020, 0x00000288, 0x00000002, 0x0000000B,
|
||||
0x00040020, 0x0000028A, 0x00000003, 0x0000000D, 0x0004003B, 0x0000028A,
|
||||
0x00000CEB, 0x00000003, 0x0004002B, 0x0000000C, 0x00000A14, 0x00000003,
|
||||
0x0004002B, 0x0000000B, 0x00000923, 0x00FFFFFF, 0x0004002B, 0x0000000C,
|
||||
0x00000A17, 0x00000004, 0x00050036, 0x00000008, 0x0000161F, 0x00000000,
|
||||
0x00000502, 0x000200F8, 0x00001A4D, 0x0004003D, 0x0000000C, 0x000026CB,
|
||||
0x00001029, 0x0004007C, 0x0000000B, 0x00003C15, 0x000026CB, 0x00050041,
|
||||
0x00000288, 0x000025B8, 0x00001342, 0x00000A11, 0x0004003D, 0x0000000B,
|
||||
0x000057AA, 0x000025B8, 0x000300F7, 0x0000237B, 0x00000000, 0x000300FB,
|
||||
0x00000A0A, 0x00003FC0, 0x000200F8, 0x00003FC0, 0x000500AA, 0x00000009,
|
||||
0x00005A9D, 0x000057AA, 0x00000A0A, 0x000300F7, 0x00006296, 0x00000000,
|
||||
0x000400FA, 0x00005A9D, 0x00002E5C, 0x000040B9, 0x000200F8, 0x000040B9,
|
||||
0x000500AA, 0x00000009, 0x00004ADA, 0x000057AA, 0x00000A0D, 0x000300F7,
|
||||
0x0000336C, 0x00000000, 0x000400FA, 0x00004ADA, 0x00004C4A, 0x000040BA,
|
||||
0x000200F8, 0x000040BA, 0x000500AA, 0x00000009, 0x00004ADB, 0x000057AA,
|
||||
0x00000A10, 0x000300F7, 0x0000336B, 0x00000000, 0x000400FA, 0x00004ADB,
|
||||
0x00005567, 0x00002957, 0x000200F8, 0x00002957, 0x000500C7, 0x0000000B,
|
||||
0x0000475F, 0x00003C15, 0x000001C1, 0x000500C4, 0x0000000B, 0x000024D1,
|
||||
0x0000475F, 0x00000A3A, 0x000500C7, 0x0000000B, 0x000050AC, 0x00003C15,
|
||||
0x0000068D, 0x000500C2, 0x0000000B, 0x0000448D, 0x000050AC, 0x00000A3A,
|
||||
0x000500C5, 0x0000000B, 0x00003FF8, 0x000024D1, 0x0000448D, 0x000200F9,
|
||||
0x0000237B, 0x000200F8, 0x00005567, 0x000500C7, 0x0000000B, 0x000050D5,
|
||||
0x00003C15, 0x00000144, 0x000500C4, 0x0000000B, 0x000024F7, 0x000050D5,
|
||||
0x00000A52, 0x000500C7, 0x0000000B, 0x00004F52, 0x00003C15, 0x00000A87,
|
||||
0x000500C4, 0x0000000B, 0x00004B54, 0x00004F52, 0x00000A22, 0x000500C5,
|
||||
0x0000000B, 0x00004295, 0x000024F7, 0x00004B54, 0x000500C7, 0x0000000B,
|
||||
0x000052DC, 0x00003C15, 0x000005A9, 0x000500C2, 0x0000000B, 0x0000509A,
|
||||
0x000052DC, 0x00000A22, 0x000500C5, 0x0000000B, 0x00005DC0, 0x00004295,
|
||||
0x0000509A, 0x000500C7, 0x0000000B, 0x00004C8F, 0x00003C15, 0x00000580,
|
||||
0x000500C2, 0x0000000B, 0x00005450, 0x00004C8F, 0x00000A52, 0x000500C5,
|
||||
0x0000000B, 0x00003FF9, 0x00005DC0, 0x00005450, 0x000200F9, 0x0000237B,
|
||||
0x000200F8, 0x0000336B, 0x000100FF, 0x000200F8, 0x00004C4A, 0x000500C7,
|
||||
0x0000000B, 0x00004A83, 0x00003C15, 0x000008A6, 0x000500C4, 0x0000000B,
|
||||
0x000024D2, 0x00004A83, 0x00000A22, 0x000500C7, 0x0000000B, 0x000050AD,
|
||||
0x00003C15, 0x000005FD, 0x000500C2, 0x0000000B, 0x0000448E, 0x000050AD,
|
||||
0x00000A22, 0x000500C5, 0x0000000B, 0x00003FFA, 0x000024D2, 0x0000448E,
|
||||
0x000200F9, 0x0000237B, 0x000200F8, 0x0000336C, 0x000100FF, 0x000200F8,
|
||||
0x00002E5C, 0x000200F9, 0x0000237B, 0x000200F8, 0x00006296, 0x000100FF,
|
||||
0x000200F8, 0x0000237B, 0x000B00F5, 0x0000000B, 0x0000600B, 0x00003C15,
|
||||
0x00002E5C, 0x00003FFA, 0x00004C4A, 0x00003FF9, 0x00005567, 0x00003FF8,
|
||||
0x00002957, 0x00050041, 0x00000288, 0x000061A6, 0x00001342, 0x00000A14,
|
||||
0x0004003D, 0x0000000B, 0x00001FDF, 0x000061A6, 0x00050080, 0x0000000B,
|
||||
0x00001DE4, 0x0000600B, 0x00001FDF, 0x000500C7, 0x0000000B, 0x0000499F,
|
||||
0x00001DE4, 0x00000923, 0x00060041, 0x00000288, 0x000029CE, 0x00001342,
|
||||
0x00000A17, 0x00000A0A, 0x0004003D, 0x0000000B, 0x00005EAC, 0x000029CE,
|
||||
0x00060041, 0x00000288, 0x00004AF7, 0x00001342, 0x00000A17, 0x00000A0D,
|
||||
0x0004003D, 0x0000000B, 0x0000565C, 0x00004AF7, 0x0008000C, 0x0000000B,
|
||||
0x00005CAB, 0x00000001, 0x0000002C, 0x0000499F, 0x00005EAC, 0x0000565C,
|
||||
0x00040070, 0x0000000D, 0x00002568, 0x00005CAB, 0x0003003E, 0x00000CEB,
|
||||
0x00002568, 0x000100FD, 0x00010038,
|
||||
};
|
||||
43
src/xenia/gpu/shaders/continuous_quad_1cp.hs.glsl
Normal file
43
src/xenia/gpu/shaders/continuous_quad_1cp.hs.glsl
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for continuous quad tessellation with 1 control
|
||||
// point (patch indexed).
|
||||
// Uses fractional_even spacing for smooth tessellation.
|
||||
|
||||
layout(vertices = 1) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - vertex index as float.
|
||||
layout(location = 0) in float in_index[];
|
||||
|
||||
// Output to tessellation evaluation shader - vertex index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Pass through the vertex index.
|
||||
out_index[gl_InvocationID] = in_index[gl_InvocationID];
|
||||
|
||||
// Set tessellation levels (only one invocation for 1cp).
|
||||
// 1.0 already added to the factor on the CPU, according to the images in
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
// (fractional_even also requires a factor of at least 2.0).
|
||||
float factor = xe_tessellation_factor_range.y;
|
||||
|
||||
gl_TessLevelOuter[0] = factor;
|
||||
gl_TessLevelOuter[1] = factor;
|
||||
gl_TessLevelOuter[2] = factor;
|
||||
gl_TessLevelOuter[3] = factor;
|
||||
gl_TessLevelInner[0] = factor;
|
||||
gl_TessLevelInner[1] = factor;
|
||||
}
|
||||
45
src/xenia/gpu/shaders/continuous_quad_4cp.hs.glsl
Normal file
45
src/xenia/gpu/shaders/continuous_quad_4cp.hs.glsl
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for continuous quad tessellation with 4 control
|
||||
// points (control point indexed).
|
||||
// Uses fractional_even spacing for smooth tessellation.
|
||||
|
||||
layout(vertices = 4) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - vertex index as float.
|
||||
layout(location = 0) in float in_index[];
|
||||
|
||||
// Output to tessellation evaluation shader - vertex index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Pass through the vertex index.
|
||||
out_index[gl_InvocationID] = in_index[gl_InvocationID];
|
||||
|
||||
// Set tessellation levels (only needs to be done by one invocation).
|
||||
if (gl_InvocationID == 0) {
|
||||
// 1.0 already added to the factor on the CPU, according to the images in
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
// (fractional_even also requires a factor of at least 2.0).
|
||||
float factor = xe_tessellation_factor_range.y;
|
||||
|
||||
gl_TessLevelOuter[0] = factor;
|
||||
gl_TessLevelOuter[1] = factor;
|
||||
gl_TessLevelOuter[2] = factor;
|
||||
gl_TessLevelOuter[3] = factor;
|
||||
gl_TessLevelInner[0] = factor;
|
||||
gl_TessLevelInner[1] = factor;
|
||||
}
|
||||
}
|
||||
41
src/xenia/gpu/shaders/continuous_triangle_1cp.hs.glsl
Normal file
41
src/xenia/gpu/shaders/continuous_triangle_1cp.hs.glsl
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for continuous triangle tessellation with 1
|
||||
// control point (patch indexed).
|
||||
// Uses fractional_even spacing for smooth tessellation.
|
||||
|
||||
layout(vertices = 1) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - vertex index as float.
|
||||
layout(location = 0) in float in_index[];
|
||||
|
||||
// Output to tessellation evaluation shader - vertex index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Pass through the vertex index.
|
||||
out_index[gl_InvocationID] = in_index[gl_InvocationID];
|
||||
|
||||
// Set tessellation levels (only one invocation for 1cp).
|
||||
// 1.0 already added to the factor on the CPU, according to the images in
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
// (fractional_even also requires a factor of at least 2.0).
|
||||
float factor = xe_tessellation_factor_range.y;
|
||||
|
||||
gl_TessLevelOuter[0] = factor;
|
||||
gl_TessLevelOuter[1] = factor;
|
||||
gl_TessLevelOuter[2] = factor;
|
||||
gl_TessLevelInner[0] = factor;
|
||||
}
|
||||
43
src/xenia/gpu/shaders/continuous_triangle_3cp.hs.glsl
Normal file
43
src/xenia/gpu/shaders/continuous_triangle_3cp.hs.glsl
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for continuous triangle tessellation with 3
|
||||
// control points (control point indexed).
|
||||
// Uses fractional_even spacing for smooth tessellation.
|
||||
|
||||
layout(vertices = 3) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - vertex index as float.
|
||||
layout(location = 0) in float in_index[];
|
||||
|
||||
// Output to tessellation evaluation shader - vertex index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Pass through the vertex index.
|
||||
out_index[gl_InvocationID] = in_index[gl_InvocationID];
|
||||
|
||||
// Set tessellation levels (only needs to be done by one invocation).
|
||||
if (gl_InvocationID == 0) {
|
||||
// 1.0 already added to the factor on the CPU, according to the images in
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
// (fractional_even also requires a factor of at least 2.0).
|
||||
float factor = xe_tessellation_factor_range.y;
|
||||
|
||||
gl_TessLevelOuter[0] = factor;
|
||||
gl_TessLevelOuter[1] = factor;
|
||||
gl_TessLevelOuter[2] = factor;
|
||||
gl_TessLevelInner[0] = factor;
|
||||
}
|
||||
}
|
||||
41
src/xenia/gpu/shaders/discrete_quad_1cp.hs.glsl
Normal file
41
src/xenia/gpu/shaders/discrete_quad_1cp.hs.glsl
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for discrete quad tessellation with 1 control
|
||||
// point (patch indexed).
|
||||
|
||||
layout(vertices = 1) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - vertex index as float.
|
||||
layout(location = 0) in float in_index[];
|
||||
|
||||
// Output to tessellation evaluation shader - vertex index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Pass through the vertex index.
|
||||
out_index[gl_InvocationID] = in_index[gl_InvocationID];
|
||||
|
||||
// Set tessellation levels (only one invocation for 1cp).
|
||||
// 1.0 already added to the factor on the CPU, according to the images in
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
float factor = xe_tessellation_factor_range.y;
|
||||
|
||||
gl_TessLevelOuter[0] = factor;
|
||||
gl_TessLevelOuter[1] = factor;
|
||||
gl_TessLevelOuter[2] = factor;
|
||||
gl_TessLevelOuter[3] = factor;
|
||||
gl_TessLevelInner[0] = factor;
|
||||
gl_TessLevelInner[1] = factor;
|
||||
}
|
||||
43
src/xenia/gpu/shaders/discrete_quad_4cp.hs.glsl
Normal file
43
src/xenia/gpu/shaders/discrete_quad_4cp.hs.glsl
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for discrete quad tessellation with 4 control
|
||||
// points (control point indexed).
|
||||
|
||||
layout(vertices = 4) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - vertex index as float.
|
||||
layout(location = 0) in float in_index[];
|
||||
|
||||
// Output to tessellation evaluation shader - vertex index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Pass through the vertex index.
|
||||
out_index[gl_InvocationID] = in_index[gl_InvocationID];
|
||||
|
||||
// Set tessellation levels (only needs to be done by one invocation).
|
||||
if (gl_InvocationID == 0) {
|
||||
// 1.0 already added to the factor on the CPU, according to the images in
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
float factor = xe_tessellation_factor_range.y;
|
||||
|
||||
gl_TessLevelOuter[0] = factor;
|
||||
gl_TessLevelOuter[1] = factor;
|
||||
gl_TessLevelOuter[2] = factor;
|
||||
gl_TessLevelOuter[3] = factor;
|
||||
gl_TessLevelInner[0] = factor;
|
||||
gl_TessLevelInner[1] = factor;
|
||||
}
|
||||
}
|
||||
44
src/xenia/gpu/shaders/discrete_triangle_1cp.hs.glsl
Normal file
44
src/xenia/gpu/shaders/discrete_triangle_1cp.hs.glsl
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for discrete triangle tessellation with 1 control
|
||||
// point (patch indexed).
|
||||
|
||||
layout(vertices = 1) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - vertex index as float.
|
||||
layout(location = 0) in float in_index[];
|
||||
|
||||
// Output to tessellation evaluation shader - vertex index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Pass through the vertex index.
|
||||
out_index[gl_InvocationID] = in_index[gl_InvocationID];
|
||||
|
||||
// Set tessellation levels (only one invocation for 1cp).
|
||||
// Xenos creates a uniform grid for triangles, but this can't be reproduced
|
||||
// using the tessellator on the PC, so just use what has the closest level
|
||||
// of detail.
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
//
|
||||
// 1.0 already added to the factor on the CPU, according to the images in
|
||||
// the slides above.
|
||||
float factor = xe_tessellation_factor_range.y;
|
||||
|
||||
gl_TessLevelOuter[0] = factor;
|
||||
gl_TessLevelOuter[1] = factor;
|
||||
gl_TessLevelOuter[2] = factor;
|
||||
gl_TessLevelInner[0] = factor;
|
||||
}
|
||||
46
src/xenia/gpu/shaders/discrete_triangle_3cp.hs.glsl
Normal file
46
src/xenia/gpu/shaders/discrete_triangle_3cp.hs.glsl
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Tessellation control shader for discrete triangle tessellation with 3 control
|
||||
// points (control point indexed).
|
||||
|
||||
layout(vertices = 3) out;
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Input from vertex shader - vertex index as float.
|
||||
layout(location = 0) in float in_index[];
|
||||
|
||||
// Output to tessellation evaluation shader - vertex index as float.
|
||||
layout(location = 0) out float out_index[];
|
||||
|
||||
void main() {
|
||||
// Pass through the vertex index.
|
||||
out_index[gl_InvocationID] = in_index[gl_InvocationID];
|
||||
|
||||
// Set tessellation levels (only needs to be done by one invocation).
|
||||
if (gl_InvocationID == 0) {
|
||||
// Xenos creates a uniform grid for triangles, but this can't be reproduced
|
||||
// using the tessellator on the PC, so just use what has the closest level
|
||||
// of detail.
|
||||
// https://www.slideshare.net/blackdevilvikas/next-generation-graphics-programming-on-xbox-360
|
||||
//
|
||||
// 1.0 already added to the factor on the CPU, according to the images in
|
||||
// the slides above.
|
||||
float factor = xe_tessellation_factor_range.y;
|
||||
|
||||
gl_TessLevelOuter[0] = factor;
|
||||
gl_TessLevelOuter[1] = factor;
|
||||
gl_TessLevelOuter[2] = factor;
|
||||
gl_TessLevelInner[0] = factor;
|
||||
}
|
||||
}
|
||||
BIN
src/xenia/gpu/shaders/tesc.spv
Normal file
BIN
src/xenia/gpu/shaders/tesc.spv
Normal file
Binary file not shown.
55
src/xenia/gpu/shaders/tessellation_adaptive.vs.glsl
Normal file
55
src/xenia/gpu/shaders/tessellation_adaptive.vs.glsl
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Vertex shader for adaptive tessellation.
|
||||
// Reads edge tessellation factors from the index buffer (as float32) and passes
|
||||
// them to the tessellation control shader.
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Output to tessellation control shader - edge tessellation factor.
|
||||
layout(location = 0) out float out_edge_factor;
|
||||
|
||||
// Endian swap for 32-bit value.
|
||||
uint XeEndianSwap32(uint value, uint endian) {
|
||||
if (endian == 0u) {
|
||||
// No swap.
|
||||
return value;
|
||||
} else if (endian == 1u) {
|
||||
// 8-in-16.
|
||||
return ((value & 0x00FF00FFu) << 8u) | ((value & 0xFF00FF00u) >> 8u);
|
||||
} else if (endian == 2u) {
|
||||
// 8-in-32.
|
||||
return ((value & 0x000000FFu) << 24u) | ((value & 0x0000FF00u) << 8u) |
|
||||
((value & 0x00FF0000u) >> 8u) | ((value & 0xFF000000u) >> 24u);
|
||||
} else {
|
||||
// 16-in-32.
|
||||
return ((value & 0x0000FFFFu) << 16u) | ((value & 0xFFFF0000u) >> 16u);
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
// The Xbox 360's GPU accepts the float32 tessellation factors for edges
|
||||
// through a special kind of an index buffer.
|
||||
// While 4D5307F2 sets the factors to 0 for frustum-culled (quad) patches, in
|
||||
// 4D5307E6 only allowing patches with factors above 0 makes distant
|
||||
// (triangle) patches disappear - it appears that there are no special values
|
||||
// for culled patches on the Xbox 360 (unlike zero, negative and NaN on
|
||||
// Direct3D 11).
|
||||
//
|
||||
// The vertex index (gl_VertexIndex) contains the raw edge factor bits from
|
||||
// the index buffer. We need to endian swap and interpret as float.
|
||||
uint factor_bits = XeEndianSwap32(uint(gl_VertexIndex), xe_vertex_index_endian);
|
||||
float factor = uintBitsToFloat(factor_bits) + 1.0;
|
||||
out_edge_factor = clamp(factor, xe_tessellation_factor_range.x,
|
||||
xe_tessellation_factor_range.y);
|
||||
}
|
||||
46
src/xenia/gpu/shaders/tessellation_indexed.vs.glsl
Normal file
46
src/xenia/gpu/shaders/tessellation_indexed.vs.glsl
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#version 460
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
|
||||
// Vertex shader for indexed tessellation (discrete/continuous modes).
|
||||
// Passes the vertex index to the tessellation control shader.
|
||||
|
||||
#include "xenos_draw.glsli"
|
||||
|
||||
// Output to tessellation control shader - vertex index as float.
|
||||
layout(location = 0) out float out_index;
|
||||
|
||||
// Endian swap for 32-bit value.
|
||||
uint XeEndianSwap32(uint value, uint endian) {
|
||||
if (endian == 0u) {
|
||||
// No swap.
|
||||
return value;
|
||||
} else if (endian == 1u) {
|
||||
// 8-in-16.
|
||||
return ((value & 0x00FF00FFu) << 8u) | ((value & 0xFF00FF00u) >> 8u);
|
||||
} else if (endian == 2u) {
|
||||
// 8-in-32.
|
||||
return ((value & 0x000000FFu) << 24u) | ((value & 0x0000FF00u) << 8u) |
|
||||
((value & 0x00FF0000u) >> 8u) | ((value & 0xFF000000u) >> 24u);
|
||||
} else {
|
||||
// 16-in-32.
|
||||
return ((value & 0x0000FFFFu) << 16u) | ((value & 0xFFFF0000u) >> 16u);
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
// Only the lower 24 bits of the vertex index are used (tested on an Adreno
|
||||
// 200 phone). `((index & 0xFFFFFF) + offset) & 0xFFFFFF` is the same as
|
||||
// `(index + offset) & 0xFFFFFF`.
|
||||
uint vertex_index = XeEndianSwap32(uint(gl_VertexIndex), xe_vertex_index_endian);
|
||||
out_index = float(clamp((vertex_index + xe_vertex_index_offset) & 0xFFFFFFu,
|
||||
xe_vertex_index_min_max.x, xe_vertex_index_min_max.y));
|
||||
}
|
||||
BIN
src/xenia/gpu/shaders/vert.spv
Normal file
BIN
src/xenia/gpu/shaders/vert.spv
Normal file
Binary file not shown.
37
src/xenia/gpu/shaders/xenos_draw.glsli
Normal file
37
src/xenia/gpu/shaders/xenos_draw.glsli
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_GPU_SHADERS_XENOS_DRAW_GLSLI_
|
||||
#define XENIA_GPU_SHADERS_XENOS_DRAW_GLSLI_
|
||||
|
||||
// Tessellation constants for Vulkan tessellation shaders.
|
||||
// This is a separate constant buffer dedicated to tessellation, not part of
|
||||
// the main system constants, to avoid changing the existing SystemConstants
|
||||
// layout.
|
||||
//
|
||||
// Binding: set 1 (kDescriptorSetConstants), binding 6 (after the existing
|
||||
// constant buffers:
|
||||
// 0 = System, 1 = FloatVertex, 2 = FloatPixel, 3 = BoolLoop, 4 = Fetch,
|
||||
// 5 = ClipPlanes, 6 = Tessellation)
|
||||
|
||||
layout(std140, set = 1, binding = 6) uniform XeTessellationConstants {
|
||||
// Tessellation factor range: .x = min, .y = max.
|
||||
// 1.0 is added on the CPU according to Xbox 360 tessellation documentation.
|
||||
// For fractional_even partitioning, minimum factor must be >= 2.0.
|
||||
vec2 xe_tessellation_factor_range;
|
||||
// Padding to align next member to 8 bytes (std140 rules).
|
||||
vec2 xe_tessellation_padding0;
|
||||
|
||||
// Vertex/index processing parameters.
|
||||
uint xe_vertex_index_endian;
|
||||
uint xe_vertex_index_offset;
|
||||
uvec2 xe_vertex_index_min_max;
|
||||
};
|
||||
|
||||
#endif // XENIA_GPU_SHADERS_XENOS_DRAW_GLSLI_
|
||||
Reference in New Issue
Block a user