Don't use roundEven() to implement round() in DX9 compatibility mode

This commit is contained in:
rdb 2020-11-05 17:53:38 +01:00
parent a5be11bd8b
commit 589aaff11c
7 changed files with 145 additions and 1 deletions

View file

@ -0,0 +1,60 @@
hlsl.round.dx10.frag
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:2 Function Definition: PixelShaderFunction(vf4; ( temp 4-component vector of float)
0:2 Function Parameters:
0:2 'input' ( in 4-component vector of float)
0:? Sequence
0:3 Branch: Return with expression
0:3 roundEven ( temp 4-component vector of float)
0:3 'input' ( in 4-component vector of float)
0:? Linker Objects
Linked fragment stage:
WARNING: Linking fragment stage: Entry point not found
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:2 Function Definition: PixelShaderFunction(vf4; ( temp 4-component vector of float)
0:2 Function Parameters:
0:2 'input' ( in 4-component vector of float)
0:? Sequence
0:3 Branch: Return with expression
0:3 roundEven ( temp 4-component vector of float)
0:3 'input' ( in 4-component vector of float)
0:? Linker Objects
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 17
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
Name 11 "PixelShaderFunction(vf4;"
Name 10 "input"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Function 7(fvec4)
9: TypeFunction 7(fvec4) 8(ptr)
4(main): 2 Function None 3
5: Label
Return
FunctionEnd
11(PixelShaderFunction(vf4;): 7(fvec4) Function None 9
10(input): 8(ptr) FunctionParameter
12: Label
13: 7(fvec4) Load 10(input)
14: 7(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 13
ReturnValue 14
FunctionEnd