tests/shader-runner: Test shaders with dxcompiler.

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.
This commit is contained in:
Conor McCarthy 2023-09-14 19:29:24 +10:00 committed by Alexandre Julliard
parent d211160b89
commit 57280673e5
Notes: Alexandre Julliard 2023-10-11 22:53:48 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/346
133 changed files with 1284 additions and 572 deletions

View File

@ -14,7 +14,8 @@ widl_headers = \
include/vkd3d_dxgi1_4.h \ include/vkd3d_dxgi1_4.h \
include/vkd3d_dxgibase.h \ include/vkd3d_dxgibase.h \
include/vkd3d_dxgiformat.h \ include/vkd3d_dxgiformat.h \
include/vkd3d_dxgitype.h include/vkd3d_dxgitype.h \
tests/dxcompiler.h
vkd3d_public_headers = \ vkd3d_public_headers = \
include/vkd3d.h \ include/vkd3d.h \
@ -181,6 +182,7 @@ vkd3d_shader_tests = \
tests/hlsl/uav-rwbuffer.shader_test \ tests/hlsl/uav-rwbuffer.shader_test \
tests/hlsl/uav-rwstructuredbuffer.shader_test \ tests/hlsl/uav-rwstructuredbuffer.shader_test \
tests/hlsl/uav-rwtexture.shader_test \ tests/hlsl/uav-rwtexture.shader_test \
tests/hlsl/uniform-parameters.shader_test \
tests/hlsl/uniform-semantics.shader_test \ tests/hlsl/uniform-semantics.shader_test \
tests/hlsl/vector-indexing-uniform.shader_test \ tests/hlsl/vector-indexing-uniform.shader_test \
tests/hlsl/vector-indexing.shader_test \ tests/hlsl/vector-indexing.shader_test \
@ -198,6 +200,7 @@ vkd3d_shader_tests = \
vkd3d_test_headers = \ vkd3d_test_headers = \
tests/d3d12_crosstest.h \ tests/d3d12_crosstest.h \
tests/d3d12_test_utils.h \ tests/d3d12_test_utils.h \
tests/dxcompiler.h \
tests/shader_runner.h \ tests/shader_runner.h \
tests/utils.h \ tests/utils.h \
tests/vulkan_procs.h tests/vulkan_procs.h
@ -380,6 +383,7 @@ tests_d3d12_LDADD = $(LDADD) @PTHREAD_LIBS@ @DL_LIBS@
tests_d3d12_invalid_usage_LDADD = $(LDADD) @DL_LIBS@ tests_d3d12_invalid_usage_LDADD = $(LDADD) @DL_LIBS@
tests_hlsl_d3d12_LDADD = $(LDADD) @DL_LIBS@ tests_hlsl_d3d12_LDADD = $(LDADD) @DL_LIBS@
tests_shader_runner_LDADD = $(LDADD) @DL_LIBS@ tests_shader_runner_LDADD = $(LDADD) @DL_LIBS@
tests_shader_runner_CFLAGS = $(AM_CFLAGS) -I$(builddir)/tests
tests_shader_runner_SOURCES = \ tests_shader_runner_SOURCES = \
tests/shader_runner.c \ tests/shader_runner.c \
tests/shader_runner_d3d9.c \ tests/shader_runner_d3d9.c \
@ -420,7 +424,7 @@ endif
EXTRA_DIST += $(widl_headers) $(widl_headers:.h=.idl) EXTRA_DIST += $(widl_headers) $(widl_headers:.h=.idl)
$(widl_headers): %.h: %.idl $(widl_headers): %.h: %.idl
if HAVE_WIDL if HAVE_WIDL
$(VKD3D_V_WIDL)$(WIDL) -h -o $@ $< $(VKD3D_V_WIDL)$(WIDL) -I$(srcdir)/include -h -o $@ $<
else else
@echo "widl is required to generate $@" @echo "widl is required to generate $@"
endif endif
@ -464,7 +468,7 @@ dummy-vkd3d-version:
## Cross-compile tests ## Cross-compile tests
cross_implibs = crosslibs/d3d12 cross_implibs = crosslibs/d3d12
CROSS_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/include CROSS_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/include -I$(builddir)/tests
CROSS_CFLAGS = -g -O2 -Wall -municode ${CROSS_CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=0 -DVKD3D_CROSSTEST=1 CROSS_CFLAGS = -g -O2 -Wall -municode ${CROSS_CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=0 -DVKD3D_CROSSTEST=1
EXTRA_DIST += $(cross_implibs:=.cross32.def) $(cross_implibs:=.cross64.def) EXTRA_DIST += $(cross_implibs:=.cross32.def) $(cross_implibs:=.cross64.def)
EXTRA_DIST += tests/shader_runner_d3d11.c tests/shader_runner_d3d9.c EXTRA_DIST += tests/shader_runner_d3d11.c tests/shader_runner_d3d9.c

10
README
View File

@ -83,6 +83,16 @@ commas or semicolons.
* VKD3D_TEST_BUG - set to 0 to disable bug_if() conditions in tests. * VKD3D_TEST_BUG - set to 0 to disable bug_if() conditions in tests.
If the configuration defines 'DXCOMPILER_LIBS=-L/path/to/dxcompiler', Shader
Runner attempts to load libdxcompiler.so or dxcompiler.dll to compile test
shaders in Shader Model 6. LD_LIBRARY_PATH (linux), WINEPATH (wine) or PATH
(native windows) should include the location of dxcompiler if SM 6 shader
tests are desired. If dxcompiler is not found, Shader Runner will compile the
test shaders only in earlier shader models. The DXC source does not contain
code for adding DXBC checksums, so the official release should be installed
from:
https://github.com/microsoft/DirectXShaderCompiler/releases
================ ================
Developing vkd3d Developing vkd3d
================ ================

View File

@ -120,6 +120,12 @@ AS_IF([test "x$SONAME_LIBVULKAN" = "x"],
[VKD3D_CHECK_VULKAN], [VKD3D_CHECK_VULKAN],
[AC_DEFINE_UNQUOTED([SONAME_LIBVULKAN],["$SONAME_LIBVULKAN"],[Define to the shared object name of the Vulkan library.])]) [AC_DEFINE_UNQUOTED([SONAME_LIBVULKAN],["$SONAME_LIBVULKAN"],[Define to the shared object name of the Vulkan library.])])
AC_ARG_VAR([SONAME_LIBDXCOMPILER], [shared object name for the dxcompiler library])
AC_ARG_VAR([DXCOMPILER_LIBS], [linker flags for the dxcompiler library])
AS_IF([test "x$SONAME_LIBDXCOMPILER" = "x"],
[VKD3D_CHECK_SONAME([dxcompiler], [DxcCreateInstance], [HAVE_DXCOMPILER=yes], [HAVE_DXCOMPILER=no], [$DXCOMPILER_LIBS])],
[AC_DEFINE_UNQUOTED([SONAME_LIBDXCOMPILER],["$SONAME_LIBDXCOMPILER"],[Define to the shared object name of the dxcompiler library.])])
AS_IF([test "x$with_ncurses" != "xno"], AS_IF([test "x$with_ncurses" != "xno"],
[PKG_CHECK_MODULES([NCURSES], [ncurses], [PKG_CHECK_MODULES([NCURSES], [ncurses],
[AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if you have ncurses.]) with_ncurses=yes], [AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if you have ncurses.]) with_ncurses=yes],
@ -183,6 +189,7 @@ AS_ECHO(["
Have ncurses: ${with_ncurses} Have ncurses: ${with_ncurses}
Have SPIRV-Tools: ${with_spirv_tools} Have SPIRV-Tools: ${with_spirv_tools}
Have xcb: ${HAVE_XCB} Have xcb: ${HAVE_XCB}
Have dxcompiler: ${HAVE_DXCOMPILER}
Building demos: ${enable_demos} Building demos: ${enable_demos}
Building tests: ${enable_tests} Building tests: ${enable_tests}

168
tests/dxcompiler.idl Normal file
View File

@ -0,0 +1,168 @@
/*
* Copyright 2023 Conor McCarthy for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "vkd3d_windows.h";
#include "vkd3d_unknown.idl"
/* The linux build of dxcompiler does not apply the ms_abi calling convention to its COM interfaces,
* so they default to sysv_abi. The '__stdcall' macro is set in vkd3d_windows.h to ms_abi, and widl
* emits STDMETHODCALLTYPE for COM interfaces, so '__stdcall' must be temporarily undefined. Doing
* this in a PE build (x86 or x64) is unnecessary since the default calling convention is identical.
* A 32-bit linux release of dxcompiler is not available.
* TODO: modily widl to optionally omit STDMETHODCALLTYPE? */
cpp_quote("#if defined(__x86_64__) && !defined(_WIN32)")
cpp_quote("# pragma push_macro(\"__stdcall\")")
cpp_quote("# undef __stdcall")
cpp_quote("# define __stdcall")
cpp_quote("#endif")
static const HRESULT DXC_E_LLVM_CAST_ERROR = 0x80aa001d;
[
uuid(73e22d93-e6ce-47f3-b5bf-f0664f39c1b0)
]
coclass DxcCompiler
{
}
[
uuid(8ba5fb08-5195-40e2-ac58-0d989c3a0102),
object,
local,
]
interface IDxcBlob : IUnknown
{
void *GetBufferPointer();
SIZE_T GetBufferSize();
}
[
uuid(7241d424-2646-4191-97c0-98e96e42fc68),
object,
local,
]
interface IDxcBlobEncoding : IDxcBlob
{
HRESULT GetEncoding(BOOL *known, UINT32 *code_page);
}
[
uuid(3da636c9-ba71-4024-a301-30cbf125305b),
object,
local,
]
interface IDxcBlobUtf8 : IDxcBlobEncoding
{
const char *GetStringPointer();
SIZE_T GetStringLength();
}
[
uuid(a3f84eab-0faa-497e-a39c-ee6ed60b2d84),
object,
local,
]
interface IDxcBlobUtf16 : IDxcBlobEncoding
{
const WCHAR *GetStringPointer();
SIZE_T GetStringLength();
}
[
uuid(7f61fc7d-950d-467f-b3e3-3c02fb49187c),
object,
local,
]
interface IDxcIncludeHandler : IUnknown
{
HRESULT LoadSource(const WCHAR *filename, IDxcBlob **include_source);
}
typedef struct DxcBuffer
{
const void *Ptr;
SIZE_T Size;
UINT Encoding;
} DxcBuffer;
[
uuid(cedb484a-d4e9-445a-b991-ca21ca157dc2),
object,
local,
]
interface IDxcOperationResult : IUnknown
{
HRESULT GetStatus(HRESULT *status);
HRESULT GetResult(IDxcBlob **result);
HRESULT GetErrorBuffer(IDxcBlobEncoding **errors);
}
typedef enum DXC_OUT_KIND
{
DXC_OUT_NONE = 0,
DXC_OUT_OBJECT = 1,
DXC_OUT_ERRORS = 2,
DXC_OUT_PDB = 3,
DXC_OUT_SHADER_HASH = 4,
DXC_OUT_DISASSEMBLY = 5,
DXC_OUT_HLSL = 6,
DXC_OUT_TEXT = 7,
DXC_OUT_REFLECTION = 8,
DXC_OUT_ROOT_SIGNATURE = 9,
DXC_OUT_EXTRA_OUTPUTS = 10,
DXC_OUT_FORCE_DWORD = 0xFFFFFFFF
} DXC_OUT_KIND;
[
uuid(58346cda-dde7-4497-9461-6f87af5e0659),
object,
local,
]
interface IDxcResult : IDxcOperationResult
{
BOOL HasOutput(DXC_OUT_KIND dxc_out_kind);
HRESULT GetOutput(DXC_OUT_KIND dxc_out_kind,
REFIID iid, void **object, IDxcBlobUtf16 **output_name);
UINT32 GetNumOutputs();
DXC_OUT_KIND GetOutputByIndex(UINT32 index);
DXC_OUT_KIND PrimaryOutput();
}
[
uuid(228b4687-5a6a-4730-900c-9702b2203f54),
object,
local,
]
interface IDxcCompiler3 : IUnknown
{
HRESULT Compile(const DxcBuffer *source, const WCHAR **arguments, UINT32 arg_count,
IDxcIncludeHandler *include_handler, REFIID riid, void **result);
HRESULT Disassemble(const DxcBuffer *object, REFIID riid, void **result);
}
typedef HRESULT (__stdcall *DxcCreateInstanceProc)(const IID *rclsid, REFIID riid, void **ppv);
cpp_quote("#if defined(__x86_64__) && !defined(_WIN32)")
cpp_quote("# pragma pop_macro(\"__stdcall\")")
cpp_quote("#endif")

View File

@ -1,13 +1,15 @@
[pixel shader] [pixel shader]
float4 main(uniform float2 u) : sv_target uniform float2 u;
float4 main() : sv_target
{ {
return float4(abs(u), abs(u.x - 0.5), abs(-0.4)); return float4(abs(u), abs(u.x - 0.5), abs(-0.4));
} }
[test] [test]
uniform 0 float4 0.1 0.7 0.0 0.0 uniform 0 float4 0.1 0.7 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.7, 0.4, 0.4) probe all rgba (0.1, 0.7, 0.4, 0.4)
uniform 0 float4 -0.7 0.1 0.0 0.0 uniform 0 float4 -0.7 0.1 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.7, 0.1, 1.2, 0.4) probe all rgba (0.7, 0.1, 1.2, 0.4)

View File

@ -11,17 +11,17 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 -1.1 1.6 1.3 0.5 uniform 0 float4 -1.1 1.6 1.3 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[test] [test]
uniform 0 float4 0.0 1.6 1.3 0.5 uniform 0 float4 0.0 1.6 1.3 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
[test] [test]
uniform 0 float4 1.0 0.0 1.3 0.5 uniform 0 float4 1.0 0.0 1.3 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] [pixel shader]
@ -34,12 +34,12 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[test] [test]
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] [pixel shader]
@ -53,11 +53,11 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 0.0 0.0 uniform 0 float4 1.0 2.0 0.0 0.0
uniform 4 float4 3.0 4.0 0.0 0.0 uniform 4 float4 3.0 4.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[test] [test]
uniform 0 float4 1.0 2.0 0.0 0.0 uniform 0 float4 1.0 2.0 0.0 0.0
uniform 4 float4 0.0 4.0 0.0 0.0 uniform 4 float4 0.0 4.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)

View File

@ -8,25 +8,25 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 1.0 1.0 1.0 uniform 0 float4 1.0 1.0 1.0 1.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 1.0 0.0 0.0 uniform 0 float4 0.0 1.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 0.0 1.0 0.0 uniform 0 float4 0.0 0.0 1.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 0.0 0.0 1.0 uniform 0 float4 0.0 0.0 0.0 1.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
uniform 0 float4 -1.0 -1.0 -1.0 -1.0 uniform 0 float4 -1.0 -1.0 -1.0 -1.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] [pixel shader]
@ -39,13 +39,13 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
uniform 0 float4 -1.0 0.0 0.0 0.0 uniform 0 float4 -1.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[require] [require]
@ -61,22 +61,22 @@ float4 main() : sv_target
[test] [test]
uniform 0 uint4 1 1 1 1 uniform 0 uint4 1 1 1 1
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 uint4 1 0 0 0 uniform 0 uint4 1 0 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 uint4 0 1 0 0 uniform 0 uint4 0 1 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 uint4 0 0 1 0 uniform 0 uint4 0 0 1 0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 uint4 0 0 0 1 uniform 0 uint4 0 0 0 1
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 uint4 0 0 0 0 uniform 0 uint4 0 0 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] [pixel shader]
@ -89,8 +89,8 @@ float4 main() : sv_target
[test] [test]
uniform 0 uint4 1 0 0 0 uniform 0 uint4 1 0 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 uint4 0 0 0 0 uniform 0 uint4 0 0 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)

View File

