mirror of
				https://gitlab.winehq.org/wine/vkd3d.git
				synced 2025-09-12 18:50:22 -07:00 
			
		
		
		
	The location of dxcompiler should be set during configuration with 'DXCOMPILER_LIBS=-L/path/to/dxcompiler', and then at runtime with LD_LIBRARY_PATH, WINEPATH or PATH as applicable. A new 'fail(sm<6)' decoration is needed on many shader declarations because dxcompiler succeeds on many shaders which fail with fxc. The opposite case is less common and is flagged with 'fail(sm>=6)'. A few tests cause dxcompiler to crash or hang, so these are avoided using [require], which now skips tests until reset instead of exiting. Also, 'todo(sm<6)' and 'todo(sm>=6)' are used to separate checking of results.
		
			
				
	
	
		
			108 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			108 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| [require]
 | |
| shader model >= 5.0
 | |
| 
 | |
| % UAVs are implicitly allocated starting from the highest render target slot.
 | |
| % They cannot overlap render target slots, and also cannot be allocated any
 | |
| % lower than the highest render target.
 | |
| % This ceases to be true with shader model 5.1.
 | |
| 
 | |
| [render target 1]
 | |
| format r32g32b32a32 float
 | |
| size (640, 480)
 | |
| 
 | |
| [pixel shader]
 | |
| struct s
 | |
| {
 | |
|     float3 a;
 | |
| };
 | |
| 
 | |
| RWBuffer<float4> u : register(u2);
 | |
| RWBuffer<float> u1;
 | |
| RWBuffer<float2x2> u2;
 | |
| RWBuffer<struct s> u3;
 | |
| 
 | |
| float4 main() : sv_target1
 | |
| {
 | |
|     u[0] = float4(11.1, 12.2, 13.3, 14.4);
 | |
|     return 0;
 | |
| }
 | |
| 
 | |
| % Type size is too wide
 | |
| [pixel shader fail]
 | |
| struct s
 | |
| {
 | |
|     float3 a;
 | |
|     float2 b;
 | |
| };
 | |
| RWBuffer<struct s> u;
 | |
| 
 | |
| float4 main() : sv_target1
 | |
| {
 | |
|     return 0;
 | |
| }
 | |
| 
 | |
| [pixel shader fail(sm<6) todo]
 | |
| RWBuffer<double3> u;
 | |
| 
 | |
| float4 main() : sv_target1
 | |
| {
 | |
|     return 0;
 | |
| }
 | |
| 
 | |
| [pixel shader]
 | |
| RWBuffer<double2> u;
 | |
| 
 | |
| float4 main() : sv_target1
 | |
| {
 | |
|     return 0;
 | |
| }
 | |
| 
 | |
| % Array type
 | |
| [pixel shader fail(sm<6)]
 | |
| typedef float arr[2];
 | |
| RWBuffer<arr> u;
 | |
| 
 | |
| float4 main() : sv_target1
 | |
| {
 | |
|     return 0;
 | |
| }
 | |
| 
 | |
| % Object types
 | |
| [pixel shader fail(sm<6)]
 | |
| RWBuffer<Texture2D> u;
 | |
| 
 | |
| float4 main() : sv_target1
 | |
| {
 | |
|     return 0;
 | |
| }
 | |
| 
 | |
| [pixel shader fail]
 | |
| struct s
 | |
| {
 | |
|     Texture2D t;
 | |
| };
 | |
| RWBuffer<struct s> u;
 | |
| 
 | |
| float4 main() : sv_target1
 | |
| {
 | |
|     return 0;
 | |
| }
 | |
| 
 | |
| [buffer uav 2]
 | |
| size (1, 1)
 | |
| 
 | |
| 0.1 0.2 0.3 0.4
 | |
| 
 | |
| [pixel shader]
 | |
| RWBuffer<float4> u : register(u2);
 | |
| 
 | |
| float4 main() : sv_target1
 | |
| {
 | |
|     u[0] = float4(11.1, 12.2, 13.3, 14.4);
 | |
|     return 0;
 | |
| }
 | |
| 
 | |
| [test]
 | |
| todo(sm>=6) draw quad
 | |
| probe buffer uav 2 (0, 0) rgba (11.1, 12.2, 13.3, 14.4)
 |