From 5a079a2d114f96d4847d1ee305d5b7c16eeec50e Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 27 Dec 2025 12:03:39 -0800 Subject: Initial commit --- .../render/direct3d12/D3D12_PixelShader_Advanced.h | 1389 ++++++++++++++++++++ 1 file changed, 1389 insertions(+) create mode 100644 contrib/SDL-3.2.8/src/render/direct3d12/D3D12_PixelShader_Advanced.h (limited to 'contrib/SDL-3.2.8/src/render/direct3d12/D3D12_PixelShader_Advanced.h') diff --git a/contrib/SDL-3.2.8/src/render/direct3d12/D3D12_PixelShader_Advanced.h b/contrib/SDL-3.2.8/src/render/direct3d12/D3D12_PixelShader_Advanced.h new file mode 100644 index 0000000..b8f40fe --- /dev/null +++ b/contrib/SDL-3.2.8/src/render/direct3d12/D3D12_PixelShader_Advanced.h @@ -0,0 +1,1389 @@ +#if 0 +; +; Input signature: +; +; Name Index Mask Register SysValue Format Used +; -------------------- ----- ------ -------- -------- ------- ------ +; SV_Position 0 xyzw 0 POS float +; TEXCOORD 0 xy 1 NONE float xy +; COLOR 0 xyzw 2 NONE float xyzw +; +; +; Output signature: +; +; Name Index Mask Register SysValue Format Used +; -------------------- ----- ------ -------- -------- ------- ------ +; SV_Target 0 xyzw 0 TARGET float xyzw +; +; shader hash: f6874446eaee41c102142c02d5bb3ab7 +; +; Pipeline Runtime Information: +; +; Pixel Shader +; DepthOutput=0 +; SampleFrequency=0 +; +; +; Input signature: +; +; Name Index InterpMode DynIdx +; -------------------- ----- ---------------------- ------ +; SV_Position 0 noperspective +; TEXCOORD 0 linear +; COLOR 0 linear +; +; Output signature: +; +; Name Index InterpMode DynIdx +; -------------------- ----- ---------------------- ------ +; SV_Target 0 +; +; Buffer Definitions: +; +; cbuffer Constants +; { +; +; struct Constants +; { +; +; float scRGB_output; ; Offset: 0 +; float texture_type; ; Offset: 4 +; float input_type; ; Offset: 8 +; float color_scale; ; Offset: 12 +; float tonemap_method; ; Offset: 16 +; float tonemap_factor1; ; Offset: 20 +; float tonemap_factor2; ; Offset: 24 +; float sdr_white_point; ; Offset: 28 +; float4 Yoffset; ; Offset: 32 +; float4 Rcoeff; ; Offset: 48 +; float4 Gcoeff; ; Offset: 64 +; float4 Bcoeff; ; Offset: 80 +; +; } Constants; ; Offset: 0 Size: 96 +; +; } +; +; +; Resource Bindings: +; +; Name Type Format Dim ID HLSL Bind Count +; ------------------------------ ---------- ------- ----------- ------- -------------- ------ +; Constants cbuffer NA NA CB0 cb1 1 +; sampler0 sampler NA NA S0 s0 1 +; texture0 texture f32 2d T0 t0 1 +; texture1 texture f32 2d T1 t1 1 +; texture2 texture f32 2d T2 t2 1 +; +; +; ViewId state: +; +; Number of inputs: 12, outputs: 4 +; Outputs dependent on ViewId: { } +; Inputs contributing to computation of Outputs: +; output 0 depends on inputs: { 4, 5, 8 } +; output 1 depends on inputs: { 4, 5, 9 } +; output 2 depends on inputs: { 4, 5, 10 } +; output 3 depends on inputs: { 4, 5, 11 } +; +target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64" +target triple = "dxil-ms-dx" + +%dx.types.Handle = type { i8* } +%dx.types.CBufRet.f32 = type { float, float, float, float } +%dx.types.ResRet.f32 = type { float, float, float, float, i32 } +%"class.Texture2D >" = type { <4 x float>, %"class.Texture2D >::mips_type" } +%"class.Texture2D >::mips_type" = type { i32 } +%Constants = type { float, float, float, float, float, float, float, float, <4 x float>, <4 x float>, <4 x float>, <4 x float> } +%struct.SamplerState = type { i32 } + +define void @main() { + %1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 2, i32 2, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex) + %2 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 1, i32 1, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex) + %3 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex) + %4 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 3, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex) + %5 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 1, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex) + %6 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis) + %7 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis) + %8 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis) + %9 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 3, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis) + %10 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis) + %11 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis) + %12 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %5, i32 0) ; CBufferLoadLegacy(handle,regIndex) + %13 = extractvalue %dx.types.CBufRet.f32 %12, 1 + %14 = fcmp fast oeq float %13, 0.000000e+00 + br i1 %14, label %114, label %15 + +;