@ -10,7 +10,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 5.0 15.0 0.0 0.0 uniform 0 float4 5.0 15.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (20.0, -10.0, 75.0, 0.33333333) 1 probe all rgba (20.0, -10.0, 75.0, 0.33333333) 1
[pixel shader] [pixel shader]
@ -25,7 +25,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 5.0 15.0 0.0 0.0 uniform 0 float4 5.0 15.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (5.0, 5.0, -5.0, 3.0) 1 probe all rgba (5.0, 5.0, -5.0, 3.0) 1
[pixel shader] [pixel shader]
@ -40,7 +40,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 42.0 5.0 0.0 0.0 uniform 0 float4 42.0 5.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, -2.0, 2.0, -2.0) 16 probe all rgba (2.0, -2.0, 2.0, -2.0) 16
[pixel shader] [pixel shader]
@ -55,7 +55,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 45.0 5.0 0.0 0.0 uniform 0 float4 45.0 5.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] [pixel shader]
@ -69,7 +69,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 5.0 -42.1 4.0 45.0 uniform 0 float4 5.0 -42.1 4.0 45.0
uniform 4 float4 15.0 -5.0 4.1 5.0 uniform 4 float4 15.0 -5.0 4.1 5.0
draw quad todo(sm>=6) draw quad
probe all rgba (5.0, -2.1, 4.0, 0.0) 4 probe all rgba (5.0, -2.1, 4.0, 0.0) 4
[require] [require]
@ -88,5 +88,5 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1e99, 1e99, 1e99, 1e99) probe all rgba (1e99, 1e99, 1e99, 1e99)

View File

@ -61,7 +61,7 @@ float4 main() : sv_target
[test] [test]
draw quad draw quad
probe all rgba (5.0, -2.1, 4.0, 0.0) 4 probe all rgba (5.0, -2.1, 4.0, 0.0) 6
[require] [require]
% Infinities are not allowed in SM1 % Infinities are not allowed in SM1

View File

@ -10,7 +10,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 5.0 16.0 0.0 0.0 uniform 0 float4 5.0 16.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (21.0, -11.0, 80.0, 0.0) probe all rgba (21.0, -11.0, 80.0, 0.0)
[pixel shader] [pixel shader]
@ -25,7 +25,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 5.0 16.0 0.0 0.0 uniform 0 float4 5.0 16.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (5.0, 5.0, -5.0, 3.0) probe all rgba (5.0, 5.0, -5.0, 3.0)
[pixel shader] [pixel shader]
@ -40,7 +40,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 42.0 5.0 0.0 0.0 uniform 0 float4 42.0 5.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (8.0, -8.0, -8.0, 8.0) probe all rgba (8.0, -8.0, -8.0, 8.0)
[pixel shader] [pixel shader]
@ -55,7 +55,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 42.0 5.0 0.0 0.0 uniform 0 float4 42.0 5.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, -2.0, 2.0, -2.0) probe all rgba (2.0, -2.0, 2.0, -2.0)
[pixel shader] [pixel shader]
@ -70,7 +70,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 45.0 5.0 0.0 0.0 uniform 0 float4 45.0 5.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (9.0, -9.0, -9.0, 9.0) probe all rgba (9.0, -9.0, -9.0, 9.0)
[pixel shader] [pixel shader]
@ -85,7 +85,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 45.0 5.0 0.0 0.0 uniform 0 float4 45.0 5.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] [pixel shader]
@ -98,7 +98,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 5.0 -7.0 0.0 -10.0 uniform 0 float4 5.0 -7.0 0.0 -10.0
draw quad todo(sm>=6) draw quad
probe all rgba (5.0, 7.0, 0.0, 10.0) probe all rgba (5.0, 7.0, 0.0, 10.0)
[pixel shader] [pixel shader]
@ -117,5 +117,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 45.0 5.0 50.0 10.0 uniform 0 float4 45.0 5.0 50.0 10.0
uniform 4 float4 3.0 8.0 2.0 5.0 uniform 4 float4 3.0 8.0 2.0 5.0
draw quad todo(sm>=6) draw quad
probe all rgba (9.0, 5.0, 1.0, 3.0) probe all rgba (9.0, 5.0, 1.0, 3.0)

View File

@ -76,7 +76,7 @@ float4 main() : SV_TARGET
draw quad draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : SV_TARGET float4 main() : SV_TARGET
{ {
int x = 1; int x = 1;
@ -85,7 +85,11 @@ float4 main() : SV_TARGET
return x / y; return x / y;
} }
[pixel shader fail] [test]
draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader fail(sm<6)]
float4 main() : SV_TARGET float4 main() : SV_TARGET
{ {
int x = 1; int x = 1;
@ -94,8 +98,14 @@ float4 main() : SV_TARGET
return x % y; return x % y;
} }
[test]
draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0)
[require] [require]
shader model >= 4.0 shader model >= 4.0
% dxcompiler performs this calculation on unsigned values and emits zero.
shader model < 6.0
[pixel shader] [pixel shader]
float4 main() : SV_TARGET float4 main() : SV_TARGET
@ -110,6 +120,9 @@ float4 main() : SV_TARGET
draw quad draw quad
probe all rgba (-2147483648.0, -2147483648.0, -2147483648.0, -2147483648.0) probe all rgba (-2147483648.0, -2147483648.0, -2147483648.0, -2147483648.0)
[require]
shader model >= 4.0
[pixel shader] [pixel shader]
float4 main() : sv_target float4 main() : sv_target
{ {

View File

@ -27,7 +27,7 @@ float4 main() : SV_TARGET
draw quad draw quad
probe all rgba (5.0, 5.0, 4294967296.0, 3.0) probe all rgba (5.0, 5.0, 4294967296.0, 3.0)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : SV_TARGET float4 main() : SV_TARGET
{ {
uint x = 1; uint x = 1;
@ -36,7 +36,11 @@ float4 main() : SV_TARGET
return x / y; return x / y;
} }
[pixel shader fail] [test]
draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader fail(sm<6)]
float4 main() : SV_TARGET float4 main() : SV_TARGET
{ {
uint x = 1; uint x = 1;
@ -44,3 +48,7 @@ float4 main() : SV_TARGET
return x % y; return x % y;
} }
[test]
draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0)

View File

@ -5,7 +5,12 @@ float4 main() : sv_target
{ {
const int dim = 4; const int dim = 4;
float a[2 * 2] = {0.1, 0.2, 0.3, 0.4}; float a[2 * 2] = {0.1, 0.2, 0.3, 0.4};
#ifdef __hlsl_dx_compiler
/* float array dimensions are not valid. */
float b[4] = a;
#else
float b[4.1] = a; float b[4.1] = a;
#endif
float c[dim] = b; float c[dim] = b;
float d[true] = {c[0]}; float d[true] = {c[0]};
float e[65536]; float e[65536];
@ -13,5 +18,5 @@ float4 main() : sv_target
} }
[test] [test]
todo draw quad todo(sm<6) draw quad
probe all rgba (0.1, 0.1, 0.2, 0.4) probe all rgba (0.1, 0.1, 0.2, 0.4)

View File

@ -36,16 +36,16 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float 0 uniform 0 float 0
draw quad todo(sm>=6) draw quad
probe all rgba (11.0, 11.0, 11.0, 11.0) probe all rgba (11.0, 11.0, 11.0, 11.0)
uniform 0 float 1 uniform 0 float 1
draw quad todo(sm>=6) draw quad
probe all rgba (12.0, 12.0, 12.0, 12.0) probe all rgba (12.0, 12.0, 12.0, 12.0)
uniform 0 float 2 uniform 0 float 2
draw quad todo(sm>=6) draw quad
probe all rgba (13.0, 13.0, 13.0, 13.0) probe all rgba (13.0, 13.0, 13.0, 13.0)
uniform 0 float 3 uniform 0 float 3
draw quad todo(sm>=6) draw quad
probe all rgba (14.0, 14.0, 14.0, 14.0) probe all rgba (14.0, 14.0, 14.0, 14.0)
@ -61,16 +61,16 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float 0 uniform 0 float 0
draw quad todo(sm>=6) draw quad
probe all rgba (21.0, 1.0, 24.0, 0.0) probe all rgba (21.0, 1.0, 24.0, 0.0)
uniform 0 float 1 uniform 0 float 1
draw quad todo(sm>=6) draw quad
probe all rgba (22.0, 0.0, 23.0, 1.0) probe all rgba (22.0, 0.0, 23.0, 1.0)
uniform 0 float 2 uniform 0 float 2
draw quad todo(sm>=6) draw quad
probe all rgba (23.0, 1.0, 22.0, 0.0) probe all rgba (23.0, 1.0, 22.0, 0.0)
uniform 0 float 3 uniform 0 float 3
draw quad todo(sm>=6) draw quad
probe all rgba (24.0, 0.0, 21.0, 1.0) probe all rgba (24.0, 0.0, 21.0, 1.0)

View File

@ -111,7 +111,7 @@ float4 main() : sv_target
% Implicit size arrays are not allowed. % Implicit size arrays are not allowed.
[pixel shader fail] [pixel shader fail(sm<6)]
float fun(float a[]) float fun(float a[])
{ {
return 0; return 0;

View File

@ -53,7 +53,7 @@ draw quad
probe all rgba (2, 3, 6, 1) probe all rgba (2, 3, 6, 1)
% Additional level of indirection % Additional level of indirection
[pixel shader todo] [pixel shader todo fail(sm>=6)]
static const float array[8] = {1, 2, 3, 4, 5, 6, 7, 8}; static const float array[8] = {1, 2, 3, 4, 5, 6, 7, 8};
static const int idx = 2; static const int idx = 2;
static const float array2[array[idx]] = {1, 2, 3}; static const float array2[array[idx]] = {1, 2, 3};

View File

@ -2,7 +2,12 @@
shader model >= 4.0 shader model >= 4.0
[pixel shader] [pixel shader]
float4 main(uniform float f, uniform int i, uniform uint u, uniform half h) : sv_target uniform float f;
uniform int i;
uniform uint u;
uniform half h;
float4 main() : sv_target
{ {
float4 ret; float4 ret;
@ -15,11 +20,14 @@ float4 main(uniform float f, uniform int i, uniform uint u, uniform half h) : sv
[test] [test]
uniform 0 float4 123.0 -2.0 456 0.01 uniform 0 float4 123.0 -2.0 456 0.01
draw quad todo(sm>=6) draw quad
probe (320,240) rgba (123.0, -2.0, 456.0, 0.01) probe (320,240) rgba (123.0, -2.0, 456.0, 0.01)
[pixel shader] [pixel shader]
float4 main(uniform float2x2 m, uniform float4 v) : sv_target uniform float2x2 m;
uniform float4 v;
float4 main() : sv_target
{ {
return float4(asfloat(m)[0][1], asfloat(v).y, 0, 0); return float4(asfloat(m)[0][1], asfloat(v).y, 0, 0);
} }
@ -28,7 +36,7 @@ float4 main(uniform float2x2 m, uniform float4 v) : sv_target
uniform 0 float4 11 12 0 0 uniform 0 float4 11 12 0 0
uniform 4 float4 13 14 0 0 uniform 4 float4 13 14 0 0
uniform 8 float4 20 21 22 23 uniform 8 float4 20 21 22 23
draw quad todo(sm>=6) draw quad
probe (320,240) rgba (13.0, 21.0, 0.0, 0.0) probe (320,240) rgba (13.0, 21.0, 0.0, 0.0)
[pixel shader fail] [pixel shader fail]

View File

@ -2,8 +2,12 @@
shader model >= 4.0 shader model >= 4.0
[pixel shader] [pixel shader]
uniform float f;
uniform int i;
uniform uint u;
uniform half h;
float4 main(uniform float f, uniform int i, uniform uint u, uniform half h) : sv_target float4 main() : sv_target
{ {
uint4 ret; uint4 ret;
@ -16,13 +20,15 @@ float4 main(uniform float f, uniform int i, uniform uint u, uniform half h) : sv
[test] [test]
uniform 0 uint4 123 0xc0000000 456 0x7fd69345 uniform 0 uint4 123 0xc0000000 456 0x7fd69345
draw quad todo(sm>=6) draw quad
probe (320,240) rgba (123.0, 3221225472.0, 456.0, 2144768896.0) probe (320,240) rgba (123.0, 3221225472.0, 456.0, 2144768896.0)
[pixel shader] [pixel shader]
uniform float2x2 m;
uniform float4 v;
float4 main(uniform float2x2 m, uniform float4 v) : sv_target float4 main() : sv_target
{ {
return float4(asuint(m)[0][1], asuint(v).y, 0, 0); return float4(asuint(m)[0][1], asuint(v).y, 0, 0);
} }
@ -31,7 +37,7 @@ float4 main(uniform float2x2 m, uniform float4 v) : sv_target
uniform 0 uint4 11 12 0 0 uniform 0 uint4 11 12 0 0
uniform 4 uint4 13 14 0 0 uniform 4 uint4 13 14 0 0
uniform 8 uint4 20 21 22 23 uniform 8 uint4 20 21 22 23
draw quad todo(sm>=6) draw quad
probe (320,240) rgba (13.0, 21.0, 0.0, 0.0) probe (320,240) rgba (13.0, 21.0, 0.0, 0.0)

View File

@ -2,32 +2,32 @@
% we need to get the parsing syntax right. Most of the following tests which % we need to get the parsing syntax right. Most of the following tests which
% succeed print warnings. % succeed print warnings.
[pixel shader] [pixel shader fail(sm>=6)]
[numthreads] [numthreads]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader] [pixel shader fail(sm>=6)]
[ numthreads ] [ numthreads ]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader] [pixel shader fail(sm>=6)]
[numthreads(1)] [numthreads(1)]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader todo] [pixel shader todo fail(sm>=6)]
[numthreads("")] [numthreads("")]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader todo] [pixel shader todo fail(sm>=6)]
[numthreads("one")] [numthreads("one")]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader todo] [pixel shader todo fail(sm>=6)]
uniform float4 f; uniform float4 f;
@ -77,12 +77,12 @@ float4 main() : sv_target { return 0; }
[one][two] [one][two]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader fail todo] [pixel shader fail(sm<6) todo]
[one][one] [one][one]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader fail todo] [pixel shader fail(sm<6) todo]
[one][one(1)] [one][one(1)]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
@ -92,7 +92,7 @@ float4 main() : sv_target { return 0; }
[one][One] [one][One]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader] [pixel shader fail(sm>=6)]
[numthreads] [numthreads]
float4 main(); float4 main();
@ -112,7 +112,7 @@ static int i = 1;
[three(i = 4)] [three(i = 4)]
float4 main() : sv_target { return 0; } float4 main() : sv_target { return 0; }
[pixel shader fail] [pixel shader fail(sm<6)]
[one] [one]
float4 f; float4 f;

View File

@ -30,7 +30,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 0.0 0.0 2.0 4.0 uniform 0 float4 0.0 0.0 2.0 4.0
uniform 4 int4 0 1 0 10 uniform 4 int4 0 1 0 10
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 10.0, 1.0, 11.0) probe all rgba (0.0, 10.0, 1.0, 11.0)
@ -44,5 +44,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 uint4 0x00000001 0x00000002 0x80000000 0x00000000 uniform 0 uint4 0x00000001 0x00000002 0x80000000 0x00000000
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 2.0, 2.0, 0.0) probe all rgba (2.0, 2.0, 2.0, 0.0)

View File

@ -49,5 +49,5 @@ float4 main(struct input i) : sv_target
} }
[test] [test]
draw triangle strip 4 todo(sm>=6) draw triangle strip 4
probe all rgba (0.0, 2.0, 2.0, 2.0) probe all rgba (0.0, 2.0, 2.0, 2.0)

View File

@ -262,7 +262,7 @@ draw quad
probe all rgba (41.0, 42.0, 43.0, 44.0) probe all rgba (41.0, 42.0, 43.0, 44.0)
[pixel shader fail] [pixel shader fail(sm<6)]
struct apple struct apple
{ {
float2 aa; float2 aa;
@ -301,7 +301,7 @@ draw quad
probe all rgba (55.0, 56.0, 57.0, 58.0) probe all rgba (55.0, 56.0, 57.0, 58.0)
[pixel shader fail] [pixel shader fail(sm<6)]
struct apple struct apple
{ {
float2 aa; float2 aa;
@ -333,7 +333,7 @@ draw quad
probe all rgba (61.0, 62.0, 63.0, 64.0) probe all rgba (61.0, 62.0, 63.0, 64.0)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
float arr[5] = {1, 2, 3, 4, 5}; float arr[5] = {1, 2, 3, 4, 5};
@ -359,7 +359,7 @@ draw quad
probe all rgba (71.0, 72.0, 73.0, 74.0) probe all rgba (71.0, 72.0, 73.0, 74.0)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
float2x2 mat = {1, 2, 3, 4}; float2x2 mat = {1, 2, 3, 4};
@ -381,7 +381,7 @@ float4 main() : sv_target
} }
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
float arr[5] = {1, 2, 3, 4, 5}; float arr[5] = {1, 2, 3, 4, 5};
@ -440,7 +440,7 @@ draw quad
probe all rgba (11.0, 12.0, 13.0, 0.0) probe all rgba (11.0, 12.0, 13.0, 0.0)
[pixel shader fail] [pixel shader fail(sm<6)]
struct apple struct apple
{ {
float3 aa; float3 aa;
@ -541,7 +541,7 @@ draw quad
probe all rgba (51.0, 52.0, 53.0, 0.0) probe all rgba (51.0, 52.0, 53.0, 0.0)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
float4 vec = {1, 2, 3, 4}; float4 vec = {1, 2, 3, 4};

View File

@ -32,7 +32,7 @@ float4 main() : sv_target
} }
[pixel shader] [pixel shader fail(sm>=6)]
struct apple struct apple
{ {
float3 aa; float3 aa;
@ -71,7 +71,7 @@ float4 main() : sv_target
} }
[pixel shader] [pixel shader fail(sm>=6)]
struct apple struct apple
{ {
float3 aa; float3 aa;
@ -93,7 +93,7 @@ draw quad
probe all rgba (5.0, 6.0, 7.0, 8.0) probe all rgba (5.0, 6.0, 7.0, 8.0)
[pixel shader] [pixel shader fail(sm>=6)]
Texture2D tex; Texture2D tex;
struct apple struct apple
@ -124,7 +124,7 @@ draw quad
probe all rgba (4.0, 4.0, 4.0, 4.0) probe all rgba (4.0, 4.0, 4.0, 4.0)
[pixel shader] [pixel shader fail(sm>=6)]
Texture2D tex; Texture2D tex;
struct apple struct apple
@ -158,7 +158,7 @@ draw quad
probe all rgba (5.0, 5.0, 5.0, 5.0) probe all rgba (5.0, 5.0, 5.0, 5.0)
[pixel shader] [pixel shader fail(sm>=6)]
struct apple struct apple
{ {
float3 xx[2]; float3 xx[2];

View File

@ -2,7 +2,12 @@
shader model >= 4.0 shader model >= 4.0
[pixel shader] [pixel shader]
float4 main(uniform int i, uniform uint u, uniform bool b, uniform half h) : sv_target uniform int i;
uniform uint u;
uniform bool b;
uniform half h;
float4 main() : sv_target
{ {
return float4(((float)i) + 1.5, ((float)u) - 2.5, ((float)b) / 2, h); return float4(((float)i) + 1.5, ((float)u) - 2.5, ((float)b) / 2, h);
} }
@ -12,7 +17,7 @@ uniform 0 int -1
uniform 1 uint 3 uniform 1 uint 3
uniform 2 int -2 uniform 2 int -2
uniform 3 float 0.5 uniform 3 float 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.5, 0.5, 0.5) probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader] [pixel shader]

View File

@ -2,8 +2,12 @@
shader model >= 4.0 shader model >= 4.0
[pixel shader] [pixel shader]
uniform int i;
uniform uint u;
uniform bool b;
uniform float f;
float4 main(uniform int i, uniform uint u, uniform bool b, uniform float f) : sv_target float4 main() : sv_target
{ {
return float4(((half)i) + 1.5, ((half)u) - 2.5, ((half)b) / 2, f); return float4(((half)i) + 1.5, ((half)u) - 2.5, ((half)b) / 2, f);
} }
@ -13,7 +17,7 @@ uniform 0 int -1
uniform 1 uint 3 uniform 1 uint 3
uniform 2 int -2 uniform 2 int -2
uniform 3 float 0.5 uniform 3 float 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.5, 0.5, 0.5) probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader] [pixel shader]

View File

@ -2,8 +2,12 @@
shader model >= 4.0 shader model >= 4.0
[pixel shader] [pixel shader]
uniform float f;
uniform uint u;
uniform bool b;
uniform half h;
float4 main(uniform float f, uniform uint u, uniform bool b, uniform half h) : sv_target float4 main() : sv_target
{ {
float4 ret; float4 ret;
@ -19,7 +23,7 @@ uniform 0 float 2.6
uniform 1 int -2 uniform 1 int -2
uniform 2 int -2 uniform 2 int -2
uniform 3 float -3.6 uniform 3 float -3.6
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.5, 0.5, 0.5) probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader] [pixel shader]

View File

@ -2,8 +2,12 @@
shader model >= 4.0 shader model >= 4.0
[pixel shader] [pixel shader]
uniform float f;
uniform int i;
uniform bool b;
uniform half h;
float4 main(uniform float f, uniform int i, uniform bool b, uniform half h) : sv_target float4 main() : sv_target
{ {
float4 ret; float4 ret;
@ -19,7 +23,7 @@ uniform 0 float 2.6
uniform 1 int 2 uniform 1 int 2
uniform 2 int -2 uniform 2 int -2
uniform 3 float -3.6 uniform 3 float -3.6
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.5, 0.5, 0.5) probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader] [pixel shader]

View File

@ -13,7 +13,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 3.0, 4.0) probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] [pixel shader]
@ -31,7 +31,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 3.0, 4.0) probe all rgba (1.0, 2.0, 3.0, 4.0)
% SM1 buffer offset allocation follows different rules than SM4. % SM1 buffer offset allocation follows different rules than SM4.
@ -72,7 +72,7 @@ uniform 0 float4 0.0 1.0 2.0 3.0
uniform 4 float4 4.0 5.0 6.0 7.0 uniform 4 float4 4.0 5.0 6.0 7.0
uniform 8 float4 8.0 9.0 10.0 11.0 uniform 8 float4 8.0 9.0 10.0 11.0
uniform 12 float4 12.0 13.0 14.0 15.0 uniform 12 float4 12.0 13.0 14.0 15.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 2.0, 4.0, 8.0) probe all rgba (0.0, 2.0, 4.0, 8.0)
@ -93,7 +93,7 @@ float4 main() : sv_target
uniform 0 float4 0.0 1.0 2.0 3.0 uniform 0 float4 0.0 1.0 2.0 3.0
uniform 4 float4 4.0 5.0 6.0 7.0 uniform 4 float4 4.0 5.0 6.0 7.0
uniform 8 float4 8.0 9.0 10.0 11.0 uniform 8 float4 8.0 9.0 10.0 11.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 4.0, 8.0, 9.0) probe all rgba (0.0, 4.0, 8.0, 9.0)
@ -119,11 +119,11 @@ uniform 0 float4 0.0 1.0 2.0 3.0
uniform 4 float4 4.0 5.0 6.0 7.0 uniform 4 float4 4.0 5.0 6.0 7.0
uniform 8 float4 8.0 9.0 10.0 11.0 uniform 8 float4 8.0 9.0 10.0 11.0
uniform 12 float4 12.0 13.0 14.0 15.0 uniform 12 float4 12.0 13.0 14.0 15.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 4.0, 5.0, 6.0) probe all rgba (0.0, 4.0, 5.0, 6.0)
[pixel shader fail] [pixel shader fail(sm<6)]
// Elements cannot overlap if buffer is used. // Elements cannot overlap if buffer is used.
cbuffer buffer cbuffer buffer
{ {
@ -134,9 +134,17 @@ cbuffer buffer
float4 main() : sv_target float4 main() : sv_target
{ {
return c; return float4(c, a[1].x, b[0].x, b[1].x);
} }
[test]
uniform 0 float4 1.0 0.0 0.0 0.0
uniform 4 float4 2.0 0.0 0.0 0.0
uniform 8 float4 3.0 0.0 0.0 0.0
uniform 12 float4 4.0 0.0 0.0 0.0
todo draw quad
probe all rgba (1.0, 3.0, 3.0, 4.0)
[pixel shader] [pixel shader]
// Elements can overlap if buffer is not used. // Elements can overlap if buffer is not used.
@ -168,7 +176,7 @@ float4 main() : sv_target
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
uniform 8 float4 9.0 10.0 11.0 12.0 uniform 8 float4 9.0 10.0 11.0 12.0
draw quad todo(sm>=6) draw quad
probe all rgba (509, 610, 711, 812) probe all rgba (509, 610, 711, 812)
@ -196,7 +204,7 @@ uniform 0 float4 0.0 1.0 2.0 3.0
uniform 4 float4 4.0 5.0 6.0 7.0 uniform 4 float4 4.0 5.0 6.0 7.0
uniform 8 float4 8.0 9.0 10.0 11.0 uniform 8 float4 8.0 9.0 10.0 11.0
uniform 12 float4 12.0 13.0 14.0 15.0 uniform 12 float4 12.0 13.0 14.0 15.0
draw quad todo(sm>=6) draw quad
probe all rgba (12468.0, 13509.0, 14010.0, 15011.0) probe all rgba (12468.0, 13509.0, 14010.0, 15011.0)
@ -213,7 +221,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 3.0, 2.0, 3.0) probe all rgba (2.0, 3.0, 2.0, 3.0)
@ -230,7 +238,7 @@ float4 main() : sv_target
} }
[pixel shader fail] [pixel shader fail(sm<6)]
// Matrices must be aligned. // Matrices must be aligned.
cbuffer buffer cbuffer buffer
{ {
@ -243,7 +251,7 @@ float4 main() : sv_target
} }
[pixel shader fail] [pixel shader fail(sm<6)]
// Arrays must be aligned. // Arrays must be aligned.
cbuffer buffer cbuffer buffer
{ {
@ -256,7 +264,7 @@ float4 main() : sv_target
} }
[pixel shader fail] [pixel shader fail(sm<6)]
// Structs must be aligned. // Structs must be aligned.
struct apple struct apple
{ {
@ -318,11 +326,11 @@ float4 main() : sv_target
uniform 0 float 1.0 uniform 0 float 1.0
uniform 1 float 2.0 uniform 1 float 2.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
draw quad todo(sm>=6) draw quad
probe all rgba (512.0, 612.0, 712.0, 812.0) probe all rgba (512.0, 612.0, 712.0, 812.0)
[pixel shader fail] [pixel shader fail(sm<6)]
// packoffset cannot be used unless all elements use it. // packoffset cannot be used unless all elements use it.
cbuffer buffer cbuffer buffer
{ {
@ -349,7 +357,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (3.0, 4.0, 3.0, 4.0) probe all rgba (3.0, 4.0, 3.0, 4.0)
@ -491,7 +499,7 @@ float4 main() : sv_target
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
uniform 4 float4 0.0 2.0 0.0 0.0 uniform 4 float4 0.0 2.0 0.0 0.0
uniform 8 float4 0.0 0.0 3.0 0.0 uniform 8 float4 0.0 0.0 3.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 0.0, 4.0) probe all rgba (1.0, 2.0, 0.0, 4.0)
@ -541,14 +549,14 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
% Samplers cannot have packoffset(), unless register() is also specified, or they are not used. % Samplers cannot have packoffset(), unless register() is also specified, or they are not used.
% Note: In SM1 the rules are different: packoffset() is allowed for samplers, but they cannot be % Note: In SM1 the rules are different: packoffset() is allowed for samplers, but they cannot be
% used together with other numeric fields, which seems like a bug. % used together with other numeric fields, which seems like a bug.
[pixel shader fail todo] [pixel shader fail(sm<6) todo]
Texture2D tex; Texture2D tex;
cbuffer buffer cbuffer buffer
@ -599,7 +607,7 @@ float4 main() : sv_target
% When packoffset is used in one field, resources are also expected to have a reservation. % When packoffset is used in one field, resources are also expected to have a reservation.
[pixel shader fail] [pixel shader fail(sm<6)]
cbuffer buffer cbuffer buffer
{ {
float4 foo : packoffset(c0); float4 foo : packoffset(c0);
@ -611,7 +619,7 @@ float4 main() : sv_target
return 0; return 0;
} }
[pixel shader fail] [pixel shader fail(sm<6)]
cbuffer buffer cbuffer buffer
{ {
float4 foo : packoffset(c0); float4 foo : packoffset(c0);
@ -649,7 +657,7 @@ float4 main() : sv_target
} }
% Using register() alone is considered manual packing for resources, so the other fields expect packoffset(). % Using register() alone is considered manual packing for resources, so the other fields expect packoffset().
[pixel shader fail] [pixel shader fail(sm<6)]
cbuffer buffer cbuffer buffer
{ {
float4 foo; float4 foo;
@ -661,7 +669,7 @@ float4 main() : sv_target
return 0; return 0;
} }
[pixel shader fail] [pixel shader fail(sm<6)]
cbuffer buffer cbuffer buffer
{ {
float4 foo; float4 foo;
@ -718,5 +726,5 @@ uniform 0 float4 0.0 1.0 2.0 3.0
uniform 4 float4 4.0 5.0 6.0 7.0 uniform 4 float4 4.0 5.0 6.0 7.0
uniform 8 float4 8.0 9.0 10.0 11.0 uniform 8 float4 8.0 9.0 10.0 11.0
uniform 12 float4 12.0 13.0 14.0 15.0 uniform 12 float4 12.0 13.0 14.0 15.0
draw quad todo(sm>=6) draw quad
probe all rgba (124.0, 135.0, 146.0, 150.5) probe all rgba (124.0, 135.0, 146.0, 150.5)

View File

@ -1,12 +1,14 @@
[pixel shader] [pixel shader]
float4 main(uniform float3 u) : sv_target uniform float3 u;
float4 main() : sv_target
{ {
return float4(clamp(u.x, u.y, u.z), clamp(0.9, u.y, u.z), clamp(u.x, -0.5, u.z), clamp(0.6, -0.4, 0.3)); return float4(clamp(u.x, u.y, u.z), clamp(0.9, u.y, u.z), clamp(u.x, -0.5, u.z), clamp(0.6, -0.4, 0.3));
} }
[test] [test]
uniform 0 float4 -0.3 -0.1 0.7 0.0 uniform 0 float4 -0.3 -0.1 0.7 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (-0.1, 0.7, -0.3, 0.3) probe all rgba (-0.1, 0.7, -0.3, 0.3)

View File

@ -9,14 +9,14 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1 2 3 4 uniform 0 float4 1 2 3 4
draw quad todo(sm>=6) draw quad
probe all rgba (1, 2, 3, 4) probe all rgba (1, 2, 3, 4)
uniform 0 float4 9 8 7 6 uniform 0 float4 9 8 7 6
draw quad todo(sm>=6) draw quad
probe all rgba (9, 8, 7, 6) probe all rgba (9, 8, 7, 6)
uniform 0 float4 -1 8 7 6 uniform 0 float4 -1 8 7 6
draw quad todo(sm>=6) draw quad
probe all rgba (9, 8, 7, 6) probe all rgba (9, 8, 7, 6)
uniform 0 float4 9 0 7 6 uniform 0 float4 9 0 7 6
draw quad todo(sm>=6) draw quad
probe all rgba (9, 0, 7, 6) probe all rgba (9, 0, 7, 6)

View File

@ -1,5 +1,6 @@
[require] [require]
shader model >= 4.0 shader model >= 4.0
shader model < 6.0
[sampler 0] [sampler 0]
@ -35,6 +36,7 @@ size (1, 1)
4.0 4.0 4.0 1.0 4.0 4.0 4.0 1.0
[require] [require]
shader model < 6.0
options: backcompat options: backcompat
[pixel shader] [pixel shader]
@ -136,6 +138,7 @@ probe all rgba (1, 1, 1, 11)
[require] [require]
shader model >= 5.0 shader model >= 5.0
shader model < 6.0
[pixel shader todo] [pixel shader todo]

View File

@ -17,5 +17,5 @@ void main()
} }
[test] [test]
dispatch 1 1 1 todo(sm>=6) dispatch 1 1 1
probe uav 0 (0, 0) r (-123.0) probe uav 0 (0, 0) r (-123.0)

View File

@ -1,5 +1,7 @@
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
if (u.x > 0.0) if (u.x > 0.0)
return float4(0.1, 0.2, 0.3, 0.4); return float4(0.1, 0.2, 0.3, 0.4);
@ -9,14 +11,16 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.9, 0.8, 0.7, 0.6) probe all rgba (0.9, 0.8, 0.7, 0.6)
uniform 0 float4 0.1 0.0 0.0 0.0 uniform 0 float4 0.1 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4) probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
[attr1] [attr1]
if (u.x > 0.0) if (u.x > 0.0)
@ -26,7 +30,9 @@ float4 main(uniform float4 u) : sv_target
} }
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
[flatten] [flatten]
if (u.x > 0.0) if (u.x > 0.0)
@ -37,10 +43,10 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.9, 0.8, 0.7, 0.6) probe all rgba (0.9, 0.8, 0.7, 0.6)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 u; float4 u;
float main() : sv_target float main() : sv_target
@ -69,7 +75,9 @@ float main() : sv_target
shader model >= 3.0 shader model >= 3.0
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
[branch] [branch]
if (u.x > 0.0) if (u.x > 0.0)
@ -80,7 +88,7 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.9, 0.8, 0.7, 0.6) probe all rgba (0.9, 0.8, 0.7, 0.6)
[pixel shader] [pixel shader]

View File

@ -10,10 +10,10 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 0.1 0.2 0.3 0.4 uniform 4 float4 0.1 0.2 0.3 0.4
draw quad todo(sm>=6) draw quad
probe all rgba (1.1, 2.2, 3.3, 4.4) probe all rgba (1.1, 2.2, 3.3, 4.4)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
const float f; const float f;

View File

@ -1,5 +1,8 @@
[pixel shader] [pixel shader]
float4 main(uniform float4 u, uniform float4 v) : sv_target uniform float4 u;
uniform float4 v;
float4 main() : sv_target
{ {
float4 res = float4(0, 0, 0, 0); float4 res = float4(0, 0, 0, 0);
res.xyz = cross(u, v); res.xyz = cross(u, v);
@ -9,13 +12,15 @@ float4 main(uniform float4 u, uniform float4 v) : sv_target
[test] [test]
uniform 0 float4 1 -2 3 4 uniform 0 float4 1 -2 3 4
uniform 4 float4 10 100 1000 10000 uniform 4 float4 10 100 1000 10000
draw quad todo(sm>=6) draw quad
probe all rgba (-2300, -970, 120, 0) probe all rgba (-2300, -970, 120, 0)
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
float4 res = float4(0, 0, 0, 3.5); float4 res = float4(0, 0, 0, 3.5);
res.xyz = cross(u, 4); res.xyz = cross(u, 4);
@ -24,5 +29,5 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 1 -2 3 4 uniform 0 float4 1 -2 3 4
draw quad todo(sm>=6) draw quad
probe all rgba (-20, 8, 12, 3.5) probe all rgba (-20, 8, 12, 3.5)

View File

@ -2,23 +2,27 @@
shader model >= 4.0 shader model >= 4.0
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return D3DCOLORtoUBYTE4(u); return D3DCOLORtoUBYTE4(u);
} }
[test] [test]
uniform 0 float4 -0.5 6.5 7.5 3.4 uniform 0 float4 -0.5 6.5 7.5 3.4
draw quad todo(sm>=6) draw quad
probe all rgba (1912.0, 1657.0, -127.0, 867.0) 1 probe all rgba (1912.0, 1657.0, -127.0, 867.0) 1
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return D3DCOLORtoUBYTE4(u.x); return D3DCOLORtoUBYTE4(u.x);
} }
[test] [test]
uniform 0 float4 -0.5 6.5 7.5 3.4 uniform 0 float4 -0.5 6.5 7.5 3.4
draw quad todo(sm>=6) draw quad
probe all rgba (-127.0, -127.0, -127.0, -127.0) 1 probe all rgba (-127.0, -127.0, -127.0, -127.0) 1

View File

@ -8,7 +8,7 @@ float4 main(float4 pos : sv_position) : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 0.0, 0.0) probe all rgba (1.0, 1.0, 0.0, 0.0)
@ -29,7 +29,7 @@ float4 main(float4 pos : sv_position) : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0) probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0)
probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0) probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0)
probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0) probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0)
@ -55,7 +55,7 @@ float4 main(float4 pos : sv_position) : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0) probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0)
probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0) probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0)
probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0) probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0)
@ -74,7 +74,7 @@ float4 main(float4 pos : sv_position) : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe (10, 10) rgba (-0.524999976, -0.164999843, 0.104999900, 0.0) 16 probe (10, 10) rgba (-0.524999976, -0.164999843, 0.104999900, 0.0) 16
probe (11, 10) rgba (-0.689999819, -0.164999843, 0.114999890, 0.0) 32 probe (11, 10) rgba (-0.689999819, -0.164999843, 0.114999890, 0.0) 32
probe (10, 11) rgba (-0.420000076, -0.154999852, 0.104999900, 0.0) 32 probe (10, 11) rgba (-0.420000076, -0.154999852, 0.104999900, 0.0) 32

View File

@ -9,8 +9,8 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1 2 3 4 uniform 0 float4 1 2 3 4
draw quad todo(sm>=6) draw quad
probe all rgba (1, 2, 3, 4) probe all rgba (1, 2, 3, 4)
uniform 0 float4 9 8 7 6 uniform 0 float4 9 8 7 6
draw quad todo(sm>=6) draw quad
probe all rgba (1, 2, 3, 4) probe all rgba (1, 2, 3, 4)

View File

@ -10,7 +10,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 -2.0 3.0 4.0 0.1 uniform 0 float4 -2.0 3.0 4.0 0.1
uniform 4 float4 2.0 -1.0 4.0 5.0 uniform 4 float4 2.0 -1.0 4.0 5.0
draw quad todo(sm>=6) draw quad
probe all rgba (7.483983, 7.483983, 7.483983, 7.483983) 1 probe all rgba (7.483983, 7.483983, 7.483983, 7.483983) 1
[pixel shader] [pixel shader]

View File

@ -10,7 +10,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 4.0 5.0 uniform 0 float4 2.0 3.0 4.0 5.0
uniform 4 float4 10.0 11.0 12.0 13.0 uniform 4 float4 10.0 11.0 12.0 13.0
draw quad todo(sm>=6) draw quad
probe all rgba (166.0, 166.0, 166.0, 166.0) probe all rgba (166.0, 166.0, 166.0, 166.0)
[pixel shader] [pixel shader]
@ -25,7 +25,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 0.0 0.0 uniform 0 float4 2.0 3.0 0.0 0.0
uniform 4 float4 10.0 11.0 12.0 13.0 uniform 4 float4 10.0 11.0 12.0 13.0
draw quad todo(sm>=6) draw quad
probe all rgba (53.0, 53.0, 53.0, 53.0) probe all rgba (53.0, 53.0, 53.0, 53.0)
[pixel shader] [pixel shader]
@ -40,7 +40,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 0.0 0.0 0.0 uniform 0 float4 2.0 0.0 0.0 0.0
uniform 4 float4 10.0 11.0 12.0 13.0 uniform 4 float4 10.0 11.0 12.0 13.0
draw quad todo(sm>=6) draw quad
probe all rgba (92.0, 92.0, 92.0, 92.0) probe all rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] [pixel shader]
@ -55,7 +55,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 10.0 11.0 12.0 13.0 uniform 0 float4 10.0 11.0 12.0 13.0
uniform 4 float4 2.0 0.0 0.0 0.0 uniform 4 float4 2.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (92.0, 92.0, 92.0, 92.0) probe all rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] [pixel shader]
@ -71,7 +71,7 @@ float4 main() : SV_TARGET
% Account for both the SM1 and SM4 uniform layout % Account for both the SM1 and SM4 uniform layout
uniform 0 float4 2.0 3.0 0.0 0.0 uniform 0 float4 2.0 3.0 0.0 0.0
uniform 4 float4 3.0 0.0 0.0 0.0 uniform 4 float4 3.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (6.0, 6.0, 6.0, 6.0) probe all rgba (6.0, 6.0, 6.0, 6.0)
[pixel shader] [pixel shader]

View File

@ -1,3 +1,7 @@
% Returns (0.1, 0.3, 0.2, 0.4) with dxcompiler
[require]
shader model < 6.0
[pixel shader] [pixel shader]
typedef const precise row_major float2x2 mat_t; typedef const precise row_major float2x2 mat_t;
float4 main() : sv_target float4 main() : sv_target

View File

@ -84,7 +84,7 @@ float4 main(in apple a) : sv_target
[test] [test]
draw quad draw quad
probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0) todo(sm>=6) probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0)
% Arrays of matrices get successive indexes. % Arrays of matrices get successive indexes.
@ -101,7 +101,7 @@ float4 main(in apple a) : sv_target
[test] [test]
draw quad draw quad
probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0) todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0)
% Arrays (even multi-dimensional) of struct elements are allowed. The fields in the different struct % Arrays (even multi-dimensional) of struct elements are allowed. The fields in the different struct
@ -120,7 +120,7 @@ float4 main(in apple aps[2][2]) : sv_target
[test] [test]
draw quad draw quad
probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0) todo(sm>=6) probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0)
[pixel shader] [pixel shader]
@ -142,7 +142,7 @@ float4 main(in banana bans[2]) : sv_target
[test] [test]
draw quad draw quad
probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0) todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
[pixel shader fail] [pixel shader fail]
@ -201,11 +201,11 @@ float4 main(in float4 tex0 : TEXCOORD0, in float4 tex1 : TEXCOORD1) : sv_target
[test] [test]
draw quad draw quad
probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0) todo(sm>=6) probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0)
% Output semantics cannot be mapped to more than one value. % Output semantics cannot be mapped to more than one value.
[vertex shader fail] [vertex shader fail(sm<6)]
struct apple struct apple
{ {
float2 tex : TEXCOORD0; float2 tex : TEXCOORD0;
@ -251,7 +251,7 @@ void main(out float4 tex[4] : texcoord, inout float4 pos : sv_position)
% Arguments with the same semantic aren't aliased. % Arguments with the same semantic aren't aliased.
[pixel shader] [pixel shader fail(sm>=6)]
float4 main(in float4 t1 : TEXCOORD0, in float4 t2 : TEXCOORD0) : sv_target float4 main(in float4 t1 : TEXCOORD0, in float4 t2 : TEXCOORD0) : sv_target
{ {
t1 = 99; t1 = 99;
@ -259,7 +259,7 @@ float4 main(in float4 t1 : TEXCOORD0, in float4 t2 : TEXCOORD0) : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe (0, 0) rgba (99.0, 99.0, 10.0, 11.0) probe (0, 0) rgba (99.0, 99.0, 10.0, 11.0)
@ -272,19 +272,19 @@ float4 main(in float4 a : TEXCOORD0, in float3 b : TEXCOORD1) : sv_target
[test] [test]
draw quad draw quad
probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0) todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
% In SM4, duplicated input semantics can only have different types if they have the same layout and % In SM4, duplicated input semantics can only have different types if they have the same layout and
% register types. SM1 is permissive in this regard. % register types. SM1 is permissive in this regard.
[pixel shader] [pixel shader fail(sm>=6)]
float4 main(in float2 a : TEXCOORD0, in half2 b : TEXCOORD0, in float2x1 c: TEXCOORD0) : sv_target float4 main(in float2 a : TEXCOORD0, in half2 b : TEXCOORD0, in float2x1 c: TEXCOORD0) : sv_target
{ {
return 0.0; return 0.0;
} }
[pixel shader] [pixel shader fail(sm>=6)]
float4 main(in uint2 a : TEXCOORD0, in int2 b : TEXCOORD0, in int2x1 c : TEXCOORD0, in bool2 d : TEXCOORD0) : sv_target float4 main(in uint2 a : TEXCOORD0, in int2 b : TEXCOORD0, in int2x1 c : TEXCOORD0, in bool2 d : TEXCOORD0) : sv_target
{ {
return 0.0; return 0.0;

View File

@ -8,7 +8,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 -1.0 0.0 1.0 2.0 uniform 0 float4 -1.0 0.0 1.0 2.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 1.0, 2.0, 4.0) 2 probe all rgba (0.5, 1.0, 2.0, 4.0) 2
[pixel shader] [pixel shader]
@ -21,5 +21,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 -1.0 0.0 1.0 2.0 uniform 0 float4 -1.0 0.0 1.0 2.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.36787948, 1.0, 2.7182815, 7.38905573) 2 probe all rgba (0.36787948, 1.0, 2.7182815, 7.38905573) 2

View File

@ -9,7 +9,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
draw quad todo(sm>=6) draw quad
probe all rgba (8.0, 8.0, 8.0, 8.0) probe all rgba (8.0, 8.0, 8.0, 8.0)
@ -26,7 +26,7 @@ float4 main() : sv_target
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
uniform 8 float 2 uniform 8 float 2
draw quad todo(sm>=6) draw quad
probe all rgba (10.0, 10.0, 10.0, 10.0) probe all rgba (10.0, 10.0, 10.0, 10.0)
@ -40,7 +40,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (3.0, 3.0, 3.0, 3.0) probe all rgba (3.0, 3.0, 3.0, 3.0)
@ -56,10 +56,10 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float 0 uniform 4 float 0
draw quad todo(sm>=6) draw quad
probe all rgba (4.0, 4.0, 4.0, 4.0) probe all rgba (4.0, 4.0, 4.0, 4.0)
uniform 4 float 2 uniform 4 float 2
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
@ -78,7 +78,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (4.0, 4.0, 4.0, 4.0) probe all rgba (4.0, 4.0, 4.0, 4.0)
@ -99,5 +99,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float 1 uniform 4 float 1
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 2.0, 2.0, 2.0) probe all rgba (2.0, 2.0, 2.0, 2.0)

View File

@ -1,16 +1,20 @@
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return floor(u); return floor(u);
} }
[test] [test]
uniform 0 float4 -0.5 6.5 7.5 3.4 uniform 0 float4 -0.5 6.5 7.5 3.4
draw quad todo(sm>=6) draw quad
probe all rgba (-1.0, 6.0, 7.0, 3.0) 4 probe all rgba (-1.0, 6.0, 7.0, 3.0) 4
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
float a = floor(u.r); float a = floor(u.r);
int2 b = floor(u.gb); int2 b = floor(u.gb);
@ -20,14 +24,16 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 -0.5 6.5 7.5 3.4 uniform 0 float4 -0.5 6.5 7.5 3.4
draw quad todo(sm>=6) draw quad
probe all rgba (6.0, 7.0, -1.0, 3.0) 4 probe all rgba (6.0, 7.0, -1.0, 3.0) 4
[require] [require]
shader model >= 4.0 shader model >= 4.0
[pixel shader] [pixel shader]
float4 main(uniform int4 u) : sv_target uniform int4 u;
float4 main() : sv_target
{ {
float a = floor(u.r); float a = floor(u.r);
int2 b = floor(u.gb); int2 b = floor(u.gb);
@ -37,5 +43,5 @@ float4 main(uniform int4 u) : sv_target
[test] [test]
uniform 0 int4 -1 6 7 3 uniform 0 int4 -1 6 7 3
draw quad todo(sm>=6) draw quad
probe all rgba (6.0, 7.0, -1.0, 3.0) 4 probe all rgba (6.0, 7.0, -1.0, 3.0) 4

View File

@ -1,27 +1,31 @@
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return float4(fmod(u.x, u.y), 0, 0, 0); return float4(fmod(u.x, u.y), 0, 0, 0);
} }
[test] [test]
uniform 0 float4 -0.5 6.5 0.0 0.0 uniform 0 float4 -0.5 6.5 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (-0.5, 0.0, 0.0, 0.0) 4 probe all rgba (-0.5, 0.0, 0.0, 0.0) 4
uniform 0 float4 1.1 0.3 0.0 0.0 uniform 0 float4 1.1 0.3 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.0, 0.0, 0.0) 4 probe all rgba (0.2, 0.0, 0.0, 0.0) 4
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return float4(fmod(u.xy, u.z), 0, 0); return float4(fmod(u.xy, u.z), 0, 0);
} }
[test] [test]
uniform 0 float4 -0.5 6.5 2.0 0.0 uniform 0 float4 -0.5 6.5 2.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (-0.5, 0.5, 0.0, 0.0) 4 probe all rgba (-0.5, 0.5, 0.0, 0.0) 4
uniform 0 float4 1.1 0.3 3.0 0.0 uniform 0 float4 1.1 0.3 3.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.1, 0.3, 0.0, 0.0) 4 probe all rgba (1.1, 0.3, 0.0, 0.0) 4

View File

@ -22,7 +22,7 @@ float4 main(float tex : texcoord) : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0) probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0)
probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0) probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0)
probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0) probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0)
@ -43,7 +43,7 @@ float4 main(float tex : texcoord) : sv_target
draw quad draw quad
probe all rgba (10.0, 45.0, 0.0, 0.0) probe all rgba (10.0, 45.0, 0.0, 0.0)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main(float tex : texcoord) : sv_target float4 main(float tex : texcoord) : sv_target
{ {
int i; int i;

View File

@ -8,5 +8,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 -1.1 1.6 1.3 0.5 uniform 0 float4 -1.1 1.6 1.3 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (0.9, 0.6, 0.3, 0.5) 2 probe all rgba (0.9, 0.6, 0.3, 0.5) 2

View File

@ -22,8 +22,10 @@ todo draw quad
probe all rgba (-1.0, -1.0, 2.0, 4.0) probe all rgba (-1.0, -1.0, 2.0, 4.0)
% As above, but cast "x" to float4 first. % As above, but cast "x" to float4 first.
% In SM 6 a cast seems to implicitly promote the type to const,
% so it fails to match the parameter of func().
[pixel shader todo] [pixel shader todo fail(sm>=6)]
uniform float4 f; uniform float4 f;
@ -46,7 +48,7 @@ probe all rgba (-1.0, -1.0, 2.0, 4.0)
% As above, but declare "x" as float4 and cast it to int4. % As above, but declare "x" as float4 and cast it to int4.
[pixel shader todo] [pixel shader todo fail(sm>=6)]
uniform float4 f; uniform float4 f;
@ -71,13 +73,14 @@ probe all rgba (-1.0, -1.0, 2.0, 4.0)
shader model >= 4.0 shader model >= 4.0
[pixel shader todo] [pixel shader todo]
uniform int4 i;
void func(inout float4 a) void func(inout float4 a)
{ {
a += 0.1; a += 0.1;
} }
float4 main(uniform int4 i) : sv_target float4 main() : sv_target
{ {
int4 x = i; int4 x = i;
func(x); func(x);

View File

@ -36,5 +36,5 @@ float4 main() : sv_target
} }
[test] [test]
todo draw quad todo(sm<6) draw quad
probe all rgba (0.1, 0.2, 0.1, 0.2) probe all rgba (0.1, 0.2, 0.1, 0.2)

View File

@ -80,16 +80,16 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 0.1 uniform 0 float 0.1
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.2, 0.6, 0.3) 1 probe all rgba (0.3, 0.2, 0.6, 0.3) 1
uniform 0 float 0.4 uniform 0 float 0.4
draw quad todo(sm>=6) draw quad
probe all rgba (0.6, 0.5, 0.6, 0.3) 1 probe all rgba (0.6, 0.5, 0.6, 0.3) 1
uniform 0 float 0.6 uniform 0 float 0.6
draw quad todo(sm>=6) draw quad
probe all rgba (0.6, 0.5, 0.4, 0.5) 1 probe all rgba (0.6, 0.5, 0.4, 0.5) 1
uniform 0 float 0.8 uniform 0 float 0.8
draw quad todo(sm>=6) draw quad
probe all rgba (0.8, 0.7, 0.4, 0.5) 1 probe all rgba (0.8, 0.7, 0.4, 0.5) 1
[pixel shader] [pixel shader]
@ -136,13 +136,13 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 0.1 uniform 0 float 0.1
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.1, 0.2, 0.1) 1 probe all rgba (0.2, 0.1, 0.2, 0.1) 1
uniform 0 float 0.5 uniform 0 float 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.4, 1.0, 0.9) 1 probe all rgba (0.5, 0.4, 1.0, 0.9) 1
uniform 0 float 0.9 uniform 0 float 0.9
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 0.9, 1.0, 0.6) 1 probe all rgba (1.0, 0.9, 1.0, 0.6) 1
[pixel shader] [pixel shader]
@ -239,23 +239,23 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 0.0 uniform 0 float 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.2, 0.3, 0.3) 1 probe all rgba (0.3, 0.2, 0.3, 0.3) 1
uniform 0 float 0.1 uniform 0 float 0.1
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.3, 0.3, 0.3) 1 probe all rgba (0.3, 0.3, 0.3, 0.3) 1
uniform 0 float 0.3 uniform 0 float 0.3
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.5, 0.3, 0.3) 1 probe all rgba (0.3, 0.5, 0.3, 0.3) 1
uniform 0 float 0.7 uniform 0 float 0.7
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.9, 0.7, 0.6) 1 probe all rgba (0.3, 0.9, 0.7, 0.6) 1
uniform 0 float 0.9 uniform 0 float 0.9
draw quad todo(sm>=6) draw quad
probe all rgba (0.4, 0.1, 0.7, 0.6) 1 probe all rgba (0.4, 0.1, 0.7, 0.6) 1
[pixel shader todo] [pixel shader todo]

View File

@ -89,7 +89,7 @@ float4 main() : sv_target
return func(); return func();
} }
[pixel shader fail] [pixel shader fail(sm<6)]
void foo() void foo()
{ {
@ -226,7 +226,7 @@ probe all rgba (0.6, 0.1, 0.5, 0)
% Recursion is forbidden. % Recursion is forbidden.
[pixel shader notimpl] [pixel shader notimpl(sm<6) fail(sm>=6)]
void bar(); void bar();
@ -246,7 +246,7 @@ float4 main() : sv_target
return 0; return 0;
} }
[pixel shader notimpl] [pixel shader notimpl(sm<6) fail(sm>=6)]
% Even trivially finite recursion is forbidden. % Even trivially finite recursion is forbidden.
@ -317,7 +317,7 @@ probe all rgba (2.0, 3.0, 6.0, 7.0)
% Inline modifier used on entry point % Inline modifier used on entry point
[pixel shader] [pixel shader fail(sm>=6)]
float func(float a) float func(float a)
{ {
return a + 1; return a + 1;

View File

@ -18,7 +18,7 @@ float4 main(float4 pos : sv_position) : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe (10, 10) rgba (8.0, 8.0, 8.0, 8.0) probe (10, 10) rgba (8.0, 8.0, 8.0, 8.0)
probe (11, 10) rgba (8.0, 8.0, 8.0, 8.0) probe (11, 10) rgba (8.0, 8.0, 8.0, 8.0)
probe (12, 10) rgba (10.0, 10.0, 10.0, 10.0) probe (12, 10) rgba (10.0, 10.0, 10.0, 10.0)

View File

@ -23,7 +23,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.2, 0.1) probe all rgba (0.1, 0.2, 0.2, 0.1)
@ -37,7 +37,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.1, 0.1, 0.0) probe all rgba (0.0, 0.1, 0.1, 0.0)
@ -55,7 +55,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.2, 0.1, 0.1) probe all rgba (0.2, 0.2, 0.1, 0.1)
@ -69,7 +69,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.1, 0.0, 0.0) probe all rgba (0.1, 0.1, 0.0, 0.0)
@ -83,7 +83,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.0, 0.5, 0.0) probe all rgba (0.5, 0.0, 0.5, 0.0)
@ -97,5 +97,5 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.4, 0.0, 0.4) probe all rgba (0.0, 0.4, 0.0, 0.4)

View File

@ -23,7 +23,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.1, 0.1, 0.0) probe all rgba (0.0, 0.1, 0.1, 0.0)
@ -37,7 +37,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.2, 0.1) probe all rgba (0.1, 0.2, 0.2, 0.1)
@ -55,7 +55,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.1, 0.0, 0.0) probe all rgba (0.1, 0.1, 0.0, 0.0)
@ -69,7 +69,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.2, 0.1, 0.1) probe all rgba (0.2, 0.2, 0.1, 0.1)
@ -97,7 +97,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.5, 0.0, 0.5) probe all rgba (0.0, 0.5, 0.0, 0.5)
@ -111,5 +111,5 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.4, 0.0, 0.4, 0.0) probe all rgba (0.4, 0.0, 0.4, 0.0)

View File

@ -28,7 +28,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 3.0, 2.0, 3.0) probe all rgba (2.0, 3.0, 2.0, 3.0)
[texture 1] [texture 1]
@ -53,5 +53,5 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 2.0, 1.0, 2.0) probe all rgba (2.0, 2.0, 1.0, 2.0)

View File

@ -11,6 +11,10 @@ draw quad
probe all rgba (50, 60, 70, 80) probe all rgba (50, 60, 70, 80)
% dxcompiler emits a nop shader which returns immediately.
[require]
shader model < 6.0
[pixel shader] [pixel shader]
float4 main() : sv_target float4 main() : sv_target
{ {
@ -22,8 +26,10 @@ float4 main() : sv_target
[test] [test]
draw quad draw quad
probe all rgba (5.0, 6.0, 7.0, 8.0) todo(sm>=6) probe all rgba (5.0, 6.0, 7.0, 8.0)
[require]
% reset requirements
[pixel shader] [pixel shader]
float4 main() : sv_target float4 main() : sv_target
@ -121,7 +127,7 @@ float4 main() : sv_target
} }
[pixel shader fail] [pixel shader fail(sm<6)]
// Implicit size array as function argument // Implicit size array as function argument
float4 fun(float4 arr[]) float4 fun(float4 arr[])
{ {
@ -150,18 +156,7 @@ float4 main() : sv_target
} }
[pixel shader fail] [pixel shader fail(sm<6)]
// Implicit size array as a cast
float4 main() : sv_target
{
float2 arr1[4] = {1, 2, 3, 4, 5, 6, 7, 8};
float4 arr2[2] = (float4 []) arr1;
return 0.0;
}
[pixel shader fail]
// Implicit size array as a typedef // Implicit size array as a typedef
typedef float4 arrtype[]; typedef float4 arrtype[];
@ -173,20 +168,6 @@ float4 main() : sv_target
} }
[pixel shader fail]
// Implicit size array of elements of size 0
struct emp
{
};
float4 main() : sv_target
{
struct emp arr[] = {1, 2, 3, 4};
return 0.0;
}
[pixel shader fail] [pixel shader fail]
// Implicit size array of elements of size 0, without initializer // Implicit size array of elements of size 0, without initializer
struct emp struct emp
@ -201,16 +182,6 @@ float4 main() : sv_target
} }
[pixel shader fail]
// Broadcast to an implicit size array
float4 main() : sv_target
{
int a[4] = (int[]) 0;
return 0.0;
}
[pixel shader fail] [pixel shader fail]
// Implicit size array with an initializer of size 0 // Implicit size array with an initializer of size 0
struct emp struct emp
@ -225,6 +196,46 @@ float4 main() : sv_target
} }
% dxcompiler crashes.
[require]
shader model < 6.0
[pixel shader fail]
// Implicit size array as a cast
float4 main() : sv_target
{
float2 arr1[4] = {1, 2, 3, 4, 5, 6, 7, 8};
float4 arr2[2] = (float4 []) arr1;
return 0.0;
}
[pixel shader fail]
// Implicit size array of elements of size 0
struct emp
{
};
float4 main() : sv_target
{
struct emp arr[] = {1, 2, 3, 4};
return 0.0;
}
[pixel shader fail]
// Broadcast to an implicit size array
float4 main() : sv_target
{
int a[4] = (int[]) 0;
return 0.0;
}
[pixel shader fail] [pixel shader fail]
// Implicit size array of elements of size 0 with initializer of size 0 // Implicit size array of elements of size 0 with initializer of size 0
struct emp struct emp

View File

@ -25,7 +25,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.2, 0.2, 0.1) probe all rgba (0.2, 0.2, 0.2, 0.1)
@ -48,7 +48,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (31.1, 41.1, 51.1, 61.1) 1 probe all rgba (31.1, 41.1, 51.1, 61.1) 1

View File

@ -1,4 +1,4 @@
[pixel shader] [pixel shader fail(sm>=6)]
float2 max(float2 a, float2 b) float2 max(float2 a, float2 b)
{ {
@ -14,7 +14,7 @@ float4 main() : sv_target
draw quad draw quad
probe all rgba (0.3, 0.3, 0.4, 0.6) probe all rgba (0.3, 0.3, 0.4, 0.6)
[pixel shader] [pixel shader fail(sm>=6)]
float2 max(float2 a, float3 b) float2 max(float2 a, float3 b)
{ {
@ -29,3 +29,23 @@ float4 main() : sv_target
[test] [test]
draw quad draw quad
probe all rgba (0.3, 0.3, 0.3, 0.4) probe all rgba (0.3, 0.3, 0.3, 0.4)
[require]
shader model >= 6.0
[pixel shader]
float2 max(float2 a, float2 b)
{
return a + b;
}
float4 main() : sv_target
{
return float4(max(0.1, 0.2), 0.0, max(float2(0.1, 0.2), float2(0.3, 0.4)));
}
[test]
draw quad
probe all rgba (0.2, 0.0, 0.3, 0.4)

View File

@ -58,14 +58,14 @@ float4 main(float2 pos : TEXCOORD0) : sv_target
return pos; return pos;
} }
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
float a[0]; float a[0];
return 0; return 0;
} }
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
float a[65537]; float a[65537];
@ -126,7 +126,7 @@ float4 main() : sv_target
return 0; return 0;
} }
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
const float4 x; const float4 x;
@ -186,7 +186,7 @@ void main(out float4 o : sv_target)
sub(o); sub(o);
} }
[pixel shader fail] [pixel shader fail(sm<6)]
void sub(in out uniform float4 o) void sub(in out uniform float4 o)
{ {
} }
@ -211,7 +211,7 @@ float4 main(void) : sv_target
return 0; return 0;
} }
[pixel shader fail] [pixel shader fail(sm<6)]
const const float4 c; const const float4 c;
float4 main() : sv_target float4 main() : sv_target
@ -233,7 +233,7 @@ float4 main() : sv_target
return a.a; return a.a;
} }
[pixel shader fail] [pixel shader fail(sm<6)]
struct apple struct apple
{ {
sampler sam; sampler sam;

View File

@ -22,7 +22,7 @@ float4 main(bool face : sv_isfrontface) : sv_target
} }
[test] [test]
draw triangle strip 4 todo(sm>=6) draw triangle strip 4
probe all rgba (0.0, 1.0, 0.0, 1.0) probe all rgba (0.0, 1.0, 0.0, 1.0)
[vertex buffer 0] [vertex buffer 0]
@ -32,5 +32,5 @@ probe all rgba (0.0, 1.0, 0.0, 1.0)
2.0 2.0 2.0 2.0
[test] [test]
draw triangle strip 4 todo(sm>=6) draw triangle strip 4
probe all rgba (1.0, 2.0, 1.0, 2.0) probe all rgba (1.0, 2.0, 1.0, 2.0)

View File

@ -10,7 +10,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 4.0 5.0 uniform 0 float4 2.0 3.0 4.0 5.0
uniform 4 float4 0.0 -10.0 10.0 100.0 uniform 4 float4 0.0 -10.0 10.0 100.0
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 0.00292968750, 4096.0, 6.33825300e+030) 2 probe all rgba (2.0, 0.00292968750, 4096.0, 6.33825300e+030) 2
[require] [require]
@ -28,7 +28,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 int4 2 3 4 5 uniform 0 int4 2 3 4 5
uniform 4 int4 0 -10 10 100 uniform 4 int4 0 -10 10 100
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 0.00292968750, 4096.0, 6.33825300e+030) 2 probe all rgba (2.0, 0.00292968750, 4096.0, 6.33825300e+030) 2

View File

@ -8,7 +8,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 4.0 5.0 uniform 0 float4 2.0 3.0 4.0 5.0
draw quad todo(sm>=6) draw quad
probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1 probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1
[pixel shader] [pixel shader]
@ -21,7 +21,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 4.0 0.0 uniform 0 float4 2.0 3.0 4.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1 probe all rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1
[pixel shader] [pixel shader]
@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 0.0 0.0 uniform 0 float4 2.0 3.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1 probe all rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1
[pixel shader] [pixel shader]
@ -47,7 +47,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 0.0 0.0 0.0 uniform 0 float4 2.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 2.0, 2.0, 2.0) probe all rgba (2.0, 2.0, 2.0, 2.0)
[pixel shader] [pixel shader]
@ -60,7 +60,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 0.0 0.0 0.0 uniform 0 float4 2.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 2.0, 2.0, 2.0) probe all rgba (2.0, 2.0, 2.0, 2.0)
[pixel shader fail] [pixel shader fail]

View File

@ -12,7 +12,7 @@ float4 main() : SV_TARGET
uniform 0 float4 2.0 3.0 4.0 5.0 uniform 0 float4 2.0 3.0 4.0 5.0
uniform 4 float4 0.0 -10.0 10.0 100.0 uniform 4 float4 0.0 -10.0 10.0 100.0
uniform 8 float4 0.0 1.0 -1.0 0.75 uniform 8 float4 0.0 1.0 -1.0 0.75
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, -10.0, -2.0, 76.25) probe all rgba (2.0, -10.0, -2.0, 76.25)
[require] [require]
@ -32,7 +32,7 @@ float4 main() : SV_TARGET
uniform 0 int4 2 3 4 0 uniform 0 int4 2 3 4 0
uniform 4 int4 0 -10 10 1000000 uniform 4 int4 0 -10 10 1000000
uniform 8 int4 0 1 -1 1000000 uniform 8 int4 0 1 -1 1000000
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, -10.0, -2.0, 1e12) probe all rgba (2.0, -10.0, -2.0, 1e12)

View File

@ -1,73 +1,86 @@
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return lit(u.x, u.y, u.z); return lit(u.x, u.y, u.z);
} }
[test] [test]
uniform 0 float4 -0.1 10.0 0.0 0.0 uniform 0 float4 -0.1 10.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 0.0, 0.0, 1.0) probe all rgba (1.0, 0.0, 0.0, 1.0)
[test] [test]
uniform 0 float4 1.2 -0.1 0.0 0.0 uniform 0 float4 1.2 -0.1 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.2, 0.0, 1.0) probe all rgba (1.0, 1.2, 0.0, 1.0)
[test] [test]
uniform 0 float4 1.2 2.0 3.0 0.0 uniform 0 float4 1.2 2.0 3.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.2, 8.0, 1.0) probe all rgba (1.0, 1.2, 8.0, 1.0)
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return lit(u.x, u.y, u.z) + lit(u.x, u.y, u.z); return lit(u.x, u.y, u.z) + lit(u.x, u.y, u.z);
} }
[test] [test]
uniform 0 float4 1.2 2.0 3.0 0.0 uniform 0 float4 1.2 2.0 3.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 2.4, 16.0, 2.0) probe all rgba (2.0, 2.4, 16.0, 2.0)
[pixel shader fail] [pixel shader fail]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return lit(u.xy, u.y, u.z); return lit(u.xy, u.y, u.z);
} }
[pixel shader fail] [pixel shader fail]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return lit(u.x, u.xy, u.z); return lit(u.x, u.xy, u.z);
} }
[pixel shader fail] [pixel shader fail]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return lit(u.x, u.y, u.yz); return lit(u.x, u.y, u.yz);
} }
[pixel shader fail] [pixel shader fail]
uniform float4x4 m; uniform float4x4 m;
uniform float4 u;
float4 main(uniform float4 u) : sv_target float4 main() : sv_target
{ {
return lit(m, u.y, u.z); return lit(m, u.y, u.z);
} }
[pixel shader fail] [pixel shader fail]
uniform float4x4 m; uniform float4x4 m;
uniform float4 u;
float4 main(uniform float4 u) : sv_target float4 main() : sv_target
{ {
return lit(u.x, m, u.z); return lit(u.x, m, u.z);
} }
[pixel shader fail] [pixel shader fail]
uniform float4x4 m; uniform float4x4 m;
uniform float4 u;
float4 main(uniform float4 u) : sv_target float4 main() : sv_target
{ {
return lit(u.x, u.y, m); return lit(u.x, u.y, m);
} }

View File

@ -22,10 +22,10 @@ float4 main() : sv_target
[test] [test]
uniform 0 uint 0 uniform 0 uint 0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 0.0, 1.0, 0.0) probe all rgba (1.0, 0.0, 1.0, 0.0)
uniform 0 uint 1 uniform 0 uint 1
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 1.0, 0.0) probe all rgba (0.0, 0.0, 1.0, 0.0)
[pixel shader fail] [pixel shader fail]
@ -47,5 +47,5 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 0.0, 1.0, 0.0) probe all rgba (1.0, 0.0, 1.0, 0.0)

View File

@ -8,7 +8,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 2.0 4.0 5.0 0.4 uniform 0 float4 2.0 4.0 5.0 0.4
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 2.32192802, -1.32192802) 1 probe all rgba (1.0, 2.0, 2.32192802, -1.32192802) 1
[pixel shader] [pixel shader]
@ -21,7 +21,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 10.0 100.0 1.0 0.1 uniform 0 float4 10.0 100.0 1.0 0.1
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 0.0, -1.0) 1 probe all rgba (1.0, 2.0, 0.0, -1.0) 1
[pixel shader] [pixel shader]
@ -34,5 +34,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 3.0 10.0 1.0 0.1 uniform 0 float4 3.0 10.0 1.0 0.1
draw quad todo(sm>=6) draw quad
probe all rgba (1.0986123, 2.302585, 0.0, -2.302585) 2 probe all rgba (1.0986123, 2.302585, 0.0, -2.302585) 2

View File

@ -16,7 +16,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 5.0 uniform 0 float 5.0
draw quad todo(sm>=6) draw quad
probe all rgba (50.0, 50.0, 50.0, 50.0) probe all rgba (50.0, 50.0, 50.0, 50.0)
@ -39,7 +39,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 4.0 uniform 0 float 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (20.0, 20.0, 20.0, 20.0) probe all rgba (20.0, 20.0, 20.0, 20.0)
[pixel shader] [pixel shader]
@ -68,7 +68,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 4.0 uniform 0 float 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (409.1, 409.1, 409.1, 409.1) probe all rgba (409.1, 409.1, 409.1, 409.1)
[pixel shader] [pixel shader]
@ -98,5 +98,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 4.0 uniform 0 float 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (410.1, 410.1, 410.1, 410.1) probe all rgba (410.1, 410.1, 410.1, 410.1)

View File

@ -17,7 +17,7 @@ uniform 0 float4 0.1 0.2 0.0 0.0
uniform 4 float4 0.3 0.4 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0
uniform 8 float4 0.1 0.3 0.0 0.0 uniform 8 float4 0.1 0.3 0.0 0.0
uniform 12 float4 0.2 0.4 0.0 0.0 uniform 12 float4 0.2 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.17, 0.39, 0.17, 0.39) 1 probe all rgba (0.17, 0.39, 0.17, 0.39) 1
@ -40,7 +40,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.1 0.2 0.0 0.0 uniform 0 float4 0.1 0.2 0.0 0.0
uniform 4 float4 0.3 0.4 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4) probe all rgba (0.1, 0.2, 0.3, 0.4)
@ -61,7 +61,7 @@ uniform 0 float4 0.0 0.0 0.0 0.0
uniform 4 float4 0.0 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0
uniform 8 float4 0.5 0.6 0.0 0.0 uniform 8 float4 0.5 0.6 0.0 0.0
uniform 12 float4 0.7 0.8 0.0 0.0 uniform 12 float4 0.7 0.8 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.6, 0.7, 0.8) probe all rgba (0.5, 0.6, 0.7, 0.8)
@ -90,7 +90,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.1 0.2 0.0 0.0 uniform 0 float4 0.1 0.2 0.0 0.0
uniform 4 float4 0.3 0.4 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.23, 0.34, 0.5, 0.5) 1 probe all rgba (0.23, 0.34, 0.5, 0.5) 1
@ -111,7 +111,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.1 0.2 0.0 0.0 uniform 0 float4 0.1 0.2 0.0 0.0
uniform 4 float4 0.3 0.4 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4) probe all rgba (0.1, 0.2, 0.3, 0.4)
@ -149,7 +149,7 @@ uniform 0 float4 0.3 0.4 0.0 0.0
uniform 4 float4 0.0 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0
uniform 8 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.0 0.0 0.0 0.0
uniform 12 float4 0.5 0.6 0.0 0.0 uniform 12 float4 0.5 0.6 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.4, 0.5, 0.6) probe all rgba (0.3, 0.4, 0.5, 0.6)
@ -173,7 +173,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.1 0.2 0.0 0.0 uniform 0 float4 0.1 0.2 0.0 0.0
uniform 4 float4 0.3 0.4 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4) probe all rgba (0.1, 0.2, 0.3, 0.4)
@ -201,7 +201,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.2 0.4 0.0 0.0 uniform 0 float4 0.2 0.4 0.0 0.0
uniform 4 float4 0.3 0.5 0.0 0.0 uniform 4 float4 0.3 0.5 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.3, 0.4, 0.5) probe all rgba (0.2, 0.3, 0.4, 0.5)
@ -221,7 +221,7 @@ uniform 0 float4 0.3 0.0 0.0 0.0
uniform 4 float4 0.4 0.0 0.0 0.0 uniform 4 float4 0.4 0.0 0.0 0.0
uniform 8 float4 0.0 0.5 0.0 0.0 uniform 8 float4 0.0 0.5 0.0 0.0
uniform 12 float4 0.0 0.6 0.0 0.0 uniform 12 float4 0.0 0.6 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.4, 0.5, 0.6) probe all rgba (0.3, 0.4, 0.5, 0.6)
% Compiler options % Compiler options
@ -245,7 +245,7 @@ uniform 0 float4 0.1 0.5 0.9 1.3
uniform 4 float4 0.2 0.6 1.0 1.4 uniform 4 float4 0.2 0.6 1.0 1.4
uniform 8 float4 0.3 0.7 1.1 1.5 uniform 8 float4 0.3 0.7 1.1 1.5
uniform 12 float4 0.4 0.8 1.2 1.6 uniform 12 float4 0.4 0.8 1.2 1.6
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.3, 0.6, 0.7) 1 probe all rgba (0.2, 0.3, 0.6, 0.7) 1
[require] [require]
@ -267,7 +267,7 @@ uniform 0 float4 0.1 0.5 0.9 1.3
uniform 4 float4 0.2 0.6 1.0 1.4 uniform 4 float4 0.2 0.6 1.0 1.4
uniform 8 float4 0.3 0.7 1.1 1.5 uniform 8 float4 0.3 0.7 1.1 1.5
uniform 12 float4 0.4 0.8 1.2 1.6 uniform 12 float4 0.4 0.8 1.2 1.6
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.3, 0.6, 0.7) 1 probe all rgba (0.2, 0.3, 0.6, 0.7) 1
[require] [require]
@ -289,7 +289,7 @@ uniform 0 float4 0.1 0.5 0.9 1.3
uniform 4 float4 0.2 0.6 1.0 1.4 uniform 4 float4 0.2 0.6 1.0 1.4
uniform 8 float4 0.3 0.7 1.1 1.5 uniform 8 float4 0.3 0.7 1.1 1.5
uniform 12 float4 0.4 0.8 1.2 1.6 uniform 12 float4 0.4 0.8 1.2 1.6
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.9, 0.6, 1.0) 1 probe all rgba (0.5, 0.9, 0.6, 1.0) 1
[require] [require]
@ -317,7 +317,7 @@ uniform 16 float4 1.7 2.1 2.5 2.9
uniform 20 float4 1.8 2.2 2.6 3.0 uniform 20 float4 1.8 2.2 2.6 3.0
uniform 24 float4 1.9 2.3 2.7 3.1 uniform 24 float4 1.9 2.3 2.7 3.1
uniform 28 float4 2.0 2.4 2.8 3.2 uniform 28 float4 2.0 2.4 2.8 3.2
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.4, 2.5, 2.9) 1 probe all rgba (0.3, 0.4, 2.5, 2.9) 1
[require] [require]
@ -345,7 +345,7 @@ uniform 16 float4 1.7 2.1 2.5 2.9
uniform 20 float4 1.8 2.2 2.6 3.0 uniform 20 float4 1.8 2.2 2.6 3.0
uniform 24 float4 1.9 2.3 2.7 3.1 uniform 24 float4 1.9 2.3 2.7 3.1
uniform 28 float4 2.0 2.4 2.8 3.2 uniform 28 float4 2.0 2.4 2.8 3.2
draw quad todo(sm>=6) draw quad
probe all rgba (1.2, 1.6, 3.1, 3.2) 1 probe all rgba (1.2, 1.6, 3.1, 3.2) 1
[require] [require]
@ -365,5 +365,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.1 0.2 0.0 0.0 uniform 0 float4 0.1 0.2 0.0 0.0
uniform 4 float4 0.3 0.4 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.3, 0.2, 0.4) 1 probe all rgba (0.1, 0.3, 0.2, 0.4) 1

View File

@ -11,10 +11,10 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.1 0.3 0.0 0.0 uniform 0 float4 0.1 0.3 0.0 0.0
uniform 4 float4 0.2 0.4 0.0 0.0 uniform 4 float4 0.2 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.3, 0.2, 0.4) probe all rgba (0.1, 0.3, 0.2, 0.4)
[pixel shader fail] [pixel shader fail(sm<6)]
row_major row_major float4x4 m; row_major row_major float4x4 m;
float4 main() : sv_target float4 main() : sv_target

View File

@ -18,5 +18,5 @@ uniform 0 float4 0.1 0.2 0.0 0.0
uniform 4 float4 0.3 0.4 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0
uniform 8 float4 0.1 0.3 0.0 0.0 uniform 8 float4 0.1 0.3 0.0 0.0
uniform 12 float4 0.2 0.4 0.0 0.0 uniform 12 float4 0.2 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.17, 0.39, 0.17, 0.39) 1 probe all rgba (0.17, 0.39, 0.17, 0.39) 1

View File

@ -1,5 +1,8 @@
[pixel shader] [pixel shader]
float4 main(uniform float4 a, uniform float2 b) : SV_TARGET uniform float4 a;
uniform float2 b;
float4 main() : SV_TARGET
{ {
float u = a.x, v = a.y, w = a.z, x = a.w, y = b.x, z = b.y; float u = a.x, v = a.y, w = a.z, x = a.w, y = b.x, z = b.y;
return float4(x * y - z / w + --u / -v, return float4(x * y - z / w + --u / -v,
@ -11,5 +14,5 @@ float4 main(uniform float4 a, uniform float2 b) : SV_TARGET
[test] [test]
uniform 0 float4 2.5 0.3 0.2 0.7 uniform 0 float4 2.5 0.3 0.2 0.7
uniform 4 float4 0.1 1.5 0.0 0.0 uniform 4 float4 0.1 1.5 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (-12.43, 9.833333, 1.6, 35.0) 1 probe all rgba (-12.43, 9.833333, 1.6, 35.0) 1

View File

@ -11,7 +11,7 @@ uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
uniform 8 float4 9.0 10.0 11.0 12.0 uniform 8 float4 9.0 10.0 11.0 12.0
uniform 12 float4 13.0 14.0 15.0 16.0 uniform 12 float4 13.0 14.0 15.0 16.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 10.0, 15.0) probe all rgba (1.0, 2.0, 10.0, 15.0)
[pixel shader] [pixel shader]
@ -27,7 +27,7 @@ uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
uniform 8 float4 9.0 10.0 11.0 12.0 uniform 8 float4 9.0 10.0 11.0 12.0
uniform 12 float4 13.0 14.0 15.0 16.0 uniform 12 float4 13.0 14.0 15.0 16.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 10.0, 15.0) probe all rgba (1.0, 2.0, 10.0, 15.0)
[pixel shader] [pixel shader]
@ -43,7 +43,7 @@ uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
uniform 8 float4 9.0 10.0 11.0 12.0 uniform 8 float4 9.0 10.0 11.0 12.0
uniform 12 float4 13.0 14.0 15.0 16.0 uniform 12 float4 13.0 14.0 15.0 16.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 5.0, 7.0, 12.0) probe all rgba (1.0, 5.0, 7.0, 12.0)
[pixel shader] [pixel shader]
@ -58,7 +58,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 1.0 2.0 3.0 0.0 uniform 0 float4 1.0 2.0 3.0 0.0
uniform 4 float4 5.0 6.0 7.0 0.0 uniform 4 float4 5.0 6.0 7.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 3.0, 6.0, 7.0) probe all rgba (1.0, 3.0, 6.0, 7.0)
[pixel shader] [pixel shader]
@ -120,7 +120,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 2 uniform 0 float 2
draw quad todo(sm>=6) draw quad
probe all rgba (8, 9, 10, 11) probe all rgba (8, 9, 10, 11)

View File

@ -37,27 +37,27 @@ size (640, 480)
format r32 float format r32 float
size (640, 480) size (640, 480)
[pixel shader] [pixel shader fail(sm>=6)]
row_major float4x1 main() : sv_target row_major float4x1 main() : sv_target
{ {
return float4(1.0, 2.0, 3.0, 4.0); return float4(1.0, 2.0, 3.0, 4.0);
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe render target 0 all r (1.0) probe render target 0 all r (1.0)
probe render target 1 all r (2.0) probe render target 1 all r (2.0)
probe render target 2 all r (3.0) probe render target 2 all r (3.0)
probe render target 3 all r (4.0) probe render target 3 all r (4.0)
[pixel shader] [pixel shader fail(sm>=6)]
float1x4 main() : sv_target float1x4 main() : sv_target
{ {
return float4(1.0, 2.0, 3.0, 4.0); return float4(1.0, 2.0, 3.0, 4.0);
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe render target 0 all r (1.0) probe render target 0 all r (1.0)
probe render target 1 all r (2.0) probe render target 1 all r (2.0)
probe render target 2 all r (3.0) probe render target 2 all r (3.0)
@ -70,7 +70,7 @@ void main(out float1x2 x : sv_target0, out float1x2 y : sv_target1)
y = float2(5.0, 6.0); y = float2(5.0, 6.0);
} }
[pixel shader] [pixel shader fail(sm>=6)]
void main(out float1x2 x : sv_target0, out float1x2 y : sv_target2) void main(out float1x2 x : sv_target0, out float1x2 y : sv_target2)
{ {
x = float2(1.0, 2.0); x = float2(1.0, 2.0);
@ -78,7 +78,7 @@ void main(out float1x2 x : sv_target0, out float1x2 y : sv_target2)
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe render target 0 all r (1.0) probe render target 0 all r (1.0)
probe render target 1 all r (2.0) probe render target 1 all r (2.0)
probe render target 2 all r (5.0) probe render target 2 all r (5.0)
@ -88,7 +88,7 @@ probe render target 3 all r (6.0)
format r32g32b32a32 float format r32g32b32a32 float
size (640, 480) size (640, 480)
[pixel shader] [pixel shader fail(sm>=6)]
void main(out row_major float1x4 x : sv_target0, out float1x2 y : sv_target1) void main(out row_major float1x4 x : sv_target0, out float1x2 y : sv_target1)
{ {
x = float4(1.0, 2.0, 3.0, 4.0); x = float4(1.0, 2.0, 3.0, 4.0);
@ -96,7 +96,7 @@ void main(out row_major float1x4 x : sv_target0, out float1x2 y : sv_target1)
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe render target 0 all rgba (1.0, 2.0, 3.0, 4.0) probe render target 0 all rgba (1.0, 2.0, 3.0, 4.0)
probe render target 1 all r (5.0) probe render target 1 all r (5.0)
probe render target 2 all r (6.0) probe render target 2 all r (6.0)

View File

@ -1,17 +1,21 @@
[pixel shader] [pixel shader]
float4 main(uniform float2 u) : sv_target uniform float2 u;
float4 main() : sv_target
{ {
return float4(max(u.x, u.y), max(2, 2.1), max(true, 2), max(-1, -1)); return float4(max(u.x, u.y), max(2, 2.1), max(true, 2), max(-1, -1));
} }
[test] [test]
uniform 0 float4 0.7 -0.1 0.0 0.0 uniform 0 float4 0.7 -0.1 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.7, 2.1, 2.0, -1.0) probe all rgba (0.7, 2.1, 2.0, -1.0)
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
float3 a = float3(-0.1, 0.2, 0.3); float3 a = float3(-0.1, 0.2, 0.3);
@ -20,7 +24,7 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 0.7 -0.1 0.4 0.8 uniform 0 float4 0.7 -0.1 0.4 0.8
draw quad todo(sm>=6) draw quad
probe all rgba (0.7, 0.8, 0.7, 0.2) probe all rgba (0.7, 0.8, 0.7, 0.2)

View File

@ -1,4 +1,4 @@
[pixel shader fail] [pixel shader fail(sm<6)]
uniform float4 color[2][3]; uniform float4 color[2][3];
float4 main() : sv_target float4 main() : sv_target
@ -21,5 +21,5 @@ uniform 8 float4 0.3 0.0 0.0 0.0
uniform 12 float4 0.4 0.0 0.0 0.0 uniform 12 float4 0.4 0.0 0.0 0.0
uniform 16 float4 0.5 0.0 0.0 0.0 uniform 16 float4 0.5 0.0 0.0 0.0
uniform 20 float4 0.6 0.0 0.0 0.0 uniform 20 float4 0.6 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.4, 0.1, 0.6, 0.3) probe all rgba (0.4, 0.1, 0.6, 0.3)

View File

@ -23,7 +23,7 @@ float4 main(nointerpolation float4 t : texcoord) : sv_target
} }
[test] [test]
draw triangle list 3 todo(sm>=6) draw triangle list 3
probe all rgba (0.0, 1.0, 0.0, 1.0) probe all rgba (0.0, 1.0, 0.0, 1.0)
[vertex shader] [vertex shader]
@ -50,7 +50,7 @@ float4 main(ps_input input) : sv_target
} }
[test] [test]
draw triangle list 3 todo(sm>=6) draw triangle list 3
probe all rgba (0.0, 1.0, 0.0, 1.0) probe all rgba (0.0, 1.0, 0.0, 1.0)
[vertex shader] [vertex shader]
@ -77,7 +77,7 @@ float4 main(nointerpolation ps_input input) : sv_target
} }
[test] [test]
draw triangle list 3 todo(sm>=6) draw triangle list 3
probe all rgba (0.0, 1.0, 0.0, 1.0) probe all rgba (0.0, 1.0, 0.0, 1.0)
[vertex shader] [vertex shader]
@ -104,7 +104,7 @@ float4 main(centroid ps_input input) : sv_target
} }
[test] [test]
draw triangle list 3 todo(sm>=6) draw triangle list 3
probe all rgba (0.0, 1.0, 0.0, 1.0) probe all rgba (0.0, 1.0, 0.0, 1.0)
[vertex shader] [vertex shader]
@ -131,7 +131,7 @@ float4 main(nointerpolation ps_input input) : sv_target
} }
[test] [test]
draw triangle list 3 todo(sm>=6) draw triangle list 3
probe all rgba (0.0, 1.0, 0.0, 1.0) probe all rgba (0.0, 1.0, 0.0, 1.0)
[vertex shader fail todo] [vertex shader fail todo]

View File

@ -8,7 +8,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 4.0 5.0 uniform 0 float4 2.0 3.0 4.0 5.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.272165537, 0.408248305, 0.544331074, 0.680413842) 2 probe all rgba (0.272165537, 0.408248305, 0.544331074, 0.680413842) 2
[pixel shader] [pixel shader]
@ -21,7 +21,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 4.0 0.0 uniform 0 float4 2.0 3.0 4.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.371390700, 0.557086051, 0.742781401, 0.0) 1 probe all rgba (0.371390700, 0.557086051, 0.742781401, 0.0) 1
[pixel shader] [pixel shader]
@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 0.0 0.0 uniform 0 float4 2.0 3.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.554700196, 0.832050323, 0.0, 0.0) 1 probe all rgba (0.554700196, 0.832050323, 0.0, 0.0) 1
[pixel shader] [pixel shader]
@ -47,7 +47,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 0.0 0.0 0.0 uniform 0 float4 2.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] [pixel shader]
@ -60,7 +60,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 0.0 0.0 0.0 uniform 0 float4 2.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader fail] [pixel shader fail]

View File

@ -38,7 +38,7 @@ vector main() : sv_target
return ret; return ret;
} }
[pixel shader fail] [pixel shader fail(sm<6)]
vector main() : sv_target vector main() : sv_target
{ {
vector<float> ret = vector(1.0, 2.0, 3.0, 4.0); vector<float> ret = vector(1.0, 2.0, 3.0, 4.0);
@ -71,7 +71,7 @@ float4 main() : sv_target
draw quad draw quad
probe all rgba (5.0, 6.0, 7.0, 0.0) probe all rgba (5.0, 6.0, 7.0, 0.0)
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
matrix m = matrix<float>(1.0, 2.0, 3.0, 4.0, matrix m = matrix<float>(1.0, 2.0, 3.0, 4.0,
@ -81,7 +81,7 @@ float4 main() : sv_target
return m[1]; return m[1];
} }
[pixel shader fail] [pixel shader fail(sm<6)]
float4 main() : sv_target float4 main() : sv_target
{ {
matrix m = matrix<float, 4>(1.0, 2.0, 3.0, 4.0, matrix m = matrix<float, 4>(1.0, 2.0, 3.0, 4.0,

View File

@ -93,7 +93,7 @@ void main() {}
[numthreads("1", 1, 1)] [numthreads("1", 1, 1)]
void main() {} void main() {}
[compute shader todo] [compute shader todo fail(sm>=6)]
static int x = 1; static int x = 1;
[numthreads(x, 1, 1)] [numthreads(x, 1, 1)]
@ -103,7 +103,7 @@ void main() {}
void main() {} void main() {}
[compute shader fail] [compute shader fail(sm<6)]
[NumThreads(1, 1, 1)] [NumThreads(1, 1, 1)]
void main() {} void main() {}
@ -122,7 +122,7 @@ void main() {}
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]
void main(); void main();
[compute shader fail] [compute shader fail(sm<6)]
void main(); void main();
@ -153,7 +153,7 @@ static int x = 1;
[numthreads((x = 2), 1, 1)] [numthreads((x = 2), 1, 1)]
void main() {} void main() {}
[compute shader] [compute shader fail(sm>=6)]
static int x = 1; static int x = 1;
@ -185,7 +185,7 @@ void main(uint2 id : sv_dispatchthreadid)
} }
[test] [test]
dispatch 1 1 1 todo(sm>=6) dispatch 1 1 1
probe uav 0 (0, 0) r (2.0) probe uav 0 (0, 0) r (2.0)
probe uav 0 (0, 1) r (1.0) probe uav 0 (0, 1) r (1.0)
probe uav 0 (1, 0) r (2.0) probe uav 0 (1, 0) r (2.0)

View File

@ -19,7 +19,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 3.0, 0.0) probe all rgba (1.0, 2.0, 3.0, 0.0)
@ -45,7 +45,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 5.0, 0.0) probe all rgba (1.0, 2.0, 5.0, 0.0)
@ -66,5 +66,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0 uniform 4 float4 5.0 6.0 7.0 8.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 2.0, 5.0, 0.0) probe all rgba (1.0, 2.0, 5.0, 0.0)

View File

@ -7,6 +7,11 @@ float4 main(out Texture2D tex : TEXTURE) : sv_target
} }
% dxcompiler crashes.
[require]
shader model < 6.0
[pixel shader fail todo] [pixel shader fail todo]
struct params struct params
{ {
@ -23,7 +28,7 @@ float4 main(inout params x) : sv_target
shader model >= 5.0 shader model >= 5.0
[pixel shader todo] [pixel shader todo fail(sm>=6)]
uniform float global; uniform float global;
struct apple struct apple
@ -32,7 +37,12 @@ struct apple
float4 pos : sv_position; float4 pos : sv_position;
}; };
#ifdef __hlsl_dx_compiler
uniform float param;
float4 main(struct apple input) : sv_target
#else
float4 main(struct apple input, uniform float param) : sv_target float4 main(struct apple input, uniform float param) : sv_target
#endif
{ {
return input.tex.Load(int3(0, 0, 0)) + global + param + input.pos; return input.tex.Load(int3(0, 0, 0)) + global + param + input.pos;
} }
@ -89,7 +99,7 @@ filter linear linear linear
address clamp clamp clamp address clamp clamp clamp
[pixel shader todo] [pixel shader todo fail(sm>=6)]
struct apple struct apple
{ {
Texture2D unused; // must reserve t1 Texture2D unused; // must reserve t1
@ -113,7 +123,7 @@ todo draw quad
todo probe all rgba (416.0, 416.0, 416.0, 111.0) todo probe all rgba (416.0, 416.0, 416.0, 111.0)
[pixel shader todo] [pixel shader todo fail(sm>=6)]
Texture2D tex; Texture2D tex;
struct apple struct apple
@ -157,7 +167,7 @@ filter point point point
address clamp clamp clamp address clamp clamp clamp
[pixel shader todo] [pixel shader todo fail(sm>=6)]
Texture2D tex; Texture2D tex;
sampler sam0; // must reserve s3 sampler sam0; // must reserve s3

View File

@ -46,7 +46,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (77.77, 77.77, 77.77, 77.77) probe all rgba (77.77, 77.77, 77.77, 77.77)
@ -73,7 +73,7 @@ float4 main(float4 pos : sv_position) : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4) probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4)
probe (1, 0) rgba (0.5, 0.7, 0.6, 0.8) probe (1, 0) rgba (0.5, 0.7, 0.6, 0.8)
probe (0, 1) rgba (0.6, 0.5, 0.2, 0.1) probe (0, 1) rgba (0.6, 0.5, 0.2, 0.1)
@ -111,7 +111,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (312, 312, 312, 111) probe all rgba (312, 312, 312, 111)
@ -134,11 +134,11 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (2132, 2132, 2132, 1111) probe all rgba (2132, 2132, 2132, 1111)
[pixel shader fail] [pixel shader fail(sm<6)]
Texture2D tex[3]; Texture2D tex[3];
uniform int n; uniform int n;
@ -158,7 +158,7 @@ float4 main() : sv_target
} }
[pixel shader fail] [pixel shader fail(sm<6)]
// Note: Only valid in shader model 5.1 // Note: Only valid in shader model 5.1
Texture2D tex[3]; Texture2D tex[3];
uniform int n; uniform int n;
@ -169,7 +169,7 @@ float4 main() : sv_target
} }
[pixel shader fail] [pixel shader fail(sm<6)]
// Note: Only valid in shader model 5.1 // Note: Only valid in shader model 5.1
RWTexture2D<float4> tex[3]; RWTexture2D<float4> tex[3];
uniform int n; uniform int n;
@ -202,7 +202,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 10.0 uniform 0 float 10.0
draw quad todo(sm>=6) draw quad
probe (0, 0) rgba (11.0, 12.0, 13.0, 11.0) probe (0, 0) rgba (11.0, 12.0, 13.0, 11.0)
@ -223,7 +223,7 @@ shader model >= 5.0
size (1, 1) size (1, 1)
1.0 2.0 3.0 4.0 1.0 2.0 3.0 4.0
[pixel shader todo] [pixel shader todo fail(sm>=6)]
struct apple { struct apple {
Texture2D tex; Texture2D tex;
float4 fo : COLOR; float4 fo : COLOR;

View File

@ -1,12 +1,14 @@
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return float4(pow(u.y, 3), pow(u.xy, u.zw), pow(0.5, u.w)); return float4(pow(u.y, 3), pow(u.xy, u.zw), pow(0.5, u.w));
} }
[test] [test]
uniform 0 float4 0.4 0.8 2.5 2.0 uniform 0 float4 0.4 0.8 2.5 2.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.512, 0.101192884, 0.64, 0.25) 4 probe all rgba (0.512, 0.101192884, 0.64, 0.25) 4

View File

@ -10,7 +10,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 0 float4 0.5 -0.1 0.2 0.3
uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 4 float4 0.6 0.4 -0.3 1.0
draw quad todo(sm>=6) draw quad
probe all rgba (-0.1, -0.5, 0.5, -0.7) 4 probe all rgba (-0.1, -0.5, 0.5, -0.7) 4
[pixel shader] [pixel shader]
@ -27,7 +27,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 0.0 0.0 0.0 uniform 0 float4 0.5 0.0 0.0 0.0
uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 4 float4 0.6 0.4 -0.3 1.0
draw quad todo(sm>=6) draw quad
probe all rgba (-0.52, -0.18, 1.01, -1.2) 4 probe all rgba (-0.52, -0.18, 1.01, -1.2) 4
[pixel shader] [pixel shader]
@ -44,7 +44,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 0 float4 0.5 -0.1 0.2 0.3
uniform 4 float4 0.6 0.0 0.0 0.0 uniform 4 float4 0.6 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (-0.148, -0.748, -0.448, -0.348) 4 probe all rgba (-0.148, -0.748, -0.448, -0.348) 4
[pixel shader] [pixel shader]
@ -62,7 +62,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 0.0 0.0 0.0 uniform 0 float4 0.5 0.0 0.0 0.0
uniform 4 float4 0.6 0.0 0.0 0.0 uniform 4 float4 0.6 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.14, 0.14, 0.14, 0.14) 4 probe all rgba (0.14, 0.14, 0.14, 0.14) 4
[pixel shader] [pixel shader]
@ -79,7 +79,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 -0.1 0.0 0.0 uniform 0 float4 0.5 -0.1 0.0 0.0
uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 4 float4 0.6 0.4 -0.3 1.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.188, -0.308, 0.0, 0.0) 4 probe all rgba (0.188, -0.308, 0.0, 0.0) 4
[pixel shader] [pixel shader]
@ -97,5 +97,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 -0.1 0.2 0.0 uniform 0 float4 0.5 -0.1 0.2 0.0
uniform 4 float4 0.6 0.4 0.0 0.0 uniform 4 float4 0.6 0.4 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.188, -0.308, 0.0, 0.0) 4 probe all rgba (0.188, -0.308, 0.0, 0.0) 4

View File

@ -34,7 +34,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (41.0, 41.0, 41.0, 1089.0) probe all rgba (41.0, 41.0, 41.0, 1089.0)
@ -50,7 +50,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 99.0) probe all rgba (0.0, 0.0, 0.0, 99.0)
@ -65,7 +65,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 99.0) probe all rgba (1.0, 1.0, 1.0, 99.0)
@ -80,12 +80,12 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 99.0) probe all rgba (0.0, 0.0, 0.0, 99.0)
% Register reservation with incorrect register type. % Register reservation with incorrect register type.
[pixel shader] [pixel shader fail(sm>=6)]
sampler2D unused : register(t0); sampler2D unused : register(t0);
Texture2D tex; Texture2D tex;
@ -109,7 +109,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (4.0, 4.0, 4.0, 99.0) probe all rgba (4.0, 4.0, 4.0, 99.0)
@ -125,7 +125,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 99.0) probe all rgba (1.0, 1.0, 1.0, 99.0)
@ -140,7 +140,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 2.0, 2.0, 99.0) probe all rgba (2.0, 2.0, 2.0, 99.0)
@ -154,7 +154,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (2.0, 2.0, 2.0, 99.0) probe all rgba (2.0, 2.0, 2.0, 99.0)
@ -184,7 +184,7 @@ filter linear linear linear
address clamp clamp clamp address clamp clamp clamp
% If a struct spans many object register sets and one is reserved, all other used object register sets must be. % If a struct spans many object register sets and one is reserved, all other used object register sets must be.
[pixel shader fail todo] [pixel shader fail(sm<6) todo]
struct struct
{ {
Texture2D tex; Texture2D tex;
@ -227,5 +227,5 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
todo probe all rgba (1.0, 1.0, 1.0, 99.0) todo probe all rgba (1.0, 1.0, 1.0, 99.0)

View File

@ -165,7 +165,7 @@ float4 main() : sv_target
draw quad draw quad
probe all rgba (0.4, 0.3, 0.2, 0.0) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader fail todo] [pixel shader fail(sm<6) todo]
float3x1 func() float3x1 func()
{ {
return float4(0.4, 0.3, 0.2, 0.1); return float4(0.4, 0.3, 0.2, 0.1);

View File

@ -38,10 +38,10 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 0.2 uniform 0 float 0.2
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4) probe all rgba (0.1, 0.2, 0.3, 0.4)
uniform 0 float 0.8 uniform 0 float 0.8
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.6, 0.7, 0.8) probe all rgba (0.5, 0.6, 0.7, 0.8)
[pixel shader] [pixel shader]
@ -65,10 +65,10 @@ void main(out float4 ret : sv_target)
[test] [test]
uniform 0 float 0.2 uniform 0 float 0.2
draw quad todo(sm>=6) draw quad
probe all rgba (0.3, 0.4, 0.5, 0.6) probe all rgba (0.3, 0.4, 0.5, 0.6)
uniform 0 float 0.8 uniform 0 float 0.8
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4) probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader] [pixel shader]
@ -92,13 +92,13 @@ void main(out float4 ret : sv_target)
[test] [test]
uniform 0 float 0.1 uniform 0 float 0.1
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4) 1 probe all rgba (0.1, 0.2, 0.3, 0.4) 1
uniform 0 float 0.5 uniform 0 float 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.3, 0.4, 0.5) 1 probe all rgba (0.2, 0.3, 0.4, 0.5) 1
uniform 0 float 0.9 uniform 0 float 0.9
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.6, 0.7, 0.8) 1 probe all rgba (0.5, 0.6, 0.7, 0.8) 1
[pixel shader] [pixel shader]
@ -119,13 +119,13 @@ void main(out float4 ret : sv_target)
[test] [test]
uniform 0 float 0.1 uniform 0 float 0.1
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4) 1 probe all rgba (0.1, 0.2, 0.3, 0.4) 1
uniform 0 float 0.5 uniform 0 float 0.5
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.6, 0.7, 0.8) 1 probe all rgba (0.5, 0.6, 0.7, 0.8) 1
uniform 0 float 0.9 uniform 0 float 0.9
draw quad todo(sm>=6) draw quad
probe all rgba (0.4, 0.5, 0.6, 0.7) 1 probe all rgba (0.4, 0.5, 0.6, 0.7) 1
[pixel shader] [pixel shader]
@ -166,23 +166,23 @@ void main(out float4 ret : sv_target)
[test] [test]
uniform 0 float 0.0 uniform 0 float 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.1, 0.1, 0.1) 1 probe all rgba (0.1, 0.1, 0.1, 0.1) 1
uniform 0 float 0.1 uniform 0 float 0.1
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.2, 0.2, 0.2) 1 probe all rgba (0.2, 0.2, 0.2, 0.2) 1
uniform 0 float 0.3 uniform 0 float 0.3
draw quad todo(sm>=6) draw quad
probe all rgba (0.4, 0.4, 0.4, 0.4) 1 probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 0 float 0.7 uniform 0 float 0.7
draw quad todo(sm>=6) draw quad
probe all rgba (0.8, 0.8, 0.8, 0.8) 1 probe all rgba (0.8, 0.8, 0.8, 0.8) 1
uniform 0 float 0.9 uniform 0 float 0.9
draw quad todo(sm>=6) draw quad
probe all rgba (0.9, 0.9, 0.9, 0.9) 1 probe all rgba (0.9, 0.9, 0.9, 0.9) 1
[pixel shader] [pixel shader]
@ -211,10 +211,10 @@ void main(out float4 ret : sv_target)
[test] [test]
uniform 0 float 0.2 uniform 0 float 0.2
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.2, 0.2, 0.2) probe all rgba (0.2, 0.2, 0.2, 0.2)
uniform 0 float 0.8 uniform 0 float 0.8
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.5, 0.5, 0.5) probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader todo] [pixel shader todo]

View File

@ -1,18 +1,22 @@
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
return round(u); return round(u);
} }
[test] [test]
uniform 0 float4 -0.4 -6.6 7.6 3.4 uniform 0 float4 -0.4 -6.6 7.6 3.4
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, -7.0, 8.0, 3.0) 4 probe all rgba (0.0, -7.0, 8.0, 3.0) 4
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
float a = round(u.r); float a = round(u.r);
int2 b = round(u.gb); int2 b = round(u.gb);
@ -22,13 +26,15 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 -0.4 -6.6 7.6 3.4 uniform 0 float4 -0.4 -6.6 7.6 3.4
draw quad todo(sm>=6) draw quad
probe all rgba (-7.0, 8.0, 0.0, 3.0) 4 probe all rgba (-7.0, 8.0, 0.0, 3.0) 4
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
int4 i = u; int4 i = u;
return round(i); return round(i);
@ -36,5 +42,5 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 -1 0 2 10 uniform 0 float4 -1 0 2 10
draw quad todo(sm>=6) draw quad
probe all rgba (-1.0, 0.0, 2.0, 10.0) 4 probe all rgba (-1.0, 0.0, 2.0, 10.0) 4

View File

@ -31,13 +31,13 @@ float4 main(float2 coord : texcoord) : sv_target
[test] [test]
uniform 0 float4 6.5 0.0 0.0 0.0 uniform 0 float4 6.5 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (10.0, 0.0, 10.0, 0.0) probe all rgba (10.0, 0.0, 10.0, 0.0)
uniform 0 float4 7.5 0.0 0.0 0.0 uniform 0 float4 7.5 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (4.0, 0.0, 10.0, 0.0) probe all rgba (4.0, 0.0, 10.0, 0.0)
uniform 0 float4 8.5 0.0 0.0 0.0 uniform 0 float4 8.5 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 10.0, 0.0) probe all rgba (0.0, 0.0, 10.0, 0.0)

View File

@ -26,11 +26,11 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 0.0, 1.0, 0.0) probe all rgba (1.0, 0.0, 1.0, 0.0)
uniform 0 float4 1.0 1.0 1.0 1.0 uniform 0 float4 1.0 1.0 1.0 1.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 1.0, 0.0) probe all rgba (0.0, 0.0, 1.0, 0.0)
uniform 0 float4 2.0 2.0 2.0 2.0 uniform 0 float4 2.0 2.0 2.0 2.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 1.0, 0.0) probe all rgba (0.0, 0.0, 1.0, 0.0)

View File

@ -26,11 +26,11 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 0.0, 1.0, 0.0) probe all rgba (1.0, 0.0, 1.0, 0.0)
uniform 0 float4 0.5 0.0 0.0 0.0 uniform 0 float4 0.5 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.5, 0.0, 1.0, 0.0) probe all rgba (0.5, 0.0, 1.0, 0.0)
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 1.0, 0.0) probe all rgba (0.0, 0.0, 1.0, 0.0)

View File

@ -22,7 +22,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.1, 0.2, 0.5, 0.0) probe all rgba (0.1, 0.2, 0.5, 0.0)
@ -36,7 +36,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.2, 0.2, 0.0, 0.4) probe all rgba (0.2, 0.2, 0.0, 0.4)
@ -50,5 +50,5 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.2, 0.0, 0.4) probe all rgba (0.0, 0.2, 0.0, 0.4)

View File

@ -17,7 +17,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.25, 0, 0.25, 0) probe all rgba (0.25, 0, 0.25, 0)
[pixel shader] [pixel shader]
@ -30,7 +30,7 @@ float4 main() : sv_target
} }
[test] [test]
draw quad todo(sm>=6) draw quad
probe all rgba (0.25, 0, 0.25, 0) probe all rgba (0.25, 0, 0.25, 0)
[pixel shader fail] [pixel shader fail]
@ -53,7 +53,7 @@ float4 main() : sv_target
[require] [require]
options: backcompat options: backcompat
[pixel shader] [pixel shader fail(sm>=6)]
samplerCUBE s; samplerCUBE s;
float4 main() : sv_target float4 main() : sv_target
@ -61,7 +61,7 @@ float4 main() : sv_target
return texCUBE(s, float3(0.0, 0.0, 0.0)); return texCUBE(s, float3(0.0, 0.0, 0.0));
} }
[pixel shader] [pixel shader fail(sm>=6)]
sampler1D s; sampler1D s;
float4 main() : sv_target float4 main() : sv_target

View File

@ -1,16 +1,20 @@
[pixel shader] [pixel shader]
float4 main(uniform float2 u) : sv_target uniform float2 u;
float4 main() : sv_target
{ {
return float4(saturate(u), saturate(u.x + 0.5), saturate(-1.2)); return float4(saturate(u), saturate(u.x + 0.5), saturate(-1.2));
} }
[test] [test]
uniform 0 float4 0.7 -0.1 0.0 0.0 uniform 0 float4 0.7 -0.1 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.7, 0.0, 1.0, 0.0) probe all rgba (0.7, 0.0, 1.0, 0.0)
[pixel shader] [pixel shader]
float4 main(uniform float4 u) : sv_target uniform float4 u;
float4 main() : sv_target
{ {
int4 i = u; int4 i = u;
return saturate(i); return saturate(i);
@ -18,5 +22,5 @@ float4 main(uniform float4 u) : sv_target
[test] [test]
uniform 0 float4 -2 0 2 -1 uniform 0 float4 -2 0 2 -1
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 1.0, 0.0) probe all rgba (0.0, 0.0, 1.0, 0.0)

View File

@ -52,5 +52,5 @@ void main(float4 position : SV_Position, float2 t0 : TEXCOORD0,
} }
[test] [test]
draw triangle strip 4 todo(sm>=6) draw triangle strip 4
probe all rgba (10.0, 8.0, 7.0, 3.0) probe all rgba (10.0, 8.0, 7.0, 3.0)

View File

@ -27,6 +27,11 @@ draw quad
probe all rgba (11.0, 11.0, 11.0, 11.0) probe all rgba (11.0, 11.0, 11.0, 11.0)
% dxcompiler performs the first call to func() before the array index call.
[require]
shader model < 6.0
[pixel shader] [pixel shader]
float4 func(void) float4 func(void)
{ {

View File

@ -8,13 +8,13 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
uniform 0 float4 -1.0 0.0 0.0 0.0 uniform 0 float4 -1.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (-1.0, -1.0, -1.0, -1.0) probe all rgba (-1.0, -1.0, -1.0, -1.0)
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0) probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] [pixel shader]
@ -27,7 +27,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] [pixel shader]
@ -41,7 +41,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 2.0 0.0 0.0 uniform 0 float4 1.0 2.0 0.0 0.0
uniform 4 float4 3.0 4.0 0.0 0.0 uniform 4 float4 3.0 4.0 0.0 0.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0) probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] [pixel shader]
@ -54,13 +54,13 @@ float4 main() : sv_target
[test] [test]
uniform 0 int4 1 0 0 0 uniform 0 int4 1 0 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (1, 1, 1, 1) probe all rgba (1, 1, 1, 1)
uniform 0 int4 -1 0 0 0 uniform 0 int4 -1 0 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (-1, -1, -1, -1) probe all rgba (-1, -1, -1, -1)
uniform 0 int4 0 0 0 0 uniform 0 int4 0 0 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (0, 0, 0, 0) probe all rgba (0, 0, 0, 0)
[pixel shader] [pixel shader]
@ -73,7 +73,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 int4 1 2 3 4 uniform 0 int4 1 2 3 4
draw quad todo(sm>=6) draw quad
probe all rgba (1, 1, 1, 1) probe all rgba (1, 1, 1, 1)
[pixel shader] [pixel shader]
@ -87,5 +87,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 int4 1 2 0 0 uniform 0 int4 1 2 0 0
uniform 4 int4 3 4 0 0 uniform 4 int4 3 4 0 0
draw quad todo(sm>=6) draw quad
probe all rgba (1, 1, 1, 1) probe all rgba (1, 1, 1, 1)

View File

@ -27,7 +27,7 @@ float4 main() : sv_target
[test] [test]
draw quad draw quad
probe all rgba (0, 0.104, 0.896, 1.000000) 5 probe all rgba (0, 0.104, 0.896, 1.000000) 6
[pixel shader] [pixel shader]

View File

@ -8,7 +8,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 9.0 32.3 46.5 uniform 0 float4 1.0 9.0 32.3 46.5
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 3.0, 5.683309, 6.819091) 1 probe all rgba (1.0, 3.0, 5.683309, 6.819091) 1
[pixel shader] [pixel shader]
@ -21,5 +21,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 1.0 9.0 4.0 16.0 uniform 0 float4 1.0 9.0 4.0 16.0
draw quad todo(sm>=6) draw quad
probe all rgba (1.0, 0.33333333, 0.5, 0.25) 1 probe all rgba (1.0, 0.33333333, 0.5, 0.25) 1

Some files were not shown because too many files have changed in this diff Show More