Recap:
My previous proposals to extend the shader_runner to SM1 were focusing on separating compilation tests ([shader] directives) from execution tests ([test] directives), and let the generic shader_runner.c:compile_shader() in charge of the former.
However, Henri was more inclined to aim for making the parser agnostic to the language of the tests so we can potentially extend the shader_runner tests to other languages such as d3d-asm. This means, removing the burden of compilation from the parser altogether, and moving it to the runners, probably through a runner->compile function pointer (even if most of them end up doing the same thing, compiling with vkd3d-shader or the native compiler, depending on availability).
Agreeing with going in this general direction, this MR contains patches to do SM1 compilation calling run_shader_tests() for SM1 profiles from the Vulkan runner (skipping execution for now), and some improvements to the qualifiers syntax.
Despite this, there are parallel discussions on: - Whether to name the shader models individually in the [require] directives or expressing the range of shader models where the test should pass. In the latter case, whether to run for all shader models, only the lowest one in the SM1, SM4, and SM6 groups, or to allow the runner to select a shader model within the range (I feel strongly against this now, I think the runner should just retrieve a boolean in runner->check_requirements). - Where to do the iteration across different shader models, if in run_shader_tests() or expect each runner to call run_shader_tests() several times as we do now. But there is no need to settle on something for these yet.
---
Now, what may be the most noisy part of this MR is that even though we are calling run_shader_tests() through the Vulkan runner, this will result in calling shader_runner.c:compile_shader() instead of shader_runner_vulkan.c:compile_shader(), but if we follow the "making the parser agnostic" plan, we eventually should get rid of shader_runner.c:compile_shader() and introduce the runner->compile pointer instead.
-- v7: tests: Use the vulkan runner to run SM1 compilation tests. tests/shader-runner: Call each runner only once. tests/shader-runner: Support reading multiple model range args for qualifiers.
From: Francisco Casas fcasas@codeweavers.com
We can now pass (sm<4) and (sm>=4) to "fail" and "todo" qualifiers, and we can use multiple of these qualifier arguments using "&" for AND and "|" for OR.
examples: todo(sm>=4 & sm<6) todo(sm<4 | sm>6)
parenthesis are not supported.
Adding additional model ranges for the tests, if we need them, should be easier now, since they only have to be added to the "valid_args" array. --- tests/shader_runner.c | 184 +++++++++++++++++++++++++++++++----------- 1 file changed, 139 insertions(+), 45 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 9b373e017..1e6b68f64 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -94,40 +94,139 @@ enum parse_state STATE_TEST, };
-static bool match_string(const char *line, const char *token, const char **const rest) +static bool check_qualifier_args_conjunction(const char *line, + const char **const rest, enum shader_model sm) { - size_t len = strlen(token); + bool holds = true; + unsigned int i;
- while (isspace(*line)) - ++line; + static const struct + { + const char *text; + enum shader_model sm_min, sm_max; + } + valid_args[] = + { + {"sm>=4", SHADER_MODEL_4_0, SHADER_MODEL_6_0}, + {"sm>=6", SHADER_MODEL_6_0, SHADER_MODEL_6_0}, + {"sm<4", SHADER_MODEL_2_0, SHADER_MODEL_4_0 - 1}, + {"sm<6", SHADER_MODEL_2_0, SHADER_MODEL_6_0 - 1}, + };
- if (strncmp(line, token, len) || !isspace(line[len])) - return false; + while (*line != ')' && *line != '|') + { + bool match = false; + + while (isspace(*line)) + ++line; + + for (i = 0; i < ARRAY_SIZE(valid_args); ++i) + { + const char *option_text = valid_args[i].text; + + if (!strncmp(line, option_text, strlen(option_text))) + { + line += strlen(option_text); + if (sm < valid_args[i].sm_min) + holds = false; + if (sm > valid_args[i].sm_max) + holds = false; + + match = true; + break; + } + } + + while (isspace(*line)) + ++line; + + if (match && *line == '&') + { + ++line; + } + else if (*line != ')' && *line != '|') + { + fatal_error("Invalid qualifier argument '%s'.\n", line); + } + } + + assert(*line == ')' || *line == '|'); if (rest) + *rest = line; + + return holds; +} + +static bool check_qualifier_args(const char *line, const char **const rest, enum shader_model sm) +{ + bool first = true; + bool holds = false; + + assert(*line == '('); + ++line; + + while (*line != ')') { - *rest = line + len; - while (isspace(**rest)) - ++*rest; + if (!first && *line == '|') + ++line; + first = false; + + holds = check_qualifier_args_conjunction(line, &line, sm) || holds; } - return true; + + assert(*line == ')'); + if (rest) + *rest = line + 1; + + return holds; }
-static bool match_directive_substring(const char *line, const char *token, const char **const rest) +static bool match_string_generic(const char *line, const char *token, const char **const rest, + bool exclude_bracket, bool allow_qualifier_args, enum shader_model sm) { size_t len = strlen(token); + bool holds = true;
- while (isspace(*line) || *line == ']') + while (isspace(*line) || (exclude_bracket && *line == ']')) ++line;
- if (strncmp(line, token, len) || !(isspace(line[len]) || line[len] == ']')) + if (strncmp(line, token, len) || !(isspace(line[len]) || line[len] == '(' + || (exclude_bracket && line[len] == ']'))) return false; + line += len; + + if (allow_qualifier_args && *line == '(') + holds = check_qualifier_args(line, &line, sm); + if (rest) { - *rest = line + len; + *rest = line; while (isspace(**rest)) ++*rest; } - return true; + return holds; +} + +static bool match_string_with_args(const char *line, const char *token, const char **const rest, + enum shader_model sm) +{ + return match_string_generic(line, token, rest, false, true, sm); +} + +static bool match_string(const char *line, const char *token, const char **const rest) +{ + return match_string_generic(line, token, rest, false, false, 0); +} + +static bool match_directive_substring_with_args(const char *line, const char *token, + const char **const rest, enum shader_model sm) +{ + return match_string_generic(line, token, rest, true, true, sm); +} + +static bool match_directive_substring(const char *line, const char *token, const char **const rest) +{ + return match_string_generic(line, token, rest, true, false, 0); }
static void parse_require_directive(struct shader_runner *runner, const char *line) @@ -548,12 +647,10 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
runner->is_todo = false;
- if (match_string(line, "todo", &line)) + if (match_string_with_args(line, "todo", &line, runner->minimum_shader_model)) + { runner->is_todo = true; - else if (match_string(line, "todo(sm<6)", &line)) - runner->is_todo = runner->minimum_shader_model < SHADER_MODEL_6_0; - else if (match_string(line, "todo(sm>=6)", &line)) - runner->is_todo = runner->minimum_shader_model >= SHADER_MODEL_6_0; + }
if (match_string(line, "dispatch", &line)) { @@ -1068,45 +1165,42 @@ static void compile_shader(struct shader_runner *runner, IDxcCompiler3 *dxc_comp } }
+static enum parse_state get_parse_state_todo(enum parse_state state) +{ + if (state == STATE_SHADER_COMPUTE) + return STATE_SHADER_COMPUTE_TODO; + else if (state == STATE_SHADER_PIXEL) + return STATE_SHADER_PIXEL_TODO; + else if (state == STATE_SHADER_VERTEX) + return STATE_SHADER_VERTEX_TODO; + else + return STATE_SHADER_EFFECT_TODO; +} + static enum parse_state read_shader_directive(struct shader_runner *runner, enum parse_state state, const char *line, const char *src, HRESULT *expect_hr) { while (*src && *src != ']') { - /* 'todo' is not meaningful when dxcompiler is in use, so it has no '(sm<6) qualifier. */ - if (match_directive_substring(src, "todo", &src)) + const char *src_start = src; + + if (match_directive_substring_with_args(src, "todo", &src, runner->minimum_shader_model)) { + /* 'todo' is not meaningful when dxcompiler is in use. */ if (runner->minimum_shader_model >= SHADER_MODEL_6_0) continue; - if (state == STATE_SHADER_COMPUTE) - state = STATE_SHADER_COMPUTE_TODO; - else if (state == STATE_SHADER_PIXEL) - state = STATE_SHADER_PIXEL_TODO; - else if (state == STATE_SHADER_VERTEX) - state = STATE_SHADER_VERTEX_TODO; - else - state = STATE_SHADER_EFFECT_TODO; + state = get_parse_state_todo(state); } - else if (match_directive_substring(src, "fail", &src)) + else if (match_directive_substring_with_args(src, "fail", &src, runner->minimum_shader_model)) { *expect_hr = E_FAIL; } - else if (match_directive_substring(src, "fail(sm<6)", &src)) - { - if (runner->minimum_shader_model < SHADER_MODEL_6_0) - *expect_hr = E_FAIL; - } - else if (match_directive_substring(src, "fail(sm>=6)", &src)) - { - if (runner->minimum_shader_model >= SHADER_MODEL_6_0) - *expect_hr = E_FAIL; - } - else if (match_directive_substring(src, "notimpl(sm<6)", &src)) + else if (match_directive_substring_with_args(src, "notimpl", &src, runner->minimum_shader_model)) { - if (runner->minimum_shader_model < SHADER_MODEL_6_0) - *expect_hr = E_NOTIMPL; + *expect_hr = E_NOTIMPL; } - else + + if (src == src_start) { fatal_error("Malformed line '%s'.\n", line); }
From: Francisco Casas fcasas@codeweavers.com
If the runners require multiple calls to run_shader_tests() for different shader model ranges, these are moved inside the sole runner call.
For the same reason, the trace() messages are also moved inside the runner calls. --- tests/shader_runner.c | 31 ++++++++++--------------------- tests/shader_runner.h | 3 +-- tests/shader_runner_d3d11.c | 8 ++++++++ tests/shader_runner_d3d12.c | 22 ++++++++++++++++++---- tests/shader_runner_d3d9.c | 8 ++++++++ tests/shader_runner_gl.c | 2 ++ tests/shader_runner_vulkan.c | 1 + 7 files changed, 48 insertions(+), 27 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 1e6b68f64..616de53a3 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -1705,61 +1705,50 @@ START_TEST(shader_runner) #if defined(VKD3D_CROSSTEST) trace("Running tests from a Windows cross build\n");
- trace("Compiling shaders with d3dcompiler_47.dll and executing with d3d9.dll\n"); run_shader_tests_d3d9();
- trace("Compiling shaders with d3dcompiler_47.dll and executing with d3d11.dll\n"); run_shader_tests_d3d11();
- trace("Compiling shaders with d3dcompiler_47.dll and executing with d3d12.dll\n"); - run_shader_tests_d3d12(NULL, SHADER_MODEL_4_0, SHADER_MODEL_5_1); + run_shader_tests_d3d12(NULL);
print_dll_version("d3dcompiler_47.dll"); print_dll_version("dxgi.dll"); print_dll_version("d3d9.dll"); print_dll_version("d3d11.dll"); print_dll_version("d3d12.dll"); + #elif defined(_WIN32) trace("Running tests from a Windows non-cross build\n");
- trace("Compiling shaders with vkd3d-shader and executing with d3d9.dll\n"); run_shader_tests_d3d9();
- trace("Compiling shaders with vkd3d-shader and executing with d3d11.dll\n"); run_shader_tests_d3d11();
- trace("Compiling shaders with vkd3d-shader and executing with vkd3d\n"); - run_shader_tests_d3d12(NULL, SHADER_MODEL_4_0, SHADER_MODEL_5_1); + dxc_compiler = dxcompiler_create(); + run_shader_tests_d3d12(dxc_compiler);
- if ((dxc_compiler = dxcompiler_create())) + if (dxc_compiler) { - trace("Compiling shaders with dxcompiler and executing with vkd3d\n"); - run_shader_tests_d3d12(dxc_compiler, SHADER_MODEL_6_0, SHADER_MODEL_6_0); IDxcCompiler3_Release(dxc_compiler); print_dll_version(SONAME_LIBDXCOMPILER); } - print_dll_version("d3d9.dll"); print_dll_version("d3d11.dll"); + #else trace("Running tests from a Unix build\n");
# ifdef HAVE_OPENGL - trace("Compiling shaders with vkd3d-shader and executing with OpenGL\n"); run_shader_tests_gl(); # endif
- trace("Compiling shaders with vkd3d-shader and executing with Vulkan\n"); run_shader_tests_vulkan();
- trace("Compiling shaders with vkd3d-shader and executing with vkd3d\n"); - run_shader_tests_d3d12(NULL, SHADER_MODEL_4_0, SHADER_MODEL_5_1); + dxc_compiler = dxcompiler_create(); + run_shader_tests_d3d12(dxc_compiler);
- if ((dxc_compiler = dxcompiler_create())) - { - trace("Compiling shaders with dxcompiler and executing with vkd3d\n"); - run_shader_tests_d3d12(dxc_compiler, SHADER_MODEL_6_0, SHADER_MODEL_6_0); + if (dxc_compiler) IDxcCompiler3_Release(dxc_compiler); - } + #endif } diff --git a/tests/shader_runner.h b/tests/shader_runner.h index 163439477..a17fa485b 100644 --- a/tests/shader_runner.h +++ b/tests/shader_runner.h @@ -179,5 +179,4 @@ void run_shader_tests_d3d11(void); void run_shader_tests_gl(void); void run_shader_tests_vulkan(void); #endif -void run_shader_tests_d3d12(void *dxc_compiler, enum shader_model minimum_shader_model, - enum shader_model maximum_shader_model); +void run_shader_tests_d3d12(void *dxc_compiler); diff --git a/tests/shader_runner_d3d11.c b/tests/shader_runner_d3d11.c index 1a62b20cd..1ab92d98b 100644 --- a/tests/shader_runner_d3d11.c +++ b/tests/shader_runner_d3d11.c @@ -32,6 +32,12 @@ #include "shader_runner.h" #include "vkd3d_test.h"
+#ifdef VKD3D_CROSSTEST +static const char *HLSL_COMPILER = "d3dcompiler47.dll"; +#else +static const char *HLSL_COMPILER = "vkd3d-shader"; +#endif + static HRESULT (WINAPI *pCreateDXGIFactory1)(REFIID iid, void **factory);
static HRESULT (WINAPI *pD3D11CreateDevice)(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, @@ -757,6 +763,8 @@ void run_shader_tests_d3d11(void) struct d3d11_shader_runner runner; HMODULE dxgi_module, d3d11_module;
+ trace("Compiling SM4-SM5 shaders with %s and executing with d3d11.dll\n", HLSL_COMPILER); + d3d11_module = LoadLibraryA("d3d11.dll"); dxgi_module = LoadLibraryA("dxgi.dll"); if (d3d11_module && dxgi_module) diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index d6b80d9ea..47288d574 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -25,6 +25,14 @@ #include "shader_runner.h" #include "dxcompiler.h"
+#ifdef VKD3D_CROSSTEST +static const char *HLSL_COMPILER = "d3dcompiler47.dll"; +static const char *SHADER_RUNNER = "d3d12.dll"; +#else +static const char *HLSL_COMPILER = "vkd3d-shader"; +static const char *SHADER_RUNNER = "vkd3d"; +#endif + struct d3d12_resource { struct resource r; @@ -586,8 +594,7 @@ static const struct shader_runner_ops d3d12_runner_ops = .release_readback = d3d12_runner_release_readback, };
-void run_shader_tests_d3d12(void *dxc_compiler, enum shader_model minimum_shader_model, - enum shader_model maximum_shader_model) +void run_shader_tests_d3d12(void *dxc_compiler) { static const struct test_context_desc desc = { @@ -627,10 +634,17 @@ void run_shader_tests_d3d12(void *dxc_compiler, enum shader_model minimum_shader hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_D3D12_OPTIONS1, &runner.options1, sizeof(runner.options1)); ok(hr == S_OK, "Failed to check feature options1 support, hr %#x.\n", hr); - if (maximum_shader_model >= SHADER_MODEL_6_0) + + trace("Compiling SM4-SM5 shaders with %s and executing with %s\n", HLSL_COMPILER, SHADER_RUNNER); + run_shader_tests(&runner.r, &d3d12_runner_ops, dxc_compiler, SHADER_MODEL_4_0, SHADER_MODEL_5_1); + + if (dxc_compiler) + { trace("Int64ShaderOps: %u.\n", runner.options1.Int64ShaderOps);
- run_shader_tests(&runner.r, &d3d12_runner_ops, dxc_compiler, minimum_shader_model, maximum_shader_model); + trace("Compiling SM6 shaders with dxcompiler and executing with vkd3d\n"); + run_shader_tests(&runner.r, &d3d12_runner_ops, dxc_compiler, SHADER_MODEL_6_0, SHADER_MODEL_6_0); + }
ID3D12GraphicsCommandList_Release(runner.compute_list); ID3D12CommandAllocator_Release(runner.compute_allocator); diff --git a/tests/shader_runner_d3d9.c b/tests/shader_runner_d3d9.c index 0b33c1c53..16d8198ec 100644 --- a/tests/shader_runner_d3d9.c +++ b/tests/shader_runner_d3d9.c @@ -27,6 +27,12 @@ #include "shader_runner.h" #include "vkd3d_test.h"
+#ifdef VKD3D_CROSSTEST +static const char *HLSL_COMPILER = "d3dcompiler47.dll"; +#else +static const char *HLSL_COMPILER = "vkd3d-shader"; +#endif + struct d3d9_resource { struct resource r; @@ -534,6 +540,8 @@ void run_shader_tests_d3d9(void) struct d3d9_shader_runner runner; HMODULE d3d9_module;
+ trace("Compiling SM2-SM3 shaders with %s and executing with d3d9.dll\n", HLSL_COMPILER); + d3d9_module = LoadLibraryA("d3d9.dll"); if (d3d9_module) { diff --git a/tests/shader_runner_gl.c b/tests/shader_runner_gl.c index 9a3dd7104..a898d021b 100644 --- a/tests/shader_runner_gl.c +++ b/tests/shader_runner_gl.c @@ -996,6 +996,8 @@ void run_shader_tests_gl(void) vkd3d_test_name = "shader_runner_gl"; if (!gl_runner_init(&runner)) goto done; + + trace("Compiling SM4-SM5 shaders with vkd3d-shader and executing with OpenGL\n"); run_shader_tests(&runner.r, &gl_runner_ops, NULL, SHADER_MODEL_4_0, SHADER_MODEL_5_1); gl_runner_cleanup(&runner); done: diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index bb6b3a30a..d435a5d3d 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -1420,6 +1420,7 @@ void run_shader_tests_vulkan(void) if (!init_vulkan_runner(&runner)) return;
+ trace("Compiling SM2-SM5 shaders with vkd3d-shader and executing with Vulkan\n"); run_shader_tests(&runner.r, &vulkan_runner_ops, NULL, SHADER_MODEL_2_0, SHADER_MODEL_5_1);
cleanup_vulkan_runner(&runner);
From: Francisco Casas fcasas@codeweavers.com
At the current moment this is a little odd because for SM1 [test] directives are skipped, and the [shader] directives are not executed by the shader_runner_vulkan.c:compile_shader() but by the general shader_runner.c:compile_shader(). So in principle it is a little weird that we go through the vulkan runner.
But fret not, because in the future we plan to make the parser agnostic to the language of the tests, so we will get rid of the general shader_runner.c:compile_shader() function and instead call a runner->compile_shader() function, defined for each runner. Granted, most of these may call a generic implementation that uses native compiler in Windows, and vkd3d-shader on Linux, but it would be more conceptually correct. --- tests/hlsl/abs.shader_test | 4 +- tests/hlsl/angle-unit.shader_test | 4 +- tests/hlsl/any.shader_test | 24 +++--- .../hlsl/arithmetic-float-uniform.shader_test | 18 ++-- tests/hlsl/arithmetic-float.shader_test | 8 +- tests/hlsl/arithmetic-int-uniform.shader_test | 32 +++---- tests/hlsl/arithmetic-int.shader_test | 12 +-- tests/hlsl/array-parameters.shader_test | 8 +- tests/hlsl/array-size-expr.shader_test | 6 +- tests/hlsl/bool-cast.shader_test | 2 +- tests/hlsl/cast-broadcast.shader_test | 4 +- .../cast-componentwise-compatible.shader_test | 46 +++++----- .../hlsl/cast-componentwise-equal.shader_test | 10 +-- tests/hlsl/cbuffer.shader_test | 4 +- tests/hlsl/ceil.shader_test | 8 +- tests/hlsl/clamp.shader_test | 4 +- tests/hlsl/clip.shader_test | 8 +- tests/hlsl/combined-samplers.shader_test | 4 +- tests/hlsl/comma.shader_test | 2 +- tests/hlsl/conditional.shader_test | 16 ++-- tests/hlsl/const.shader_test | 2 +- tests/hlsl/cross.shader_test | 4 +- tests/hlsl/ddxddy.shader_test | 16 ++-- tests/hlsl/discard.shader_test | 6 +- tests/hlsl/distance.shader_test | 4 +- tests/hlsl/dot.shader_test | 12 +-- tests/hlsl/duplicate-modifiers.shader_test | 2 +- tests/hlsl/entry-point-semantics.shader_test | 20 ++--- tests/hlsl/exp.shader_test | 4 +- tests/hlsl/expr-indexing.shader_test | 20 ++--- tests/hlsl/float-comparison.shader_test | 4 +- tests/hlsl/floor.shader_test | 8 +- tests/hlsl/fmod.shader_test | 12 +-- tests/hlsl/for.shader_test | 8 +- tests/hlsl/frac.shader_test | 2 +- tests/hlsl/function-return.shader_test | 52 ++++++------ tests/hlsl/function.shader_test | 14 ++-- tests/hlsl/fwidth.shader_test | 2 +- tests/hlsl/half.shader_test | 4 +- tests/hlsl/hard-copy-prop.shader_test | 19 +++-- tests/hlsl/initializer-flatten.shader_test | 10 +-- .../initializer-implicit-array.shader_test | 8 +- .../initializer-invalid-arg-count.shader_test | 4 +- .../hlsl/initializer-local-array.shader_test | 4 +- tests/hlsl/initializer-matrix.shader_test | 12 +-- tests/hlsl/initializer-multi.shader_test | 6 +- tests/hlsl/initializer-nested.shader_test | 6 +- tests/hlsl/initializer-numeric.shader_test | 12 +-- .../hlsl/initializer-static-array.shader_test | 4 +- tests/hlsl/initializer-struct.shader_test | 6 +- tests/hlsl/intrinsic-override.shader_test | 4 +- tests/hlsl/ldexp.shader_test | 2 +- tests/hlsl/length.shader_test | 10 +-- tests/hlsl/lerp.shader_test | 2 +- tests/hlsl/lit.shader_test | 12 +-- tests/hlsl/log.shader_test | 6 +- tests/hlsl/logic-operations.shader_test | 24 +++--- tests/hlsl/loop.shader_test | 28 +++---- tests/hlsl/majority-pragma.shader_test | 30 +++---- tests/hlsl/majority-syntax.shader_test | 2 +- tests/hlsl/majority-typedef.shader_test | 2 +- tests/hlsl/math.shader_test | 2 +- tests/hlsl/matrix-indexing.shader_test | 22 ++--- tests/hlsl/max.shader_test | 6 +- tests/hlsl/mul.shader_test | 40 ++++----- tests/hlsl/multiple-rt.shader_test | 4 +- tests/hlsl/nested-arrays.shader_test | 2 +- tests/hlsl/non-const-indexing.shader_test | 52 ++++++------ tests/hlsl/normalize.shader_test | 10 +-- ...numeric-constructor-truncation.shader_test | 4 +- tests/hlsl/numeric-types.shader_test | 10 +-- tests/hlsl/pow.shader_test | 4 +- tests/hlsl/reflect.shader_test | 12 +-- .../return-implicit-conversion.shader_test | 28 +++---- tests/hlsl/return.shader_test | 83 +++++++++---------- tests/hlsl/round.shader_test | 10 +-- tests/hlsl/sample-bias.shader_test | 8 +- tests/hlsl/sample-level.shader_test | 12 +-- tests/hlsl/sampler.shader_test | 8 +- tests/hlsl/saturate.shader_test | 6 +- tests/hlsl/shape.shader_test | 54 ++++++------ tests/hlsl/side-effects.shader_test | 6 +- tests/hlsl/sign.shader_test | 22 ++--- .../single-numeric-initializer.shader_test | 4 +- tests/hlsl/smoothstep.shader_test | 22 +++-- tests/hlsl/sqrt.shader_test | 4 +- tests/hlsl/state-block-syntax.shader_test | 2 +- tests/hlsl/static-initializer.shader_test | 13 +-- tests/hlsl/step.shader_test | 8 +- tests/hlsl/storage-qualifiers.shader_test | 4 +- tests/hlsl/struct-assignment.shader_test | 2 +- tests/hlsl/struct-semantics.shader_test | 2 +- tests/hlsl/swizzle-matrix.shader_test | 10 +-- tests/hlsl/swizzles.shader_test | 24 +++--- tests/hlsl/ternary.shader_test | 10 +-- tests/hlsl/transpose.shader_test | 10 +-- tests/hlsl/trigonometry.shader_test | 16 ++-- tests/hlsl/trunc.shader_test | 10 +-- tests/hlsl/type-names.shader_test | 2 +- tests/hlsl/uniform-semantics.shader_test | 4 +- .../hlsl/vector-indexing-uniform.shader_test | 4 +- tests/hlsl/vector-indexing.shader_test | 6 +- tests/hlsl/writemask-assignop-0.shader_test | 2 +- tests/hlsl/writemask-assignop-1.shader_test | 2 +- tests/hlsl/writemask-assignop-2.shader_test | 2 +- tests/hlsl/writemask-assignop-3.shader_test | 2 +- tests/shader_runner.c | 13 ++- tests/shader_runner_vulkan.c | 22 +++-- 108 files changed, 622 insertions(+), 616 deletions(-)
diff --git a/tests/hlsl/abs.shader_test b/tests/hlsl/abs.shader_test index 738e69312..4d1d1e33e 100644 --- a/tests/hlsl/abs.shader_test +++ b/tests/hlsl/abs.shader_test @@ -8,8 +8,8 @@ float4 main() : sv_target
[test] uniform 0 float4 0.1 0.7 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.1, 0.7, 0.4, 0.4) uniform 0 float4 -0.7 0.1 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.7, 0.1, 1.2, 0.4) diff --git a/tests/hlsl/angle-unit.shader_test b/tests/hlsl/angle-unit.shader_test index 407d24139..3f8096b6e 100644 --- a/tests/hlsl/angle-unit.shader_test +++ b/tests/hlsl/angle-unit.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.0 30.0 150.0 180.0 draw quad -probe all rgba (0.0, 0.52359877, 2.61799387, 3.14159265) +todo(sm<4) probe all rgba (0.0, 0.52359877, 2.61799387, 3.14159265)
[pixel shader] @@ -23,4 +23,4 @@ float4 main() : sv_target [test] uniform 0 float4 0.0 0.78539816 1.57079632 2.35619449 draw quad -probe all rgba (0.0, 45.0, 90.0, 135.0) +todo(sm<4) probe all rgba (0.0, 45.0, 90.0, 135.0) diff --git a/tests/hlsl/any.shader_test b/tests/hlsl/any.shader_test index f2298d3a3..afaf81fac 100644 --- a/tests/hlsl/any.shader_test +++ b/tests/hlsl/any.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f;
float4 main() : sv_target @@ -8,28 +8,28 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 1.0 1.0 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 1.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 1.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) uniform 0 float4 -1.0 -1.0 -1.0 -1.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float f;
float4 main() : sv_target @@ -39,13 +39,13 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) uniform 0 float4 -1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[require] diff --git a/tests/hlsl/arithmetic-float-uniform.shader_test b/tests/hlsl/arithmetic-float-uniform.shader_test index 75684cc60..1188f7d05 100644 --- a/tests/hlsl/arithmetic-float-uniform.shader_test +++ b/tests/hlsl/arithmetic-float-uniform.shader_test @@ -11,9 +11,9 @@ float4 main() : SV_TARGET [test] uniform 0 float4 5.0 15.0 0.0 0.0 draw quad -probe all rgba (20.0, -10.0, 75.0, 0.33333333) 1 +todo(sm<4) probe all rgba (20.0, -10.0, 75.0, 0.33333333) 1
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -25,10 +25,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 15.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 5.0, -5.0, 3.0) 1
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -40,10 +40,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, -2.0, 2.0, -2.0) 16
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -55,10 +55,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 x, y;
float4 main() : sv_target @@ -69,7 +69,7 @@ float4 main() : sv_target [test] uniform 0 float4 5.0 -42.1 4.0 45.0 uniform 4 float4 15.0 -5.0 4.1 5.0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, -2.1, 4.0, 0.0) 6
[require] diff --git a/tests/hlsl/arithmetic-float.shader_test b/tests/hlsl/arithmetic-float.shader_test index 71835082c..92f166b27 100644 --- a/tests/hlsl/arithmetic-float.shader_test +++ b/tests/hlsl/arithmetic-float.shader_test @@ -9,7 +9,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (20.0, -10.0, 75.0, 0.33333333) +todo(sm<4) probe all rgba (20.0, -10.0, 75.0, 0.33333333)
[pixel shader] float4 main() : SV_TARGET @@ -22,7 +22,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (5.0, 5.0, -5.0, 3.0) +todo(sm<4) probe all rgba (5.0, 5.0, -5.0, 3.0)
[pixel shader] float4 main() : SV_TARGET @@ -35,7 +35,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (2.0, -2.0, 2.0, -2.0) 16 +todo(sm<4) probe all rgba (2.0, -2.0, 2.0, -2.0) 16
[pixel shader] float4 main() : SV_TARGET @@ -61,7 +61,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, -2.1, 4.0, 0.0) 6 +todo(sm<4) probe all rgba (5.0, -2.1, 4.0, 0.0) 6
[require] % Infinities are not allowed in SM1 diff --git a/tests/hlsl/arithmetic-int-uniform.shader_test b/tests/hlsl/arithmetic-int-uniform.shader_test index c1b0e8abb..d7de406a7 100644 --- a/tests/hlsl/arithmetic-int-uniform.shader_test +++ b/tests/hlsl/arithmetic-int-uniform.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -10,10 +10,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 16.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (21.0, -11.0, 80.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -25,10 +25,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 16.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 5.0, -5.0, 3.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -40,10 +40,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (8.0, -8.0, -8.0, 8.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -55,10 +55,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, -2.0, 2.0, -2.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -70,10 +70,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (9.0, -9.0, -9.0, 9.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -85,10 +85,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a;
float4 main() : SV_TARGET @@ -98,10 +98,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 -7.0 0.0 -10.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (5.0, 7.0, 0.0, 10.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a; uniform float4 b;
@@ -117,7 +117,7 @@ float4 main() : sv_target [test] uniform 0 float4 45.0 5.0 50.0 10.0 uniform 4 float4 3.0 8.0 2.0 5.0 -draw quad +todo(sm<4) draw quad probe all rgba (9.0, 5.0, 1.0, 3.0)
[require] diff --git a/tests/hlsl/arithmetic-int.shader_test b/tests/hlsl/arithmetic-int.shader_test index f2044c42c..42949d03c 100644 --- a/tests/hlsl/arithmetic-int.shader_test +++ b/tests/hlsl/arithmetic-int.shader_test @@ -9,7 +9,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (20.0, -10.0, 75.0, 0.0) +todo(sm<4) probe all rgba (20.0, -10.0, 75.0, 0.0)
[pixel shader] float4 main() : SV_TARGET @@ -22,7 +22,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (5.0, 5.0, -5.0, 3.0) +todo(sm<4) probe all rgba (5.0, 5.0, -5.0, 3.0)
[pixel shader] float4 main() : SV_TARGET @@ -35,7 +35,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (8.0, -8.0, -8.0, 8.0) +todo(sm<4) probe all rgba (8.0, -8.0, -8.0, 8.0)
[pixel shader] float4 main() : SV_TARGET @@ -48,7 +48,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (2.0, -2.0, 2.0, -2.0) +todo(sm<4) probe all rgba (2.0, -2.0, 2.0, -2.0)
[pixel shader] float4 main() : SV_TARGET @@ -61,7 +61,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (9.0, -9.0, -9.0, 9.0) +todo(sm<4) probe all rgba (9.0, -9.0, -9.0, 9.0)
[pixel shader] float4 main() : SV_TARGET @@ -77,6 +77,7 @@ draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader fail(sm<6)] +// On SM1 this gives hr 0x88760b59. float4 main() : SV_TARGET { int x = 1; @@ -90,6 +91,7 @@ draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader fail(sm<6)] +// On SM1 this gives hr 0x88760b59. float4 main() : SV_TARGET { int x = 1; diff --git a/tests/hlsl/array-parameters.shader_test b/tests/hlsl/array-parameters.shader_test index 28a3c5996..e48da7361 100644 --- a/tests/hlsl/array-parameters.shader_test +++ b/tests/hlsl/array-parameters.shader_test @@ -13,7 +13,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (25.0, 25.0, 25.0, 25.0) +todo(sm<4) probe all rgba (25.0, 25.0, 25.0, 25.0)
[pixel shader fail] @@ -79,7 +79,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (15.0, 26.0, 37.0, 48.0) +todo(sm<4) probe all rgba (15.0, 26.0, 37.0, 48.0)
[pixel shader fail] @@ -154,7 +154,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (136.0, 136.0, 136.0, 136.0) +todo(sm<4) probe all rgba (136.0, 136.0, 136.0, 136.0)
[pixel shader] @@ -172,4 +172,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (702.0, 702.0, 702.0, 702.0) +todo(sm<4) probe all rgba (702.0, 702.0, 702.0, 702.0) diff --git a/tests/hlsl/array-size-expr.shader_test b/tests/hlsl/array-size-expr.shader_test index 55af741da..cdde9329f 100644 --- a/tests/hlsl/array-size-expr.shader_test +++ b/tests/hlsl/array-size-expr.shader_test @@ -15,7 +15,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 23, 24) +todo(sm<4) probe all rgba (21, 22, 23, 24)
[pixel shader] @@ -37,7 +37,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (61, 62, 63, 64) +todo(sm<4) probe all rgba (61, 62, 63, 64)
[pixel shader] static const int size = 8; @@ -50,7 +50,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2, 3, 6, 1) +todo(sm<4) probe all rgba (2, 3, 6, 1)
% Additional level of indirection [pixel shader todo fail(sm>=6)] diff --git a/tests/hlsl/bool-cast.shader_test b/tests/hlsl/bool-cast.shader_test index 09ca12e2b..47f0b9289 100644 --- a/tests/hlsl/bool-cast.shader_test +++ b/tests/hlsl/bool-cast.shader_test @@ -11,7 +11,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 0.0, 1.0, 1.0) +todo(sm<4) probe all rgba (0.0, 0.0, 1.0, 1.0)
[require] diff --git a/tests/hlsl/cast-broadcast.shader_test b/tests/hlsl/cast-broadcast.shader_test index 3ec9cd40a..5861eb494 100644 --- a/tests/hlsl/cast-broadcast.shader_test +++ b/tests/hlsl/cast-broadcast.shader_test @@ -20,7 +20,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (84.0, 84.0, 84.0, 84.0) +todo(sm<4) probe all rgba (84.0, 84.0, 84.0, 84.0)
[pixel shader fail] @@ -95,4 +95,4 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (33.0, 33.0, 33.0, 33.0) +todo(sm<4) probe all rgba (33.0, 33.0, 33.0, 33.0) diff --git a/tests/hlsl/cast-componentwise-compatible.shader_test b/tests/hlsl/cast-componentwise-compatible.shader_test index 8ad21d12a..3f5d42228 100644 --- a/tests/hlsl/cast-componentwise-compatible.shader_test +++ b/tests/hlsl/cast-componentwise-compatible.shader_test @@ -17,7 +17,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 1.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 1.0)
[pixel shader] @@ -40,7 +40,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 6.0, 7.0, 8.0) +todo(sm<4) probe all rgba (5.0, 6.0, 7.0, 8.0)
[pixel shader] @@ -56,7 +56,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] @@ -87,7 +87,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (7.0, 7.0, 7.0, 7.0) +todo(sm<4) probe all rgba (7.0, 7.0, 7.0, 7.0)
[pixel shader] @@ -120,7 +120,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (3.0, 3.0, 3.0, 3.0) +todo(sm<4) probe all rgba (3.0, 3.0, 3.0, 3.0)
[pixel shader fail] @@ -160,7 +160,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (10.0, 20.0, 30.0, 30.0) +todo(sm<4) probe all rgba (10.0, 20.0, 30.0, 30.0)
[pixel shader] @@ -182,7 +182,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (10.0, 10.0, 11.4, 12.4) +todo(sm<4) probe all rgba (10.0, 10.0, 11.4, 12.4)
[pixel shader] @@ -198,7 +198,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (11.0, 12.0, 13.0, 14.0) +todo(sm<4) probe all rgba (11.0, 12.0, 13.0, 14.0)
[pixel shader] @@ -221,7 +221,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (21.0, 22.0, 23.0, 24.0) +todo(sm<4) probe all rgba (21.0, 22.0, 23.0, 24.0)
[pixel shader] @@ -237,7 +237,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (31.0, 32.0, 33.0, 33.0) +todo(sm<4) probe all rgba (31.0, 32.0, 33.0, 33.0)
[pixel shader] @@ -259,7 +259,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (41.0, 42.0, 43.0, 44.0) +todo(sm<4) probe all rgba (41.0, 42.0, 43.0, 44.0)
[pixel shader fail(sm<6)] @@ -298,7 +298,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (55.0, 56.0, 57.0, 58.0) +todo(sm<4) probe all rgba (55.0, 56.0, 57.0, 58.0)
[pixel shader fail(sm<6)] @@ -330,7 +330,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (61.0, 62.0, 63.0, 64.0) +todo(sm<4) probe all rgba (61.0, 62.0, 63.0, 64.0)
[pixel shader fail(sm<6)] @@ -356,7 +356,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (71.0, 72.0, 73.0, 74.0) +todo(sm<4) probe all rgba (71.0, 72.0, 73.0, 74.0)
[pixel shader fail(sm<6)] @@ -405,7 +405,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (81.0, 82.0, 83.0, 84.0) +todo(sm<4) probe all rgba (81.0, 82.0, 83.0, 84.0)
[pixel shader] @@ -421,7 +421,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (91.0, 92.0, 93.0, 0.0) +todo(sm<4) probe all rgba (91.0, 92.0, 93.0, 0.0)
[pixel shader] @@ -437,7 +437,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (11.0, 12.0, 13.0, 0.0) +todo(sm<4) probe all rgba (11.0, 12.0, 13.0, 0.0)
[pixel shader fail(sm<6)] @@ -478,7 +478,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (21.0, 22.0, 23.0, 24.0) +todo(sm<4) probe all rgba (21.0, 22.0, 23.0, 24.0)
[pixel shader] @@ -500,7 +500,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (31.0, 32.0, 33.0, 0.0) +todo(sm<4) probe all rgba (31.0, 32.0, 33.0, 0.0)
[pixel shader] @@ -522,7 +522,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (41.0, 42.0, 43.0, 0.0) +todo(sm<4) probe all rgba (41.0, 42.0, 43.0, 0.0)
[pixel shader] @@ -538,7 +538,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (51.0, 52.0, 53.0, 0.0) +todo(sm<4) probe all rgba (51.0, 52.0, 53.0, 0.0)
[pixel shader fail(sm<6)] @@ -565,7 +565,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (61.0, 62.0, 63.0, 0.0) +todo(sm<4) probe all rgba (61.0, 62.0, 63.0, 0.0)
[pixel shader] @@ -581,4 +581,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (71.0, 72.0, 73.0, 0.0) +todo(sm<4) probe all rgba (71.0, 72.0, 73.0, 0.0) diff --git a/tests/hlsl/cast-componentwise-equal.shader_test b/tests/hlsl/cast-componentwise-equal.shader_test index bb1c26fe0..6421da86c 100644 --- a/tests/hlsl/cast-componentwise-equal.shader_test +++ b/tests/hlsl/cast-componentwise-equal.shader_test @@ -51,7 +51,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 1.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 1.0)
[pixel shader fail] @@ -90,7 +90,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 6.0, 7.0, 8.0) +todo(sm<4) probe all rgba (5.0, 6.0, 7.0, 8.0)
[pixel shader fail(sm>=6)] @@ -121,7 +121,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (4.0, 4.0, 4.0, 4.0) +todo(sm<4) probe all rgba (4.0, 4.0, 4.0, 4.0)
[pixel shader fail(sm>=6)] @@ -155,7 +155,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 5.0, 5.0, 5.0) +todo(sm<4) probe all rgba (5.0, 5.0, 5.0, 5.0)
[pixel shader fail(sm>=6)] @@ -200,7 +200,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (71.0, 73.0, 73.0, 74.0) +todo(sm<4) probe all rgba (71.0, 73.0, 73.0, 74.0)
[pixel shader fail] diff --git a/tests/hlsl/cbuffer.shader_test b/tests/hlsl/cbuffer.shader_test index b4dc01edd..1b939cbc2 100644 --- a/tests/hlsl/cbuffer.shader_test +++ b/tests/hlsl/cbuffer.shader_test @@ -14,7 +14,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] // Test empty constant buffer. @@ -32,7 +32,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
% SM1 buffer offset allocation follows different rules than SM4. % Those would have to be tested separately. diff --git a/tests/hlsl/ceil.shader_test b/tests/hlsl/ceil.shader_test index ef26cc8ef..89c7cd0ef 100644 --- a/tests/hlsl/ceil.shader_test +++ b/tests/hlsl/ceil.shader_test @@ -6,7 +6,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.0, 7.0, 8.0, 4.0) 4 +todo(sm<4) probe all rgba (0.0, 7.0, 8.0, 4.0) 4
[pixel shader] uniform float4 u; @@ -19,9 +19,9 @@ float4 main() : sv_target [test] uniform 0 float4 -0.5 6.5 7.5 3.4 draw quad -probe all rgba (0.0, 7.0, 8.0, 4.0) 4 +todo(sm<4) probe all rgba (0.0, 7.0, 8.0, 4.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -34,7 +34,7 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (7.0, 8.0, 0.0, 4.0) 4
[require] diff --git a/tests/hlsl/clamp.shader_test b/tests/hlsl/clamp.shader_test index 3d797ec3f..462fe86c0 100644 --- a/tests/hlsl/clamp.shader_test +++ b/tests/hlsl/clamp.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 -0.3 -0.1 0.7 0.0 todo(sm>=6) draw quad -probe all rgba (-0.1, 0.7, -0.3, 0.3) +todo(sm<4) probe all rgba (-0.1, 0.7, -0.3, 0.3)
[pixel shader] @@ -25,7 +25,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.5, 5.0, 4.2, 5.2) +todo(sm<4) probe all rgba (5.5, 5.0, 4.2, 5.2)
[pixel shader fail] diff --git a/tests/hlsl/clip.shader_test b/tests/hlsl/clip.shader_test index d7473c999..cd7b45a80 100644 --- a/tests/hlsl/clip.shader_test +++ b/tests/hlsl/clip.shader_test @@ -9,14 +9,14 @@ float4 main() : sv_target
[test] uniform 0 float4 1 2 3 4 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4) uniform 0 float4 9 8 7 6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (9, 8, 7, 6) uniform 0 float4 -1 8 7 6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (9, 8, 7, 6) uniform 0 float4 9 0 7 6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (9, 0, 7, 6) diff --git a/tests/hlsl/combined-samplers.shader_test b/tests/hlsl/combined-samplers.shader_test index 235537594..4d743aecf 100644 --- a/tests/hlsl/combined-samplers.shader_test +++ b/tests/hlsl/combined-samplers.shader_test @@ -64,7 +64,7 @@ draw quad probe all rgba (10, 10, 10, 11)
-[pixel shader] +[pixel shader todo(sm<4)] Texture2D tex; sampler sam[2];
@@ -111,7 +111,7 @@ probe all rgba (104, 104, 104, 111)
% Sampler arrays with components that have different usage dimensions are only forbidden in SM4 upwards. % However, tex2D and tex1D are considered the same dimension for these purposes. -[pixel shader fail] +[pixel shader fail(sm>=4)] sampler sam[2];
float4 main() : sv_target diff --git a/tests/hlsl/comma.shader_test b/tests/hlsl/comma.shader_test index 23bee71a1..246b3e739 100644 --- a/tests/hlsl/comma.shader_test +++ b/tests/hlsl/comma.shader_test @@ -7,4 +7,4 @@ float4 main(): sv_target
[test] draw quad -probe all rgba (0.6, 0.7, 0.8, 0.9) +todo(sm<4) probe all rgba (0.6, 0.7, 0.8, 0.9) diff --git a/tests/hlsl/conditional.shader_test b/tests/hlsl/conditional.shader_test index 0a927a8fa..5b3038c37 100644 --- a/tests/hlsl/conditional.shader_test +++ b/tests/hlsl/conditional.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -11,13 +11,13 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.9, 0.8, 0.7, 0.6) uniform 0 float4 0.1 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -29,7 +29,7 @@ float4 main() : sv_target return float4(0.9, 0.8, 0.7, 0.6); }
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -43,7 +43,7 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.9, 0.8, 0.7, 0.6)
[pixel shader fail(sm<6)] @@ -74,7 +74,7 @@ float main() : sv_target [require] shader model >= 3.0
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -88,7 +88,7 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.9, 0.8, 0.7, 0.6)
[pixel shader] diff --git a/tests/hlsl/const.shader_test b/tests/hlsl/const.shader_test index 9541203dc..e78b4f5a6 100644 --- a/tests/hlsl/const.shader_test +++ b/tests/hlsl/const.shader_test @@ -11,7 +11,7 @@ float4 main() : sv_target uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 0.1 0.2 0.3 0.4 draw quad -probe all rgba (1.1, 2.2, 3.3, 4.4) +todo(sm<4) probe all rgba (1.1, 2.2, 3.3, 4.4)
[pixel shader fail(sm<6)] float4 main() : sv_target diff --git a/tests/hlsl/cross.shader_test b/tests/hlsl/cross.shader_test index 22f373a6d..bdfabe495 100644 --- a/tests/hlsl/cross.shader_test +++ b/tests/hlsl/cross.shader_test @@ -13,7 +13,7 @@ float4 main() : sv_target uniform 0 float4 1 -2 3 4 uniform 4 float4 10 100 1000 10000 draw quad -probe all rgba (-2300, -970, 120, 0) +todo(sm<4) probe all rgba (-2300, -970, 120, 0)
@@ -30,4 +30,4 @@ float4 main() : sv_target [test] uniform 0 float4 1 -2 3 4 draw quad -probe all rgba (-20, 8, 12, 3.5) +todo(sm<4) probe all rgba (-20, 8, 12, 3.5) diff --git a/tests/hlsl/ddxddy.shader_test b/tests/hlsl/ddxddy.shader_test index 4986c233f..72925b975 100644 --- a/tests/hlsl/ddxddy.shader_test +++ b/tests/hlsl/ddxddy.shader_test @@ -9,7 +9,7 @@ float4 main(float4 pos : sv_position) : sv_target
[test] draw quad -probe all rgba (1.0, 1.0, 0.0, 0.0) +todo(sm<4) probe all rgba (1.0, 1.0, 0.0, 0.0)
[pixel shader] @@ -30,13 +30,13 @@ float4 main(float4 pos : sv_position) : sv_target
[test] draw quad -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 (10, 11) rgba (-13.0, -5.0, 3.0, 0.0) -probe (11, 11) rgba (-17.0, -5.0, 3.0, 0.0) -probe (12, 10) rgba (-26.0, -6.0, 4.0, 0.0) -probe (16, 16) rgba (-25.0, -7.0, 5.0, 0.0) -probe (150, 150) rgba (-226.0, -47.0, 45.0, 0.0) +todo(sm<4) probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0) +todo(sm<4) probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0) +todo(sm<4) probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0) +todo(sm<4) probe (11, 11) rgba (-17.0, -5.0, 3.0, 0.0) +todo(sm<4) probe (12, 10) rgba (-26.0, -6.0, 4.0, 0.0) +todo(sm<4) probe (16, 16) rgba (-25.0, -7.0, 5.0, 0.0) +todo(sm<4) probe (150, 150) rgba (-226.0, -47.0, 45.0, 0.0)
[require] diff --git a/tests/hlsl/discard.shader_test b/tests/hlsl/discard.shader_test index cecb8c1fd..a5cdde475 100644 --- a/tests/hlsl/discard.shader_test +++ b/tests/hlsl/discard.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 x;
float4 main() : sv_target @@ -9,8 +9,8 @@ float4 main() : sv_target
[test] uniform 0 float4 1 2 3 4 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4) uniform 0 float4 9 8 7 6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4) diff --git a/tests/hlsl/distance.shader_test b/tests/hlsl/distance.shader_test index 3f5446451..09b5b09dc 100644 --- a/tests/hlsl/distance.shader_test +++ b/tests/hlsl/distance.shader_test @@ -11,9 +11,9 @@ float4 main() : sv_target uniform 0 float4 -2.0 3.0 4.0 0.1 uniform 4 float4 2.0 -1.0 4.0 5.0 draw quad -probe all rgba (7.483983, 7.483983, 7.483983, 7.483983) 1 +todo(sm<4) probe all rgba (7.483983, 7.483983, 7.483983, 7.483983) 1
-[pixel shader] +[pixel shader todo(sm<4)] uniform int4 x; uniform int4 y;
diff --git a/tests/hlsl/dot.shader_test b/tests/hlsl/dot.shader_test index c620e5fac..61c9017b1 100644 --- a/tests/hlsl/dot.shader_test +++ b/tests/hlsl/dot.shader_test @@ -11,7 +11,7 @@ float4 main() : SV_TARGET uniform 0 float4 2.0 3.0 4.0 5.0 uniform 4 float4 10.0 11.0 12.0 13.0 todo(sm>=6) draw quad -probe all rgba (166.0, 166.0, 166.0, 166.0) +todo(sm<4) probe all rgba (166.0, 166.0, 166.0, 166.0)
[pixel shader] uniform float2 x; @@ -25,7 +25,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 0.0 0.0 uniform 4 float4 10.0 11.0 12.0 13.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (53.0, 53.0, 53.0, 53.0)
[pixel shader] @@ -41,7 +41,7 @@ float4 main() : SV_TARGET uniform 0 float4 2.0 0.0 0.0 0.0 uniform 4 float4 10.0 11.0 12.0 13.0 todo(sm>=6) draw quad -probe all rgba (92.0, 92.0, 92.0, 92.0) +todo(sm<4) probe all rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] uniform float4 x; @@ -56,7 +56,7 @@ float4 main() : SV_TARGET uniform 0 float4 10.0 11.0 12.0 13.0 uniform 4 float4 2.0 0.0 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (92.0, 92.0, 92.0, 92.0) +todo(sm<4) probe all rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] uniform float x; @@ -72,7 +72,7 @@ float4 main() : SV_TARGET uniform 0 float4 2.0 3.0 0.0 0.0 uniform 4 float4 3.0 0.0 0.0 0.0 draw quad -probe all rgba (6.0, 6.0, 6.0, 6.0) +todo(sm<4) probe all rgba (6.0, 6.0, 6.0, 6.0)
[pixel shader] static const float4 x = float4(2.0, 3.0, 4.0, 5.0); @@ -85,7 +85,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (110.0, 110.0, 110.0, 110.0) +todo(sm<4) probe all rgba (110.0, 110.0, 110.0, 110.0)
[pixel shader fail] uniform float1x1 x; diff --git a/tests/hlsl/duplicate-modifiers.shader_test b/tests/hlsl/duplicate-modifiers.shader_test index bf1d9c1b8..408fa099d 100644 --- a/tests/hlsl/duplicate-modifiers.shader_test +++ b/tests/hlsl/duplicate-modifiers.shader_test @@ -12,4 +12,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4) diff --git a/tests/hlsl/entry-point-semantics.shader_test b/tests/hlsl/entry-point-semantics.shader_test index b87dca4d9..d06b45db1 100644 --- a/tests/hlsl/entry-point-semantics.shader_test +++ b/tests/hlsl/entry-point-semantics.shader_test @@ -37,7 +37,7 @@ float4 main(float tex : texcoord) : sv_target
[test] draw quad -probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2) +todo(sm<4) probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2)
[pixel shader]
@@ -50,7 +50,7 @@ float4 main(float tex : bogus) : bogus;
[test] draw quad -probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2) +todo(sm<4) probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2)
[vertex shader] @@ -86,7 +86,7 @@ float4 main(in apple a) : sv_target
[test] draw quad -probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0) +todo(sm<4) probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0)
% Arrays of matrices get successive indexes. @@ -103,7 +103,7 @@ float4 main(in apple a) : sv_target
[test] draw quad -probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0) +todo(sm<4) probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0)
% dxcompiler emits correct array addressing. @@ -127,7 +127,7 @@ float4 main(in apple aps[2][2]) : sv_target
[test] draw quad -todo(sm>=6) probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0) +todo(sm<4) probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0)
[pixel shader] @@ -149,7 +149,7 @@ float4 main(in banana bans[2]) : sv_target
[test] draw quad -todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0) +todo(sm<4 | sm>=6) probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
[require] @@ -213,7 +213,7 @@ float4 main(in float4 tex0 : TEXCOORD0, in float4 tex1 : TEXCOORD1) : sv_target
[test] draw quad -probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0) +todo(sm<4) probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0)
% Output semantics cannot be mapped to more than one value. @@ -275,8 +275,8 @@ float4 main(in float4 t1 : TEXCOORD0, in float4 t2 : TEXCOORD0) : sv_target }
[test] -todo(sm>=6) draw quad -probe (0, 0) rgba (99.0, 99.0, 10.0, 11.0) +draw quad +todo(sm<4 | sm>=6) probe (0, 0) rgba (99.0, 99.0, 10.0, 11.0)
% Different indexes of the same semantic can have different types. @@ -288,7 +288,7 @@ float4 main(in float4 a : TEXCOORD0, in float3 b : TEXCOORD1) : sv_target
[test] draw quad -probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0) +todo(sm<4) 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 diff --git a/tests/hlsl/exp.shader_test b/tests/hlsl/exp.shader_test index 1d1889977..7a12aaa16 100644 --- a/tests/hlsl/exp.shader_test +++ b/tests/hlsl/exp.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 -1.0 0.0 1.0 2.0 draw quad -probe all rgba (0.5, 1.0, 2.0, 4.0) 2 +todo(sm<4) probe all rgba (0.5, 1.0, 2.0, 4.0) 2
[pixel shader] uniform float4 f; @@ -22,4 +22,4 @@ float4 main() : sv_target [test] uniform 0 float4 -1.0 0.0 1.0 2.0 draw quad -probe all rgba (0.36787948, 1.0, 2.7182815, 7.38905573) 2 +todo(sm<4) probe all rgba (0.36787948, 1.0, 2.7182815, 7.38905573) 2 diff --git a/tests/hlsl/expr-indexing.shader_test b/tests/hlsl/expr-indexing.shader_test index 3dcc5727e..45c27914a 100644 --- a/tests/hlsl/expr-indexing.shader_test +++ b/tests/hlsl/expr-indexing.shader_test @@ -10,10 +10,10 @@ float4 main() : sv_target uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 draw quad -probe all rgba (8.0, 8.0, 8.0, 8.0) +todo(sm<4) probe all rgba (8.0, 8.0, 8.0, 8.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 a, b; float i;
@@ -26,7 +26,7 @@ float4 main() : sv_target uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
@@ -41,10 +41,10 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 draw quad -probe all rgba (3.0, 3.0, 3.0, 3.0) +todo(sm<4) probe all rgba (3.0, 3.0, 3.0, 3.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 a; float i;
@@ -56,10 +56,10 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float 0 -draw quad +todo(sm<4) draw quad probe all rgba (4.0, 4.0, 4.0, 4.0) uniform 4 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
@@ -79,10 +79,10 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 draw quad -probe all rgba (4.0, 4.0, 4.0, 4.0) +todo(sm<4) probe all rgba (4.0, 4.0, 4.0, 4.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 a; float i;
@@ -99,5 +99,5 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float 1 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, 2.0, 2.0, 2.0) diff --git a/tests/hlsl/float-comparison.shader_test b/tests/hlsl/float-comparison.shader_test index ee4b5eb7c..7109f9af0 100644 --- a/tests/hlsl/float-comparison.shader_test +++ b/tests/hlsl/float-comparison.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f;
float4 main() : sv_target @@ -44,7 +44,7 @@ shader model < 4.0
[test] uniform 0 float4 0.0 1.5 1.5 0.0 -draw quad +todo(sm<4) draw quad todo probe all rgba (1010101.0, 11001100.0, 1101001.0, 0.0)
% SM4-5 optimises away the 'not' by inverting the condition, even though this is invalid for NaN. diff --git a/tests/hlsl/floor.shader_test b/tests/hlsl/floor.shader_test index 19f9437a9..2741865a4 100644 --- a/tests/hlsl/floor.shader_test +++ b/tests/hlsl/floor.shader_test @@ -6,7 +6,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (-1.0, 6.0, 7.0, 3.0) 4 +todo(sm<4) probe all rgba (-1.0, 6.0, 7.0, 3.0) 4
[pixel shader] uniform float4 u; @@ -19,9 +19,9 @@ float4 main() : sv_target [test] uniform 0 float4 -0.5 6.5 7.5 3.4 draw quad -probe all rgba (-1.0, 6.0, 7.0, 3.0) 4 +todo(sm<4) probe all rgba (-1.0, 6.0, 7.0, 3.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -34,7 +34,7 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (6.0, 7.0, -1.0, 3.0) 4
[require] diff --git a/tests/hlsl/fmod.shader_test b/tests/hlsl/fmod.shader_test index 05518c7cd..d21301fee 100644 --- a/tests/hlsl/fmod.shader_test +++ b/tests/hlsl/fmod.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -8,13 +8,13 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (-0.5, 0.0, 0.0, 0.0) 4 uniform 0 float4 1.1 0.3 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.2, 0.0, 0.0, 0.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -24,8 +24,8 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 2.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (-0.5, 0.5, 0.0, 0.0) 4 uniform 0 float4 1.1 0.3 3.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1.1, 0.3, 0.0, 0.0) 4 diff --git a/tests/hlsl/for.shader_test b/tests/hlsl/for.shader_test index 9407c81bc..b7fa51eec 100644 --- a/tests/hlsl/for.shader_test +++ b/tests/hlsl/for.shader_test @@ -5,7 +5,7 @@ void main(float4 pos : position, out float tex : texcoord, out float4 out_pos : out_pos = pos; }
-[pixel shader] +[pixel shader todo(sm<4)] float4 main(float tex : texcoord) : sv_target { int i; @@ -23,12 +23,12 @@ float4 main(float tex : texcoord) : sv_target }
[test] -draw quad +todo(sm<4) draw quad 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 (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 main(float tex : texcoord) : sv_target { int i; @@ -41,7 +41,7 @@ float4 main(float tex : texcoord) : sv_target }
[test] -draw quad +todo(sm<4) draw quad probe all rgba (10.0, 45.0, 0.0, 0.0)
[pixel shader fail(sm<6)] diff --git a/tests/hlsl/frac.shader_test b/tests/hlsl/frac.shader_test index f54f3fe88..829b25e76 100644 --- a/tests/hlsl/frac.shader_test +++ b/tests/hlsl/frac.shader_test @@ -9,4 +9,4 @@ float4 main() : sv_target [test] uniform 0 float4 -1.1 1.6 1.3 0.5 draw quad -probe all rgba (0.9, 0.6, 0.3, 0.5) 2 +todo(sm<4) probe all rgba (0.9, 0.6, 0.3, 0.5) 2 diff --git a/tests/hlsl/function-return.shader_test b/tests/hlsl/function-return.shader_test index be997d0c3..d9ad45432 100644 --- a/tests/hlsl/function-return.shader_test +++ b/tests/hlsl/function-return.shader_test @@ -30,10 +30,9 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.2, 0.1, 0.8, 0.5); - -[pixel shader] +todo(sm<4) probe all rgba (0.2, 0.1, 0.8, 0.5);
+[pixel shader todo(sm<4)] uniform float f;
float func(out float o) @@ -80,20 +79,19 @@ float4 main() : sv_target
[test] uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.2, 0.6, 0.3) 1 uniform 0 float 0.4 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.6, 0.5, 0.6, 0.3) 1 uniform 0 float 0.6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.6, 0.5, 0.4, 0.5) 1 uniform 0 float 0.8 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.8, 0.7, 0.4, 0.5) 1
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
float func(out float o) @@ -136,17 +134,16 @@ float4 main() : sv_target
[test] uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.2, 0.1, 0.2, 0.1) 1 uniform 0 float 0.5 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.5, 0.4, 1.0, 0.9) 1 uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1.0, 0.9, 1.0, 0.6) 1
-[pixel shader] - +[pixel shader todo(sm<4)] float func(out float o) { o = 0.1; @@ -184,11 +181,10 @@ float4 main() : sv_target }
[test] -draw quad +todo(sm<4) draw quad probe all rgba (0.4, 0.3, 0.3, 0.9) 1
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
float func(out float o) @@ -239,26 +235,26 @@ float4 main() : sv_target
[test] uniform 0 float 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.2, 0.3, 0.3) 1
uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.3, 0.3, 0.3) 1
uniform 0 float 0.3 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.5, 0.3, 0.3) 1
uniform 0 float 0.7 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.9, 0.7, 0.6) 1
uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.4, 0.1, 0.7, 0.6) 1
-[pixel shader] +[pixel shader todo(sm<4)]
uniform float4 f[3];
@@ -295,21 +291,21 @@ float4 main() : sv_target uniform 0 float4 0.3 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.1 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.3, 0.2, 0.6, 0.6) 1
uniform 4 float4 0.35 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.3, 0.3, 0.6, 0.6) 1
uniform 8 float4 0.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.3, 0.5, 0.6, 0.6) 1
uniform 0 float4 1.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.3, 0.5, 0.6, 0.6) 1
uniform 4 float4 2.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.4, 0.1, 0.6, 0.6) 1 diff --git a/tests/hlsl/function.shader_test b/tests/hlsl/function.shader_test index d712f8522..a9476ebe8 100644 --- a/tests/hlsl/function.shader_test +++ b/tests/hlsl/function.shader_test @@ -177,7 +177,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader]
@@ -201,7 +201,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.5, 0.6, 0.7, 0) +todo(sm<4) probe all rgba (0.5, 0.6, 0.7, 0)
[pixel shader]
@@ -222,7 +222,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.6, 0.1, 0.5, 0) +todo(sm<4) probe all rgba (0.6, 0.1, 0.5, 0)
% Recursion is forbidden.
@@ -276,7 +276,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 6.0, 7.0) +todo(sm<4) probe all rgba (2.0, 3.0, 6.0, 7.0)
[pixel shader] @@ -294,7 +294,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 6.0, 7.0) +todo(sm<4) probe all rgba (2.0, 3.0, 6.0, 7.0)
% Inline modifier
@@ -313,7 +313,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 6.0, 7.0) +todo(sm<4) probe all rgba (2.0, 3.0, 6.0, 7.0)
% Inline modifier used on entry point
@@ -332,4 +332,4 @@ inline float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 6.0, 7.0) +todo(sm<4) probe all rgba (2.0, 3.0, 6.0, 7.0) diff --git a/tests/hlsl/fwidth.shader_test b/tests/hlsl/fwidth.shader_test index d4c20f4e0..10ed712d2 100644 --- a/tests/hlsl/fwidth.shader_test +++ b/tests/hlsl/fwidth.shader_test @@ -18,7 +18,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad 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 (12, 10) rgba (10.0, 10.0, 10.0, 10.0) diff --git a/tests/hlsl/half.shader_test b/tests/hlsl/half.shader_test index fe7074e45..8cf7a756f 100644 --- a/tests/hlsl/half.shader_test +++ b/tests/hlsl/half.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [require] options: backcompat
-[pixel shader] +[pixel shader todo(sm<4)] uniform half h;
float4 main() : sv_target @@ -19,5 +19,5 @@ float4 main() : sv_target
[test] uniform 0 float 10.0 -draw quad +todo(sm<4) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0) diff --git a/tests/hlsl/hard-copy-prop.shader_test b/tests/hlsl/hard-copy-prop.shader_test index 8d20425f1..fa4867488 100644 --- a/tests/hlsl/hard-copy-prop.shader_test +++ b/tests/hlsl/hard-copy-prop.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] float cond;
float4 main() : sv_target @@ -17,14 +17,14 @@ float4 main() : sv_target
[test] uniform 0 float 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, 2.0, 2.0, 2.0) uniform 0 float 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (-2.0, -2.0, -2.0, -2.0)
-[pixel shader] +[pixel shader todo(sm<4)] float cond;
float4 main() : sv_target @@ -43,14 +43,14 @@ float4 main() : sv_target
[test] uniform 0 float 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, 2.0, 2.0, 2.0) uniform 0 float 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (20.0, 20.0, 20.0, 20.0)
-[pixel shader] +[pixel shader todo(sm<4)] float cond;
float4 main() : sv_target @@ -66,10 +66,11 @@ float4 main() : sv_target
return float4(r, 0, 0); } + [test] uniform 0 float 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 4.0, 0.0, 0.0) uniform 0 float 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 40.0, 0.0, 0.0) diff --git a/tests/hlsl/initializer-flatten.shader_test b/tests/hlsl/initializer-flatten.shader_test index 6b35c6b7e..c5e263479 100644 --- a/tests/hlsl/initializer-flatten.shader_test +++ b/tests/hlsl/initializer-flatten.shader_test @@ -7,7 +7,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1, 2, 3, 4) +todo(sm<4) probe all rgba (1, 2, 3, 4)
[pixel shader] @@ -25,7 +25,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (4, 5, 6, 7) +todo(sm<4) probe all rgba (4, 5, 6, 7)
[pixel shader] @@ -38,7 +38,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (40, 10, 20, 30) +todo(sm<4) probe all rgba (40, 10, 20, 30)
[pixel shader] @@ -57,7 +57,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] @@ -70,4 +70,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0) diff --git a/tests/hlsl/initializer-implicit-array.shader_test b/tests/hlsl/initializer-implicit-array.shader_test index fff2b8fdf..1fcf9cb73 100644 --- a/tests/hlsl/initializer-implicit-array.shader_test +++ b/tests/hlsl/initializer-implicit-array.shader_test @@ -8,7 +8,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (50, 60, 70, 80) +todo(sm<4) probe all rgba (50, 60, 70, 80)
% dxcompiler emits a nop shader which returns immediately. @@ -26,7 +26,7 @@ float4 main() : sv_target
[test] draw quad -todo(sm>=6) probe all rgba (5.0, 6.0, 7.0, 8.0) +todo(sm<4) probe all rgba (5.0, 6.0, 7.0, 8.0)
[require] % reset requirements @@ -41,7 +41,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (7.0, 8.0, 9.0, 10.0) +todo(sm<4) probe all rgba (7.0, 8.0, 9.0, 10.0)
[pixel shader] @@ -69,7 +69,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (318.0, 320.0, 322.0, 324.0) +todo(sm<4) probe all rgba (318.0, 320.0, 322.0, 324.0)
[pixel shader fail] diff --git a/tests/hlsl/initializer-invalid-arg-count.shader_test b/tests/hlsl/initializer-invalid-arg-count.shader_test index 4332fbe80..7b5c22409 100644 --- a/tests/hlsl/initializer-invalid-arg-count.shader_test +++ b/tests/hlsl/initializer-invalid-arg-count.shader_test @@ -10,7 +10,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (17, 18, 19, 20) +todo(sm<4) probe all rgba (17, 18, 19, 20)
[pixel shader fail] @@ -58,7 +58,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (22, 23, 24, 25) +todo(sm<4) probe all rgba (22, 23, 24, 25)
[pixel shader fail] diff --git a/tests/hlsl/initializer-local-array.shader_test b/tests/hlsl/initializer-local-array.shader_test index 0862d4c90..a51de9a61 100644 --- a/tests/hlsl/initializer-local-array.shader_test +++ b/tests/hlsl/initializer-local-array.shader_test @@ -11,7 +11,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 23, 24) +todo(sm<4) probe all rgba (21, 22, 23, 24)
[pixel shader] @@ -32,4 +32,4 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (71, 72, 73, 74) +todo(sm<4) probe all rgba (71, 72, 73, 74) diff --git a/tests/hlsl/initializer-matrix.shader_test b/tests/hlsl/initializer-matrix.shader_test index 7e12b0a00..d18ffd296 100644 --- a/tests/hlsl/initializer-matrix.shader_test +++ b/tests/hlsl/initializer-matrix.shader_test @@ -7,7 +7,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 23, 0) +todo(sm<4) probe all rgba (21, 22, 23, 0)
[pixel shader] @@ -19,7 +19,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 23, 0) +todo(sm<4) probe all rgba (21, 22, 23, 0)
[pixel shader] @@ -31,7 +31,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 23, 24) +todo(sm<4) probe all rgba (21, 22, 23, 24)
[pixel shader] @@ -43,7 +43,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 31, 32) +todo(sm<4) probe all rgba (21, 22, 31, 32)
[pixel shader] @@ -56,7 +56,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 31, 32) +todo(sm<4) probe all rgba (21, 22, 31, 32)
[pixel shader] @@ -69,4 +69,4 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 31, 32) +todo(sm<4) probe all rgba (21, 22, 31, 32) diff --git a/tests/hlsl/initializer-multi.shader_test b/tests/hlsl/initializer-multi.shader_test index 8f8a31e20..678b38769 100644 --- a/tests/hlsl/initializer-multi.shader_test +++ b/tests/hlsl/initializer-multi.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2, 3, 3, 0) +todo(sm<4) probe all rgba (2, 3, 3, 0)
[pixel shader fail] @@ -33,7 +33,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (7.2, 8.0, 7.2, 8.0) +todo(sm<4) probe all rgba (7.2, 8.0, 7.2, 8.0)
[pixel shader] @@ -49,4 +49,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.2, 9.0, 5.2, 9.0) +todo(sm<4) probe all rgba (5.2, 9.0, 5.2, 9.0) diff --git a/tests/hlsl/initializer-nested.shader_test b/tests/hlsl/initializer-nested.shader_test index b00259c9a..64a9ea932 100644 --- a/tests/hlsl/initializer-nested.shader_test +++ b/tests/hlsl/initializer-nested.shader_test @@ -7,7 +7,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1, 2, 3, 4) +todo(sm<4) probe all rgba (1, 2, 3, 4)
[pixel shader] @@ -24,7 +24,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (21, 22, 23, 24) +todo(sm<4) probe all rgba (21, 22, 23, 24)
[pixel shader] @@ -53,4 +53,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (21, 22, 23, 24) +todo(sm<4) probe all rgba (21, 22, 23, 24) diff --git a/tests/hlsl/initializer-numeric.shader_test b/tests/hlsl/initializer-numeric.shader_test index 617b67405..57f100325 100644 --- a/tests/hlsl/initializer-numeric.shader_test +++ b/tests/hlsl/initializer-numeric.shader_test @@ -7,7 +7,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) 4 +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0) 4
[pixel shader] @@ -19,7 +19,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) 4 +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0) 4
[pixel shader] @@ -32,7 +32,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) 4 +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0) 4
[pixel shader] @@ -45,7 +45,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (10.1, 1.1, 1.2, 2.1) 4 +todo(sm<4) probe all rgba (10.1, 1.1, 1.2, 2.1) 4
[pixel shader] @@ -57,7 +57,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (3.0, 250.0, 16.0, 4.2949673e+009) 4 +todo(sm<4) probe all rgba (3.0, 250.0, 16.0, 4.2949673e+009) 4
[require] @@ -73,4 +73,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (-1294967296.0, 3000000000.0, 0.0, 0.0) 4 +todo(sm<4) probe all rgba (-1294967296.0, 3000000000.0, 0.0, 0.0) 4 diff --git a/tests/hlsl/initializer-static-array.shader_test b/tests/hlsl/initializer-static-array.shader_test index 577335023..8596dd77b 100644 --- a/tests/hlsl/initializer-static-array.shader_test +++ b/tests/hlsl/initializer-static-array.shader_test @@ -12,7 +12,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (21, 22, 23, 24) +todo(sm<4) probe all rgba (21, 22, 23, 24)
[pixel shader] @@ -34,4 +34,4 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (61, 62, 63, 64) +todo(sm<4) probe all rgba (61, 62, 63, 64) diff --git a/tests/hlsl/initializer-struct.shader_test b/tests/hlsl/initializer-struct.shader_test index f4028b5bb..9ecf2ff67 100644 --- a/tests/hlsl/initializer-struct.shader_test +++ b/tests/hlsl/initializer-struct.shader_test @@ -23,7 +23,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (41, 42, 43, 44) +todo(sm<4) probe all rgba (41, 42, 43, 44)
[pixel shader] @@ -53,7 +53,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (4311, 4312, 4313, 4314) +todo(sm<4) probe all rgba (4311, 4312, 4313, 4314)
[pixel shader] @@ -81,4 +81,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (21, 22, 23, 24) +todo(sm<4) probe all rgba (21, 22, 23, 24) diff --git a/tests/hlsl/intrinsic-override.shader_test b/tests/hlsl/intrinsic-override.shader_test index b95f80e7f..b421d275d 100644 --- a/tests/hlsl/intrinsic-override.shader_test +++ b/tests/hlsl/intrinsic-override.shader_test @@ -12,7 +12,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.3, 0.3, 0.4, 0.6) +todo(sm<4) probe all rgba (0.3, 0.3, 0.4, 0.6)
[pixel shader fail(sm>=6)]
@@ -28,7 +28,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.3, 0.3, 0.3, 0.4) +todo(sm<4) probe all rgba (0.3, 0.3, 0.3, 0.4)
[require] diff --git a/tests/hlsl/ldexp.shader_test b/tests/hlsl/ldexp.shader_test index f8ad40d8e..ef85b004a 100644 --- a/tests/hlsl/ldexp.shader_test +++ b/tests/hlsl/ldexp.shader_test @@ -11,7 +11,7 @@ float4 main() : SV_TARGET uniform 0 float4 2.0 3.0 4.0 5.0 uniform 4 float4 0.0 -10.0 10.0 100.0 draw quad -probe all rgba (2.0, 0.00292968750, 4096.0, 6.33825300e+030) 2 +todo(sm<4) probe all rgba (2.0, 0.00292968750, 4096.0, 6.33825300e+030) 2
[require] shader model >= 4.0 diff --git a/tests/hlsl/length.shader_test b/tests/hlsl/length.shader_test index 44b4e5254..877b60349 100644 --- a/tests/hlsl/length.shader_test +++ b/tests/hlsl/length.shader_test @@ -9,7 +9,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 5.0 draw quad -probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1 +todo(sm<4) probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1
[pixel shader] uniform float3 x; @@ -22,7 +22,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 0.0 draw quad -probe all rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1 +todo(sm<4) probe all rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1
[pixel shader] uniform float2 x; @@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1
[pixel shader] @@ -48,7 +48,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 0.0 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (2.0, 2.0, 2.0, 2.0) +todo(sm<4) probe all rgba (2.0, 2.0, 2.0, 2.0)
[pixel shader] uniform float x; @@ -61,7 +61,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 0.0 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (2.0, 2.0, 2.0, 2.0) +todo(sm<4) probe all rgba (2.0, 2.0, 2.0, 2.0)
[pixel shader fail] uniform float1x3 x; diff --git a/tests/hlsl/lerp.shader_test b/tests/hlsl/lerp.shader_test index 15e90cef9..00582efaa 100644 --- a/tests/hlsl/lerp.shader_test +++ b/tests/hlsl/lerp.shader_test @@ -13,7 +13,7 @@ uniform 0 float4 2.0 3.0 4.0 5.0 uniform 4 float4 0.0 -10.0 10.0 100.0 uniform 8 float4 0.0 1.0 -1.0 0.75 draw quad -probe all rgba (2.0, -10.0, -2.0, 76.25) +todo(sm<4) probe all rgba (2.0, -10.0, -2.0, 76.25)
[require] shader model >= 4.0 diff --git a/tests/hlsl/lit.shader_test b/tests/hlsl/lit.shader_test index fcf37d78b..273d52678 100644 --- a/tests/hlsl/lit.shader_test +++ b/tests/hlsl/lit.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -8,20 +8,20 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.1 10.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 0.0, 0.0, 1.0)
[test] uniform 0 float4 1.2 -0.1 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.2, 0.0, 1.0)
[test] uniform 0 float4 1.2 2.0 3.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.2, 8.0, 1.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -31,7 +31,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.2 2.0 3.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, 2.4, 16.0, 2.0)
[pixel shader fail] diff --git a/tests/hlsl/log.shader_test b/tests/hlsl/log.shader_test index b0f405d11..ebe37a6a9 100644 --- a/tests/hlsl/log.shader_test +++ b/tests/hlsl/log.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 2.0 4.0 5.0 0.4 draw quad -probe all rgba (1.0, 2.0, 2.32192802, -1.32192802) 1 +todo(sm<4) probe all rgba (1.0, 2.0, 2.32192802, -1.32192802) 1
[pixel shader] uniform float4 x; @@ -22,7 +22,7 @@ float4 main() : sv_target [test] uniform 0 float4 10.0 100.0 1.0 0.1 draw quad -probe all rgba (1.0, 2.0, 0.0, -1.0) 1 +todo(sm<4) probe all rgba (1.0, 2.0, 0.0, -1.0) 1
[pixel shader] uniform float4 x; @@ -35,4 +35,4 @@ float4 main() : sv_target [test] uniform 0 float4 3.0 10.0 1.0 0.1 draw quad -probe all rgba (1.0986123, 2.302585, 0.0, -2.302585) 2 +todo(sm<4) probe all rgba (1.0986123, 2.302585, 0.0, -2.302585) 2 diff --git a/tests/hlsl/logic-operations.shader_test b/tests/hlsl/logic-operations.shader_test index 360ca03b3..7ac3509f5 100644 --- a/tests/hlsl/logic-operations.shader_test +++ b/tests/hlsl/logic-operations.shader_test @@ -9,7 +9,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (0.0, 1.0, 1.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -23,7 +23,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 0.0, 0.0, 1.0) +todo(sm<4) probe all rgba (0.0, 0.0, 0.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -36,7 +36,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 0.0, 0.0, 1.0) +todo(sm<4) probe all rgba (0.0, 0.0, 0.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -49,7 +49,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (0.0, 1.0, 1.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -62,7 +62,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (0.0, 1.0, 1.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -76,7 +76,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 0.0, 0.0, 1.0) +todo(sm<4) probe all rgba (0.0, 0.0, 0.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -89,7 +89,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 0.0, 0.0, 1.0) +todo(sm<4) probe all rgba (0.0, 0.0, 0.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -102,7 +102,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (0.0, 1.0, 1.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -115,7 +115,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (0.0, 1.0, 1.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -129,7 +129,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 0.0, 0.0, 1.0) +todo(sm<4) probe all rgba (0.0, 0.0, 0.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -142,7 +142,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 0.0, 0.0, 1.0) +todo(sm<4) probe all rgba (0.0, 0.0, 0.0, 1.0)
[pixel shader] float4 main() : SV_TARGET @@ -155,4 +155,4 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (0.0, 1.0, 1.0, 1.0) diff --git a/tests/hlsl/loop.shader_test b/tests/hlsl/loop.shader_test index 35a303595..a9431085a 100644 --- a/tests/hlsl/loop.shader_test +++ b/tests/hlsl/loop.shader_test @@ -1,6 +1,6 @@ % TODO: dxcompiler emits no loops for any of these test shaders.
-[pixel shader] +[pixel shader todo(sm<4)] float a;
float4 main() : sv_target @@ -18,11 +18,11 @@ float4 main() : sv_target
[test] uniform 0 float 5.0 -draw quad +todo(sm<4) draw quad probe all rgba (50.0, 50.0, 50.0, 50.0)
-[pixel shader] +[pixel shader todo(sm<4)] float a;
float4 main() : sv_target @@ -41,10 +41,10 @@ float4 main() : sv_target
[test] uniform 0 float 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (20.0, 20.0, 20.0, 20.0)
-[pixel shader] +[pixel shader todo(sm<4)] float a;
float4 main() : sv_target @@ -70,10 +70,10 @@ float4 main() : sv_target
[test] uniform 0 float 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (409.1, 409.1, 409.1, 409.1)
-[pixel shader] +[pixel shader todo(sm<4)] float a;
float4 main() : sv_target @@ -100,11 +100,11 @@ float4 main() : sv_target
[test] uniform 0 float 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (410.1, 410.1, 410.1, 410.1)
% loop attribute by itself -[pixel shader] +[pixel shader todo(sm<4)] float4 main() : sv_target { float ret = 0.0; @@ -118,10 +118,10 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 main() : sv_target { float ret = 0.0; @@ -137,10 +137,10 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 main() : sv_target { float ret = 0.0; @@ -156,7 +156,7 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
% unroll can't be used with fastopt or loop diff --git a/tests/hlsl/majority-pragma.shader_test b/tests/hlsl/majority-pragma.shader_test index 84dff63e0..8b33375ec 100644 --- a/tests/hlsl/majority-pragma.shader_test +++ b/tests/hlsl/majority-pragma.shader_test @@ -18,7 +18,7 @@ uniform 4 float4 0.3 0.4 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 todo(sm>=6) draw quad -probe all rgba (0.17, 0.39, 0.17, 0.39) 1 +todo(sm<4) probe all rgba (0.17, 0.39, 0.17, 0.39) 1
%% Test with a struct. @@ -41,7 +41,7 @@ float4 main() : sv_target uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4)
%% Test with an array. @@ -62,7 +62,7 @@ uniform 4 float4 0.0 0.0 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 draw quad -probe all rgba (0.5, 0.6, 0.7, 0.8) +todo(sm<4) probe all rgba (0.5, 0.6, 0.7, 0.8)
% The documentation claims these strings are subject to macro expansion. @@ -91,7 +91,7 @@ float4 main() : sv_target uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (0.23, 0.34, 0.5, 0.5) 1 +todo(sm<4) probe all rgba (0.23, 0.34, 0.5, 0.5) 1
% The majority that applies to a typedef is the latent majority at the time @@ -112,7 +112,7 @@ float4 main() : sv_target uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4)
% In fact, it's illegal to specify a contradictory majority. @@ -150,7 +150,7 @@ uniform 4 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 draw quad -probe all rgba (0.3, 0.4, 0.5, 0.6) +todo(sm<4) probe all rgba (0.3, 0.4, 0.5, 0.6)
% However, if no pack_matrix directive has been used yet, a typedef has no @@ -174,7 +174,7 @@ float4 main() : sv_target uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4)
% This does not apply recursively to struct or array members, however. Members @@ -202,7 +202,7 @@ float4 main() : sv_target uniform 0 float4 0.2 0.4 0.0 0.0 uniform 4 float4 0.3 0.5 0.0 0.0 draw quad -probe all rgba (0.2, 0.3, 0.4, 0.5) +todo(sm<4) probe all rgba (0.2, 0.3, 0.4, 0.5)
[pixel shader] @@ -222,7 +222,7 @@ uniform 4 float4 0.4 0.0 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 draw quad -probe all rgba (0.3, 0.4, 0.5, 0.6) +todo(sm<4) probe all rgba (0.3, 0.4, 0.5, 0.6)
% Compiler options [require] @@ -246,7 +246,7 @@ uniform 4 float4 0.2 0.6 1.0 1.4 uniform 8 float4 0.3 0.7 1.1 1.5 uniform 12 float4 0.4 0.8 1.2 1.6 draw quad -probe all rgba (0.2, 0.3, 0.6, 0.7) 1 +todo(sm<4) probe all rgba (0.2, 0.3, 0.6, 0.7) 1
[require] options: column-major @@ -268,7 +268,7 @@ uniform 4 float4 0.2 0.6 1.0 1.4 uniform 8 float4 0.3 0.7 1.1 1.5 uniform 12 float4 0.4 0.8 1.2 1.6 draw quad -probe all rgba (0.2, 0.3, 0.6, 0.7) 1 +todo(sm<4) probe all rgba (0.2, 0.3, 0.6, 0.7) 1
[require] options: row-major @@ -290,7 +290,7 @@ uniform 4 float4 0.2 0.6 1.0 1.4 uniform 8 float4 0.3 0.7 1.1 1.5 uniform 12 float4 0.4 0.8 1.2 1.6 draw quad -probe all rgba (0.5, 0.9, 0.6, 1.0) 1 +todo(sm<4) probe all rgba (0.5, 0.9, 0.6, 1.0) 1
[require] options: column-major @@ -318,7 +318,7 @@ uniform 20 float4 1.8 2.2 2.6 3.0 uniform 24 float4 1.9 2.3 2.7 3.1 uniform 28 float4 2.0 2.4 2.8 3.2 draw quad -probe all rgba (0.3, 0.4, 2.5, 2.9) 1 +todo(sm<4) probe all rgba (0.3, 0.4, 2.5, 2.9) 1
[require] options: row-major @@ -346,7 +346,7 @@ uniform 20 float4 1.8 2.2 2.6 3.0 uniform 24 float4 1.9 2.3 2.7 3.1 uniform 28 float4 2.0 2.4 2.8 3.2 draw quad -probe all rgba (1.2, 1.6, 3.1, 3.2) 1 +todo(sm<4) probe all rgba (1.2, 1.6, 3.1, 3.2) 1
[require] options: column-major row-major @@ -366,4 +366,4 @@ float4 main() : sv_target uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 draw quad -probe all rgba (0.1, 0.3, 0.2, 0.4) 1 +todo(sm<4) probe all rgba (0.1, 0.3, 0.2, 0.4) 1 diff --git a/tests/hlsl/majority-syntax.shader_test b/tests/hlsl/majority-syntax.shader_test index f1f5291ff..7e2b72c5d 100644 --- a/tests/hlsl/majority-syntax.shader_test +++ b/tests/hlsl/majority-syntax.shader_test @@ -12,7 +12,7 @@ float4 main() : sv_target uniform 0 float4 0.1 0.3 0.0 0.0 uniform 4 float4 0.2 0.4 0.0 0.0 draw quad -probe all rgba (0.1, 0.3, 0.2, 0.4) +todo(sm<4) probe all rgba (0.1, 0.3, 0.2, 0.4)
[pixel shader fail(sm<6)] row_major row_major float4x4 m; diff --git a/tests/hlsl/majority-typedef.shader_test b/tests/hlsl/majority-typedef.shader_test index fa62dd5f7..793eb41b4 100644 --- a/tests/hlsl/majority-typedef.shader_test +++ b/tests/hlsl/majority-typedef.shader_test @@ -19,4 +19,4 @@ uniform 4 float4 0.3 0.4 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 todo(sm>=6) draw quad -probe all rgba (0.17, 0.39, 0.17, 0.39) 1 +todo(sm<4) probe all rgba (0.17, 0.39, 0.17, 0.39) 1 diff --git a/tests/hlsl/math.shader_test b/tests/hlsl/math.shader_test index 15f579331..7c08d1322 100644 --- a/tests/hlsl/math.shader_test +++ b/tests/hlsl/math.shader_test @@ -15,4 +15,4 @@ float4 main() : SV_TARGET uniform 0 float4 2.5 0.3 0.2 0.7 uniform 4 float4 0.1 1.5 0.0 0.0 draw quad -probe all rgba (-12.43, 9.833333, 1.6, 35.0) 1 +todo(sm<4) probe all rgba (-12.43, 9.833333, 1.6, 35.0) 1 diff --git a/tests/hlsl/matrix-indexing.shader_test b/tests/hlsl/matrix-indexing.shader_test index f44ba63ef..8fd7082ba 100644 --- a/tests/hlsl/matrix-indexing.shader_test +++ b/tests/hlsl/matrix-indexing.shader_test @@ -12,7 +12,7 @@ uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 13.0 14.0 15.0 16.0 draw quad -probe all rgba (1.0, 2.0, 10.0, 15.0) +todo(sm<4) probe all rgba (1.0, 2.0, 10.0, 15.0)
[pixel shader] uniform column_major float4x4 m; @@ -28,7 +28,7 @@ uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 13.0 14.0 15.0 16.0 draw quad -probe all rgba (1.0, 2.0, 10.0, 15.0) +todo(sm<4) probe all rgba (1.0, 2.0, 10.0, 15.0)
[pixel shader] uniform row_major float4x4 m; @@ -44,7 +44,7 @@ uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 13.0 14.0 15.0 16.0 draw quad -probe all rgba (1.0, 5.0, 7.0, 12.0) +todo(sm<4) probe all rgba (1.0, 5.0, 7.0, 12.0)
[pixel shader] uniform float3x2 m; @@ -59,7 +59,7 @@ float4 main() : SV_TARGET uniform 0 float4 1.0 2.0 3.0 0.0 uniform 4 float4 5.0 6.0 7.0 0.0 draw quad -probe all rgba (1.0, 3.0, 6.0, 7.0) +todo(sm<4) probe all rgba (1.0, 3.0, 6.0, 7.0)
[pixel shader] float4 main() : SV_TARGET @@ -75,7 +75,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (1.0, 5.0, 7.0, 12.0) +todo(sm<4) probe all rgba (1.0, 5.0, 7.0, 12.0)
[pixel shader] @@ -90,7 +90,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (30.0, 40.0, 5.0, 6.0) +todo(sm<4) probe all rgba (30.0, 40.0, 5.0, 6.0)
[pixel shader] @@ -105,10 +105,10 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (3.0, 4.0, 50.0, 60.0) +todo(sm<4) probe all rgba (3.0, 4.0, 50.0, 60.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i;
float4 main() : sv_target @@ -120,11 +120,11 @@ float4 main() : sv_target
[test] uniform 0 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (8, 9, 10, 11)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i;
float4 main() : sv_target @@ -136,5 +136,5 @@ float4 main() : sv_target
[test] uniform 0 float 3 -draw quad +todo(sm<4) draw quad probe all rgba (12, 13, 14, 15) diff --git a/tests/hlsl/max.shader_test b/tests/hlsl/max.shader_test index e2763df46..a7c60450f 100644 --- a/tests/hlsl/max.shader_test +++ b/tests/hlsl/max.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.7 -0.1 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (0.7, 2.1, 2.0, -1.0) +todo(sm<4) probe all rgba (0.7, 2.1, 2.0, -1.0)
[pixel shader] @@ -25,7 +25,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.7 -0.1 0.4 0.8 todo(sm>=6) draw quad -probe all rgba (0.7, 0.8, 0.7, 0.2) +todo(sm<4) probe all rgba (0.7, 0.8, 0.7, 0.2)
[pixel shader] @@ -40,7 +40,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (6.0, 5.0, 4.0, 5.0) +todo(sm<4) probe all rgba (6.0, 5.0, 4.0, 5.0)
[pixel shader fail] diff --git a/tests/hlsl/mul.shader_test b/tests/hlsl/mul.shader_test index 7ddd50b64..12b4dfbaa 100644 --- a/tests/hlsl/mul.shader_test +++ b/tests/hlsl/mul.shader_test @@ -12,7 +12,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (30.0, 70.0, 110.0, 150.0) +todo(sm<4) probe all rgba (30.0, 70.0, 110.0, 150.0)
[pixel shader] float4 main() : sv_target @@ -28,7 +28,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (90.0, 100.0, 110.0, 120.0) +todo(sm<4) probe all rgba (90.0, 100.0, 110.0, 120.0)
[pixel shader] float4 main() : sv_target @@ -44,7 +44,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (14.0, 38.0, 62.0, 86.0) +todo(sm<4) probe all rgba (14.0, 38.0, 62.0, 86.0)
[pixel shader] float4 main() : sv_target @@ -60,7 +60,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (38.0, 44.0, 50.0, 56.0) +todo(sm<4) probe all rgba (38.0, 44.0, 50.0, 56.0)
[pixel shader] float4 main() : sv_target @@ -75,7 +75,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (14.0, 32.0, 50.0, 0.0) +todo(sm<4) probe all rgba (14.0, 32.0, 50.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -90,7 +90,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (30.0, 36.0, 42.0, 0.0) +todo(sm<4) probe all rgba (30.0, 36.0, 42.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -106,7 +106,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (50.0, 60.0, 70.0, 80.0) +todo(sm<4) probe all rgba (50.0, 60.0, 70.0, 80.0)
[pixel shader] float4 main() : sv_target @@ -122,7 +122,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (50.0, 60.0, 70.0, 80.0) +todo(sm<4) probe all rgba (50.0, 60.0, 70.0, 80.0)
[pixel shader] float4 main() : sv_target @@ -138,7 +138,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (10.0, 20.0, 30.0, 40.0) +todo(sm<4) probe all rgba (10.0, 20.0, 30.0, 40.0)
[pixel shader] float4 main() : sv_target @@ -154,7 +154,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (10.0, 50.0, 90.0, 130.0) +todo(sm<4) probe all rgba (10.0, 50.0, 90.0, 130.0)
[pixel shader] float4 main() : sv_target @@ -170,7 +170,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (10.0, 20.0, 30.0, 40.0) +todo(sm<4) probe all rgba (10.0, 20.0, 30.0, 40.0)
[pixel shader] float4 main() : sv_target @@ -186,7 +186,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (10.0, 50.0, 90.0, 130.0) +todo(sm<4) probe all rgba (10.0, 50.0, 90.0, 130.0)
[pixel shader] float4 main() : sv_target @@ -202,7 +202,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (90.0, 100.0, 110.0, 120.0) +todo(sm<4) probe all rgba (90.0, 100.0, 110.0, 120.0)
[pixel shader] float4 main() : sv_target @@ -218,7 +218,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 10.0, 15.0, 20.0) +todo(sm<4) probe all rgba (5.0, 10.0, 15.0, 20.0)
[pixel shader] float4 main() : sv_target @@ -234,7 +234,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -250,7 +250,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (30.0, 70.0, 110.0, 150.0) +todo(sm<4) probe all rgba (30.0, 70.0, 110.0, 150.0)
[pixel shader] float4 main() : sv_target @@ -268,7 +268,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (83.0, 98.0, 113.0, 128.0) +todo(sm<4) probe all rgba (83.0, 98.0, 113.0, 128.0)
[pixel shader] float4 main() : sv_target @@ -286,7 +286,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (78.0, 96.0, 114.0, 0.0) +todo(sm<4) probe all rgba (78.0, 96.0, 114.0, 0.0)
[pixel shader] @@ -301,7 +301,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (20.0, 14.0, 56.0, 41.0) +todo(sm<4) probe all rgba (20.0, 14.0, 56.0, 41.0)
[pixel shader] @@ -316,4 +316,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 11.0, 0.0, 0.0) +todo(sm<4) probe all rgba (5.0, 11.0, 0.0, 0.0) diff --git a/tests/hlsl/multiple-rt.shader_test b/tests/hlsl/multiple-rt.shader_test index 59e4acbbe..df225a718 100644 --- a/tests/hlsl/multiple-rt.shader_test +++ b/tests/hlsl/multiple-rt.shader_test @@ -15,5 +15,5 @@ void main(out float4 o0 : sv_target0, out float4 o1 : sv_target1)
[test] draw quad -probe render target 0 all rgba (0.1, 0.2, 0.3, 0.4) -probe render target 1 all rgba (0.5, 0.6, 0.7, 0.8) +todo(sm<4) probe render target 0 all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe render target 1 all rgba (0.5, 0.6, 0.7, 0.8) diff --git a/tests/hlsl/nested-arrays.shader_test b/tests/hlsl/nested-arrays.shader_test index c9ba186bd..7d9077640 100644 --- a/tests/hlsl/nested-arrays.shader_test +++ b/tests/hlsl/nested-arrays.shader_test @@ -22,4 +22,4 @@ uniform 12 float4 0.4 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 draw quad -probe all rgba (0.4, 0.1, 0.6, 0.3) +todo(sm<4) probe all rgba (0.4, 0.1, 0.6, 0.3) diff --git a/tests/hlsl/non-const-indexing.shader_test b/tests/hlsl/non-const-indexing.shader_test index 82a6e321e..b0452148e 100644 --- a/tests/hlsl/non-const-indexing.shader_test +++ b/tests/hlsl/non-const-indexing.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f[3]; uniform float2 i;
@@ -12,20 +12,20 @@ uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 0 0 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 2.0, 3.0, 4.0) uniform 12 float4 1 0 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 12 float4 0 1 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 12 float4 1 1 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (9.0, 10.0, 11.0, 12.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i;
float4 main() : SV_TARGET @@ -36,20 +36,20 @@ float4 main() : SV_TARGET
[test] uniform 0 float 0 -draw quad +todo(sm<4) draw quad probe all rgba (11.0, 11.0, 11.0, 11.0) uniform 0 float 1 -draw quad +todo(sm<4) draw quad probe all rgba (12.0, 12.0, 12.0, 12.0) uniform 0 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (13.0, 13.0, 13.0, 13.0) uniform 0 float 3 -draw quad +todo(sm<4) draw quad probe all rgba (14.0, 14.0, 14.0, 14.0)
-[pixel shader] +[pixel shader todo(sm<4)] float i;
float4 main() : sv_target @@ -61,11 +61,11 @@ float4 main() : sv_target
[test] uniform 0 float 2.3 -draw quad +todo(sm<4) draw quad probe all rgba (3, 3, 3, 3)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i;
float4 main() : SV_TARGET @@ -77,20 +77,20 @@ float4 main() : SV_TARGET
[test] uniform 0 float 0 -draw quad +todo(sm<4) draw quad probe all rgba (21.0, 1.0, 24.0, 0.0) uniform 0 float 1 -draw quad +todo(sm<4) draw quad probe all rgba (22.0, 0.0, 23.0, 1.0) uniform 0 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (23.0, 1.0, 22.0, 0.0) uniform 0 float 3 -draw quad +todo(sm<4) draw quad probe all rgba (24.0, 0.0, 21.0, 1.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 i;
float4 main() : sv_target @@ -102,20 +102,20 @@ float4 main() : sv_target
[test] uniform 0 float4 0 0 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 2.0, 3.0, 4.0) uniform 0 float4 1 0 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 0 float4 0 1 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 0 float4 1 1 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (9.0, 10.0, 11.0, 12.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 a;
float4 main() : sv_target @@ -130,7 +130,7 @@ float4 main() : sv_target
[test] uniform 0 float4 0 0 2.4 0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 120.0, 90.0, 4.0)
@@ -242,8 +242,8 @@ uniform 8 float 3.0 uniform 12 float 4.0 uniform 16 uint4 3 1 0 2 uniform 20 uint4 0 3 1 2 -draw quad -todo probe all rgba (1.0, 1.0, 1.0, 1.0) +todo draw quad +todo(sm<4) probe all rgba (1.0, 1.0, 1.0, 1.0)
[require] shader model >= 4.0 diff --git a/tests/hlsl/normalize.shader_test b/tests/hlsl/normalize.shader_test index 8b181dfa5..e048de69b 100644 --- a/tests/hlsl/normalize.shader_test +++ b/tests/hlsl/normalize.shader_test @@ -9,7 +9,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 5.0 todo(sm>=6) draw quad -probe all rgba (0.272165537, 0.408248305, 0.544331074, 0.680413842) 2 +todo(sm<4) probe all rgba (0.272165537, 0.408248305, 0.544331074, 0.680413842) 2
[pixel shader] uniform float3 x; @@ -22,7 +22,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 0.0 todo(sm>=6) draw quad -probe all rgba (0.371390700, 0.557086051, 0.742781401, 0.0) 1 +todo(sm<4) probe all rgba (0.371390700, 0.557086051, 0.742781401, 0.0) 1
[pixel shader] uniform float2 x; @@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.554700196, 0.832050323, 0.0, 0.0) 1
[pixel shader] @@ -48,7 +48,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 0.0 0.0 0.0 draw quad -probe all rgba (1.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] uniform float x; @@ -61,7 +61,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 0.0 0.0 0.0 draw quad -probe all rgba (1.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader fail] uniform float1x3 x; diff --git a/tests/hlsl/numeric-constructor-truncation.shader_test b/tests/hlsl/numeric-constructor-truncation.shader_test index f18b34d68..650e80ecc 100644 --- a/tests/hlsl/numeric-constructor-truncation.shader_test +++ b/tests/hlsl/numeric-constructor-truncation.shader_test @@ -7,7 +7,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (71.0, 72.0, 73.0, 75.0) +todo(sm<4) probe all rgba (71.0, 72.0, 73.0, 75.0)
[pixel shader] @@ -30,4 +30,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 5.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 5.0) diff --git a/tests/hlsl/numeric-types.shader_test b/tests/hlsl/numeric-types.shader_test index dfdd7a538..832d35b51 100644 --- a/tests/hlsl/numeric-types.shader_test +++ b/tests/hlsl/numeric-types.shader_test @@ -7,7 +7,7 @@ vector main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] float4 main() : sv_target @@ -18,7 +18,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] float4 main() : sv_target @@ -29,7 +29,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 0.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 0.0)
[pixel shader fail] vector main() : sv_target @@ -57,7 +57,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 6.0, 7.0, 8.0) +todo(sm<4) probe all rgba (5.0, 6.0, 7.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -69,7 +69,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 6.0, 7.0, 0.0) +todo(sm<4) probe all rgba (5.0, 6.0, 7.0, 0.0)
[pixel shader fail(sm<6)] float4 main() : sv_target diff --git a/tests/hlsl/pow.shader_test b/tests/hlsl/pow.shader_test index 1c9394f06..74ce406d0 100644 --- a/tests/hlsl/pow.shader_test +++ b/tests/hlsl/pow.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.4 0.8 2.5 2.0 draw quad -probe all rgba (0.512, 0.101192884, 0.64, 0.25) 4 +todo(sm<4) probe all rgba (0.512, 0.101192884, 0.64, 0.25) 4
[pixel shader] @@ -24,7 +24,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 32.0, 256.0, 125.0) 2 +todo(sm<4) probe all rgba (1.0, 32.0, 256.0, 125.0) 2
[pixel shader fail] diff --git a/tests/hlsl/reflect.shader_test b/tests/hlsl/reflect.shader_test index 25890086b..e230310c7 100644 --- a/tests/hlsl/reflect.shader_test +++ b/tests/hlsl/reflect.shader_test @@ -11,7 +11,7 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 todo(sm>=6) draw quad -probe all rgba (-0.1, -0.5, 0.5, -0.7) 4 +todo(sm<4) probe all rgba (-0.1, -0.5, 0.5, -0.7) 4
[pixel shader] uniform float4 i; @@ -28,7 +28,7 @@ float4 main() : sv_target uniform 0 float4 0.5 0.0 0.0 0.0 uniform 4 float4 0.6 0.4 -0.3 1.0 todo(sm>=6) draw quad -probe all rgba (-0.52, -0.18, 1.01, -1.2) 4 +todo(sm<4) probe all rgba (-0.52, -0.18, 1.01, -1.2) 4
[pixel shader] uniform float4 i; @@ -45,7 +45,7 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.0 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (-0.148, -0.748, -0.448, -0.348) 4 +todo(sm<4) probe all rgba (-0.148, -0.748, -0.448, -0.348) 4
[pixel shader] uniform float4 i; @@ -63,7 +63,7 @@ float4 main() : sv_target uniform 0 float4 0.5 0.0 0.0 0.0 uniform 4 float4 0.6 0.0 0.0 0.0 draw quad -probe all rgba (0.14, 0.14, 0.14, 0.14) 4 +todo(sm<4) probe all rgba (0.14, 0.14, 0.14, 0.14) 4
[pixel shader] uniform float4 i; @@ -79,7 +79,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.0 0.0 uniform 4 float4 0.6 0.4 -0.3 1.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.188, -0.308, 0.0, 0.0) 4
[pixel shader] @@ -97,5 +97,5 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.2 0.0 uniform 4 float4 0.6 0.4 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.188, -0.308, 0.0, 0.0) 4 diff --git a/tests/hlsl/return-implicit-conversion.shader_test b/tests/hlsl/return-implicit-conversion.shader_test index 7070b28ae..d0e1436b4 100644 --- a/tests/hlsl/return-implicit-conversion.shader_test +++ b/tests/hlsl/return-implicit-conversion.shader_test @@ -6,7 +6,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.1) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.1)
[pixel shader] float4 main() : sv_target @@ -16,7 +16,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.1) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.1)
[pixel shader] float4 main() : sv_target @@ -26,7 +26,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.1) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.1)
[pixel shader] float4x1 main() : sv_target @@ -36,7 +36,7 @@ float4x1 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.1) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.1)
[pixel shader] float3 func() @@ -51,7 +51,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader] float3 func() @@ -66,7 +66,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader] float1x3 func() @@ -81,7 +81,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader] float3x1 func() @@ -96,7 +96,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader fail] float3x1 func() @@ -133,7 +133,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader] float3 func() @@ -148,7 +148,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader] float3 func() @@ -163,7 +163,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader fail(sm<6) todo] float3x1 func() @@ -189,7 +189,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader fail] float3x1 func() @@ -215,7 +215,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader fail] float1x3 func() @@ -241,4 +241,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.2, 0.0) +todo(sm<4) probe all rgba (0.4, 0.3, 0.2, 0.0) diff --git a/tests/hlsl/return.shader_test b/tests/hlsl/return.shader_test index fbea07926..8f8e3ee85 100644 --- a/tests/hlsl/return.shader_test +++ b/tests/hlsl/return.shader_test @@ -10,7 +10,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader]
@@ -23,10 +23,9 @@ void main(out float4 ret : sv_target)
[test] draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) - -[pixel shader] +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4)
+[pixel shader todo(sm<4)] uniform float f;
float4 main() : sv_target @@ -38,14 +37,13 @@ float4 main() : sv_target
[test] uniform 0 float 0.2 -draw quad +todo(sm<4) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) uniform 0 float 0.8 -draw quad +todo(sm<4) draw quad probe all rgba (0.5, 0.6, 0.7, 0.8)
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -65,14 +63,13 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.2 -draw quad +todo(sm<4) draw quad probe all rgba (0.3, 0.4, 0.5, 0.6) uniform 0 float 0.8 -draw quad +todo(sm<4) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -92,17 +89,16 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) 1 uniform 0 float 0.5 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.2, 0.3, 0.4, 0.5) 1 uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.5, 0.6, 0.7, 0.8) 1
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -119,17 +115,16 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) 1 uniform 0 float 0.5 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.5, 0.6, 0.7, 0.8) 1 uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.4, 0.5, 0.6, 0.7) 1
-[pixel shader] - +[pixel shader todo(sm<4)] void main(out float4 ret : sv_target) { ret = float4(0.1, 0.2, 0.3, 0.4); @@ -143,11 +138,10 @@ void main(out float4 ret : sv_target) }
[test] -draw quad +todo(sm<4) draw quad probe all rgba (0.2, 0.4, 0.6, 0.8)
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -166,27 +160,26 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.1, 0.1, 0.1, 0.1) 1
uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.2, 0.2, 0.2, 0.2) 1
uniform 0 float 0.3 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 0 float 0.7 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.8, 0.8, 0.8, 0.8) 1
uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.9, 0.9, 0.9, 0.9) 1
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -211,13 +204,13 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.2 -draw quad +todo(sm<4) draw quad probe all rgba (0.2, 0.2, 0.2, 0.2) uniform 0 float 0.8 -draw quad +todo(sm<4) draw quad probe all rgba (0.5, 0.5, 0.5, 0.5)
-[pixel shader] +[pixel shader todo(sm<4)]
uniform float4 f[3];
@@ -243,21 +236,21 @@ void main(out float4 ret : sv_target) uniform 0 float4 0.3 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.1 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.1, 0.1, 0.1, 0.1) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.1, 0.1, 0.1, 0.1) 1
uniform 4 float4 0.35 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.2, 0.2, 0.2, 0.2) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.2, 0.2, 0.2, 0.2) 1
uniform 8 float4 0.5 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.4, 0.4, 0.4, 0.4) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 0 float4 1.0 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.4, 0.4, 0.4, 0.4) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 4 float4 2.0 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.9, 0.9, 0.9, 0.9) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.9, 0.9, 0.9, 0.9) 1 diff --git a/tests/hlsl/round.shader_test b/tests/hlsl/round.shader_test index b9234b010..bc41b56bd 100644 --- a/tests/hlsl/round.shader_test +++ b/tests/hlsl/round.shader_test @@ -9,11 +9,11 @@ float4 main() : sv_target [test] uniform 0 float4 -0.4 -6.6 7.6 3.4 draw quad -probe all rgba (0.0, -7.0, 8.0, 3.0) 4 +todo(sm<4) probe all rgba (0.0, -7.0, 8.0, 3.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -26,12 +26,12 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.4 -6.6 7.6 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (-7.0, 8.0, 0.0, 3.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -42,5 +42,5 @@ float4 main() : sv_target
[test] uniform 0 float4 -1 0 2 10 -draw quad +todo(sm<4) draw quad probe all rgba (-1.0, 0.0, 2.0, 10.0) 4 diff --git a/tests/hlsl/sample-bias.shader_test b/tests/hlsl/sample-bias.shader_test index 5b7067b52..4750947ef 100644 --- a/tests/hlsl/sample-bias.shader_test +++ b/tests/hlsl/sample-bias.shader_test @@ -18,7 +18,7 @@ void main(float4 pos : position, out float2 tex : texcoord, out float4 out_pos : out_pos = pos; }
-[pixel shader] +[pixel shader todo(sm<4)] sampler s; Texture2D t; uniform float bias; @@ -32,13 +32,13 @@ float4 main(float2 coord : texcoord) : sv_target
[test] uniform 0 float4 6.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (10.0, 0.0, 10.0, 0.0)
uniform 0 float4 7.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (4.0, 0.0, 10.0, 0.0)
uniform 0 float4 8.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.0, 0.0, 10.0, 0.0) diff --git a/tests/hlsl/sample-level.shader_test b/tests/hlsl/sample-level.shader_test index 8b2890ff7..4618fc577 100644 --- a/tests/hlsl/sample-level.shader_test +++ b/tests/hlsl/sample-level.shader_test @@ -14,7 +14,7 @@ levels 2
0.0 0.0 1.0 0.0
-[pixel shader] +[pixel shader todo(sm<4)] sampler s; Texture2D t; uniform float level; @@ -26,13 +26,13 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1.0, 0.0, 1.0, 0.0) uniform 0 float4 0.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.5, 0.0, 1.0, 0.0) uniform 0 float4 1.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.0, 0.0, 1.0, 0.0)
[require] @@ -54,7 +54,7 @@ draw quad probe all rgba (1.0, 0.0, 1.0, 0.0) uniform 0 float4 0.5 0.0 0.0 0.0 draw quad -probe all rgba (0.5, 0.0, 1.0, 0.0) +todo(sm<4) probe all rgba (0.5, 0.0, 1.0, 0.0) uniform 0 float4 1.0 0.0 0.0 0.0 draw quad -probe all rgba (0.0, 0.0, 1.0, 0.0) +todo(sm<4) probe all rgba (0.0, 0.0, 1.0, 0.0) diff --git a/tests/hlsl/sampler.shader_test b/tests/hlsl/sampler.shader_test index caff7b2fa..9a5fa6df4 100644 --- a/tests/hlsl/sampler.shader_test +++ b/tests/hlsl/sampler.shader_test @@ -7,7 +7,7 @@ size (2, 2) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0
-[pixel shader] +[pixel shader todo(sm<4)] sampler s; Texture2D t;
@@ -17,10 +17,10 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.25, 0, 0.25, 0)
-[pixel shader] +[pixel shader todo(sm<4)] SamplerState s; Texture2D t;
@@ -30,7 +30,7 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.25, 0, 0.25, 0)
[pixel shader fail] diff --git a/tests/hlsl/saturate.shader_test b/tests/hlsl/saturate.shader_test index 2ed83cf66..6d6f7412b 100644 --- a/tests/hlsl/saturate.shader_test +++ b/tests/hlsl/saturate.shader_test @@ -9,9 +9,9 @@ float4 main() : sv_target [test] uniform 0 float4 0.7 -0.1 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (0.7, 0.0, 1.0, 0.0) +todo(sm<4) probe all rgba (0.7, 0.0, 1.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -22,5 +22,5 @@ float4 main() : sv_target
[test] uniform 0 float4 -2 0 2 -1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.0, 0.0, 1.0, 0.0) diff --git a/tests/hlsl/shape.shader_test b/tests/hlsl/shape.shader_test index b96f0fd22..4f0a6a12d 100644 --- a/tests/hlsl/shape.shader_test +++ b/tests/hlsl/shape.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (3.0, 0.0, 0.0, 0.0) +todo(sm<4) probe all rgba (3.0, 0.0, 0.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -20,7 +20,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 0.0, 0.0) +todo(sm<4) probe all rgba (2.0, 3.0, 0.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -32,7 +32,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 4.0, 5.0) +todo(sm<4) probe all rgba (2.0, 3.0, 4.0, 5.0)
[pixel shader] float4 main() : sv_target @@ -44,7 +44,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 0.0, 0.0) +todo(sm<4) probe all rgba (2.0, 4.0, 0.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -56,7 +56,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 2.0, 0.0, 0.0) +todo(sm<4) probe all rgba (2.0, 2.0, 0.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -68,7 +68,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 4.0, 5.0) +todo(sm<4) probe all rgba (2.0, 3.0, 4.0, 5.0)
[pixel shader] float4 main() : sv_target @@ -80,7 +80,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 4.0, 5.0) +todo(sm<4) probe all rgba (2.0, 3.0, 4.0, 5.0)
[pixel shader] float4 main() : sv_target @@ -94,7 +94,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 7.0, 9.0) +todo(sm<4) probe all rgba (2.0, 4.0, 7.0, 9.0)
[pixel shader] float4 main() : sv_target @@ -108,7 +108,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 7.0, 9.0) +todo(sm<4) probe all rgba (2.0, 4.0, 7.0, 9.0)
[pixel shader] float4 main() : sv_target @@ -123,7 +123,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -138,7 +138,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -153,7 +153,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 7.0, 12.0, 17.0) +todo(sm<4) probe all rgba (2.0, 7.0, 12.0, 17.0)
[pixel shader] float4 main() : sv_target @@ -168,7 +168,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 7.0, 12.0, 17.0) +todo(sm<4) probe all rgba (2.0, 7.0, 12.0, 17.0)
[pixel shader] float4 main() : sv_target @@ -184,7 +184,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 0.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -200,7 +200,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (9.0, 11.0, 13.0, 0.0) +todo(sm<4) probe all rgba (9.0, 11.0, 13.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -212,7 +212,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -224,7 +224,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -236,7 +236,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -248,7 +248,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -261,7 +261,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -274,7 +274,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 6.0, 8.0) +todo(sm<4) probe all rgba (2.0, 4.0, 6.0, 8.0)
[pixel shader] float4 main() : sv_target @@ -286,7 +286,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 4.0, 5.0) +todo(sm<4) probe all rgba (2.0, 3.0, 4.0, 5.0)
[pixel shader] float4 main() : sv_target @@ -298,7 +298,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 4.0, 5.0) +todo(sm<4) probe all rgba (2.0, 3.0, 4.0, 5.0)
[pixel shader] float4 main() : sv_target @@ -310,7 +310,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 0.0, 0.0) +todo(sm<4) probe all rgba (2.0, 4.0, 0.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -322,7 +322,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 4.0, 0.0, 0.0) +todo(sm<4) probe all rgba (2.0, 4.0, 0.0, 0.0)
[pixel shader] float4 main() : sv_target @@ -337,7 +337,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 3.0, 4.0, 5.0) +todo(sm<4) probe all rgba (2.0, 3.0, 4.0, 5.0)
[pixel shader] float4 main() : sv_target @@ -352,4 +352,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (6.0, 7.0, 8.0, 9.0) +todo(sm<4) probe all rgba (6.0, 7.0, 8.0, 9.0) diff --git a/tests/hlsl/side-effects.shader_test b/tests/hlsl/side-effects.shader_test index f41e98510..e93f88ba2 100644 --- a/tests/hlsl/side-effects.shader_test +++ b/tests/hlsl/side-effects.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 1.0, 1.0, 1.0) +todo(sm<4) probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] @@ -24,7 +24,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (11.0, 11.0, 11.0, 11.0) +todo(sm<4) probe all rgba (11.0, 11.0, 11.0, 11.0)
% dxcompiler performs the first call to func() before the array index call. @@ -49,4 +49,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.2, 2.2, 2.2, 2.2) +todo(sm<4) probe all rgba (2.2, 2.2, 2.2, 2.2) diff --git a/tests/hlsl/sign.shader_test b/tests/hlsl/sign.shader_test index 5d8b43168..6ec5a571d 100644 --- a/tests/hlsl/sign.shader_test +++ b/tests/hlsl/sign.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float f;
float4 main() : sv_target @@ -8,16 +8,16 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 -1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (-1.0, -1.0, -1.0, -1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f;
float4 main() : sv_target @@ -27,10 +27,10 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2x2 f;
float4 main() : sv_target @@ -41,14 +41,14 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 0.0 0.0 uniform 4 float4 3.0 4.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[require] % SM1-3 doesn't support integral types shader model >= 4.0
-[pixel shader] +[pixel shader todo(sm<4)] uniform int f;
float4 main() : sv_target @@ -67,7 +67,7 @@ uniform 0 int4 0 0 0 0 draw quad probe all rgba (0, 0, 0, 0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform int4 f;
float4 main() : sv_target @@ -80,7 +80,7 @@ uniform 0 int4 1 2 3 4 draw quad probe all rgba (1, 1, 1, 1)
-[pixel shader] +[pixel shader todo(sm<4)] uniform int2x2 f;
float4 main() : sv_target diff --git a/tests/hlsl/single-numeric-initializer.shader_test b/tests/hlsl/single-numeric-initializer.shader_test index 3b348d6fc..a2242af53 100644 --- a/tests/hlsl/single-numeric-initializer.shader_test +++ b/tests/hlsl/single-numeric-initializer.shader_test @@ -7,7 +7,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (7.0, 7.0, 7.0, 7.0) +todo(sm<4) probe all rgba (7.0, 7.0, 7.0, 7.0)
[pixel shader] @@ -23,4 +23,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (7.0, 7.0, 7.0, 8.0) +todo(sm<4) probe all rgba (7.0, 7.0, 7.0, 8.0) diff --git a/tests/hlsl/smoothstep.shader_test b/tests/hlsl/smoothstep.shader_test index 971f6d5d8..c489a626a 100644 --- a/tests/hlsl/smoothstep.shader_test +++ b/tests/hlsl/smoothstep.shader_test @@ -1,5 +1,3 @@ - - [pixel shader] float4 main() : sv_target { @@ -12,7 +10,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0, 0.784, 1.0, 0.559872) 1 +todo(sm<4) probe all rgba (0, 0.784, 1.0, 0.559872) 1
[pixel shader] @@ -27,7 +25,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0, 0.104, 0.896, 1.000000) 6 +todo(sm<4) probe all rgba (0, 0.104, 0.896, 1.000000) 6
[pixel shader] @@ -42,7 +40,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 0.352, 0, 0) 1 +todo(sm<4) probe all rgba (1.0, 0.352, 0, 0) 1
[pixel shader] @@ -58,7 +56,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.352, 0.352, 0, 0) 1 +todo(sm<4) probe all rgba (0.352, 0.352, 0, 0) 1
[pixel shader] @@ -74,7 +72,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.352, 0.352, 0, 0) 1 +todo(sm<4) probe all rgba (0.352, 0.352, 0, 0) 1
[pixel shader] @@ -90,7 +88,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 1.0, 0, 0) 1 +todo(sm<4) probe all rgba (1.0, 1.0, 0, 0) 1
[pixel shader] @@ -106,10 +104,10 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.028, 0.104, 0.216, 0.352) 6 +todo(sm<4) probe all rgba (0.028, 0.104, 0.216, 0.352) 6
-[pixel shader] +[pixel shader todo(sm<4)] // 4 division by zero warnings. // Only test compilation because result is implementation-dependent. float4 main() : sv_target @@ -135,7 +133,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.5, 0.5, 0.5, 0.0) +todo(sm<4) probe all rgba (0.5, 0.5, 0.5, 0.0)
[pixel shader] @@ -151,7 +149,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.5, 0.5, 0.5, 0.5) +todo(sm<4) probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader fail] diff --git a/tests/hlsl/sqrt.shader_test b/tests/hlsl/sqrt.shader_test index 78d89d38f..af4e40299 100644 --- a/tests/hlsl/sqrt.shader_test +++ b/tests/hlsl/sqrt.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 9.0 32.3 46.5 draw quad -probe all rgba (1.0, 3.0, 5.683309, 6.819091) 1 +todo(sm<4) probe all rgba (1.0, 3.0, 5.683309, 6.819091) 1
[pixel shader] uniform float4 f; @@ -22,4 +22,4 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 9.0 4.0 16.0 draw quad -probe all rgba (1.0, 0.33333333, 0.5, 0.25) 1 +todo(sm<4) probe all rgba (1.0, 0.33333333, 0.5, 0.25) 1 diff --git a/tests/hlsl/state-block-syntax.shader_test b/tests/hlsl/state-block-syntax.shader_test index 7df3ae7c9..eda271ebc 100644 --- a/tests/hlsl/state-block-syntax.shader_test +++ b/tests/hlsl/state-block-syntax.shader_test @@ -170,4 +170,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0, 1, 0, 1) +todo(sm<4) probe all rgba (0, 1, 0, 1) diff --git a/tests/hlsl/static-initializer.shader_test b/tests/hlsl/static-initializer.shader_test index 217444308..e6c814bc0 100644 --- a/tests/hlsl/static-initializer.shader_test +++ b/tests/hlsl/static-initializer.shader_test @@ -13,10 +13,11 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.8, 0.0, 0.0, 0.0) +todo(sm<4) probe all rgba (0.8, 0.0, 0.0, 0.0)
[pixel shader fail(sm<6)] +// On SM1 this gives hr 0x88760b59. static uint i;
float4 main() : sv_target @@ -52,7 +53,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
[sampler 0] @@ -135,7 +136,7 @@ float4 main(Texture2D tex2) : sv_target }
-[pixel shader] +[pixel shader todo(sm<4)] Texture2D real_tex; static Texture2D tex = real_tex; sampler sam; @@ -146,11 +147,11 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4)
-[pixel shader] +[pixel shader todo(sm<4)] Texture2D real_tex; static Texture2D tex; sampler sam; @@ -162,7 +163,7 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4)
diff --git a/tests/hlsl/step.shader_test b/tests/hlsl/step.shader_test index e201e15f9..dae57dce8 100644 --- a/tests/hlsl/step.shader_test +++ b/tests/hlsl/step.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f, p;
float4 main() : sv_target @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 5.0 -2.6 3.0 2.0 uniform 4 float4 1.0 -4.3 3.0 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 1.0, 1.0)
@@ -24,7 +24,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 1.0, 1.0, 0.0) +todo(sm<4) probe all rgba (1.0, 1.0, 1.0, 0.0)
[pixel shader fail] @@ -52,4 +52,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.0, 1.0, 1.0, 0.0) +todo(sm<4) probe all rgba (0.0, 1.0, 1.0, 0.0) diff --git a/tests/hlsl/storage-qualifiers.shader_test b/tests/hlsl/storage-qualifiers.shader_test index 86cea4713..3b9d9c0e1 100644 --- a/tests/hlsl/storage-qualifiers.shader_test +++ b/tests/hlsl/storage-qualifiers.shader_test @@ -18,7 +18,7 @@ void main(in uniform float4 a, uniform float4 b, out float4 o : sv_target) uniform 0 float4 0.1 0.0 0.0 0.0 uniform 4 float4 0.2 0.0 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader] uniform float4 a; @@ -43,4 +43,4 @@ void main(out float4 o : sv_target) uniform 0 float4 0.1 0.0 0.0 0.0 uniform 4 float4 0.2 0.0 0.0 0.0 draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4) diff --git a/tests/hlsl/struct-assignment.shader_test b/tests/hlsl/struct-assignment.shader_test index ea55b9ad2..fb6803542 100644 --- a/tests/hlsl/struct-assignment.shader_test +++ b/tests/hlsl/struct-assignment.shader_test @@ -20,4 +20,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.6, 0.3, 0.7, 0.9) 1 +todo(sm<4) probe all rgba (0.6, 0.3, 0.7, 0.9) 1 diff --git a/tests/hlsl/struct-semantics.shader_test b/tests/hlsl/struct-semantics.shader_test index c88006eb8..12faa928b 100644 --- a/tests/hlsl/struct-semantics.shader_test +++ b/tests/hlsl/struct-semantics.shader_test @@ -60,4 +60,4 @@ struct output main(struct input i)
[test] draw triangle strip 4 -probe all rgba (0.0, 1.0, 0.0, 1.0) +todo(sm<4) probe all rgba (0.0, 1.0, 0.0, 1.0) diff --git a/tests/hlsl/swizzle-matrix.shader_test b/tests/hlsl/swizzle-matrix.shader_test index 740d4d904..c7c53a7e0 100644 --- a/tests/hlsl/swizzle-matrix.shader_test +++ b/tests/hlsl/swizzle-matrix.shader_test @@ -10,7 +10,7 @@ float4 main() : sv_target uniform 0 float4 11 21 31 -1 uniform 4 float4 12 22 32 -1 draw quad -probe all rgba (21.0, 31.0, 11.0, 12.0) +todo(sm<4) probe all rgba (21.0, 31.0, 11.0, 12.0)
[pixel shader] @@ -25,7 +25,7 @@ float4 main() : sv_target uniform 0 float4 11 21 31 -1 uniform 4 float4 12 22 32 -1 draw quad -probe all rgba (11.0, 31.0, 12.0, 32.0) +todo(sm<4) probe all rgba (11.0, 31.0, 12.0, 32.0)
[pixel shader] @@ -41,7 +41,7 @@ uniform 0 float4 11 12 -1 -1 uniform 4 float4 21 22 -1 -1 uniform 8 float4 31 32 -1 -1 draw quad -probe all rgba (11.0, 31.0, 12.0, 32.0) +todo(sm<4) probe all rgba (11.0, 31.0, 12.0, 32.0)
[pixel shader] @@ -55,7 +55,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 6.0, 1.0, 6.0) +todo(sm<4) probe all rgba (1.0, 6.0, 1.0, 6.0)
% zero-based and one-based subscripts cannot be used in the same swizzle. @@ -152,7 +152,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (40.0, 40.0, 40.0, 40.0) +todo(sm<4) probe all rgba (40.0, 40.0, 40.0, 40.0)
[pixel shader todo] diff --git a/tests/hlsl/swizzles.shader_test b/tests/hlsl/swizzles.shader_test index c3d3343f3..b3e59fe5b 100644 --- a/tests/hlsl/swizzles.shader_test +++ b/tests/hlsl/swizzles.shader_test @@ -12,7 +12,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.0303 0.08 0.07 0.0202 draw quad -probe all rgba (0.0101, 0.0303, 0.0202, 0.0404) +todo(sm<4) probe all rgba (0.0101, 0.0303, 0.0202, 0.0404)
[pixel shader] @@ -25,7 +25,7 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (0.1, 0.6, 0.3, 0.5) +todo(sm<4) probe all rgba (0.1, 0.6, 0.3, 0.5)
[pixel shader] @@ -38,7 +38,7 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (0.4, 0.3, 0.1, 0.2) +todo(sm<4) probe all rgba (0.4, 0.3, 0.1, 0.2)
[pixel shader] @@ -54,7 +54,7 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (0.3, 0.2, 0.4, 0.1) +todo(sm<4) probe all rgba (0.3, 0.2, 0.4, 0.1)
[pixel shader] @@ -69,7 +69,7 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (0.1, 0.2, 0.4, 0.3) +todo(sm<4) probe all rgba (0.1, 0.2, 0.4, 0.3)
[pixel shader] @@ -81,7 +81,7 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (0.1, 0.4, 0.4, 0.1) +todo(sm<4) probe all rgba (0.1, 0.4, 0.4, 0.1)
[pixel shader] @@ -95,7 +95,7 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (0.3, 0.1, 0.4, 0.2) +todo(sm<4) probe all rgba (0.3, 0.1, 0.4, 0.2)
[pixel shader] @@ -108,7 +108,7 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo(sm<4) probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader] @@ -121,7 +121,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (20.0, 20.0, 20.0, 20.0) +todo(sm<4) probe all rgba (20.0, 20.0, 20.0, 20.0)
[pixel shader] @@ -134,7 +134,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 3.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 3.0)
[pixel shader] @@ -150,7 +150,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] @@ -167,4 +167,4 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 draw quad -probe all rgba (1.0, 4.0, 2.0, 3.0) +todo(sm<4) probe all rgba (1.0, 4.0, 2.0, 3.0) diff --git a/tests/hlsl/ternary.shader_test b/tests/hlsl/ternary.shader_test index 7b4c71f7b..b24c62067 100644 --- a/tests/hlsl/ternary.shader_test +++ b/tests/hlsl/ternary.shader_test @@ -8,10 +8,10 @@ float4 main() : sv_target
[test] uniform 0 float4 2.0 3.0 4.0 5.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (2.0, 3.0, 4.0, 5.0) uniform 0 float4 0.0 10.0 11.0 12.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (-1.0, 9.0, 10.0, 11.0)
[pixel shader] @@ -29,7 +29,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.1 3.0 4.0 5.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.1, 2.0, 0.0, 0.0)
[pixel shader] @@ -47,7 +47,7 @@ shader model < 6.0
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.5, 0.6, 0.7, 0.0)
[require] @@ -74,5 +74,5 @@ float4 main() : sv_target uniform 0 float4 0.0 1.0 0.0 -3.0 uniform 4 float4 1.0 2.0 3.0 4.0 uniform 8 float4 5.0 6.0 7.0 8.0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 2.0, 7.0, 4.0) diff --git a/tests/hlsl/transpose.shader_test b/tests/hlsl/transpose.shader_test index 83852fa1a..5714470ae 100644 --- a/tests/hlsl/transpose.shader_test +++ b/tests/hlsl/transpose.shader_test @@ -6,7 +6,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 5.0, 5.0, 5.0) +todo(sm<4) probe all rgba (5.0, 5.0, 5.0, 5.0)
[pixel shader] @@ -19,7 +19,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 5.0, 5.0, 5.0) +todo(sm<4) probe all rgba (5.0, 5.0, 5.0, 5.0)
[pixel shader fail] @@ -40,7 +40,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 4.0) +todo(sm<4) probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] @@ -56,7 +56,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 5.0, 8.0, 11.0) +todo(sm<4) probe all rgba (2.0, 5.0, 8.0, 11.0)
[pixel shader] @@ -72,4 +72,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.0, 5.0, 8.0, 11.0) +todo(sm<4) probe all rgba (2.0, 5.0, 8.0, 11.0) diff --git a/tests/hlsl/trigonometry.shader_test b/tests/hlsl/trigonometry.shader_test index 859881199..5d230d7c3 100644 --- a/tests/hlsl/trigonometry.shader_test +++ b/tests/hlsl/trigonometry.shader_test @@ -5,7 +5,7 @@ void main(float4 pos : position, out float tex : texcoord, out float4 out_pos : out_pos = pos; }
-[pixel shader] +[pixel shader todo(sm<4)] float4 main(float tex : texcoord) : sv_target { tex = floor(tex + 0.25); @@ -13,7 +13,7 @@ float4 main(float tex : texcoord) : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe ( 0, 0) rgba ( 0.00000000, 1.00000000, 0.00000000, 0.0) probe ( 1, 0) rgba ( 0.84147098, 0.54030231, 1.55740772, 0.0) 1024 probe ( 2, 0) rgba ( 0.90929743, -0.41614684, -2.18503986, 0.0) 1024 @@ -32,7 +32,7 @@ probe (14, 0) rgba ( 0.99060736, 0.13673722, 7.24460662, 0.0) 1024 probe (15, 0) rgba ( 0.65028784, -0.75968791, -0.85599340, 0.0) 1024
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a;
float4 main() : sv_target @@ -42,11 +42,11 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.52359877 2.61799387 3.14159265 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.0, 500.0, 500.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a;
float4 main() : sv_target @@ -56,11 +56,11 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.78539816 1.57079632 2.35619449 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1000.0, 707.0, -0.0, -707.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a;
float4 main() : sv_target @@ -72,5 +72,5 @@ float4 main() : sv_target % tan(pi/2) is an asymtote and therefore undefined % so check 0, pi/4, 3pi/4, pi uniform 0 float4 0.0 0.78539816 2.35619449 3.14159265 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0, 1000, -1000.0, 0) diff --git a/tests/hlsl/trunc.shader_test b/tests/hlsl/trunc.shader_test index 76ffdbbad..f1d23bf82 100644 --- a/tests/hlsl/trunc.shader_test +++ b/tests/hlsl/trunc.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -8,13 +8,13 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 6.0, 7.0, 3.0) uniform 0 float4 -1.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (-1.0, 6.0, 7.0, 3.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -27,7 +27,7 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (6.0, 7.0, 0.0, 3.0)
[require] diff --git a/tests/hlsl/type-names.shader_test b/tests/hlsl/type-names.shader_test index 6e88fd285..a3b03b855 100644 --- a/tests/hlsl/type-names.shader_test +++ b/tests/hlsl/type-names.shader_test @@ -38,7 +38,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (2.0, 3.0, 4.0, 5.0) +todo(sm<4) probe all rgba (2.0, 3.0, 4.0, 5.0)
% The "dword" alias is pre-defined as lowercase [pixel shader fail] diff --git a/tests/hlsl/uniform-semantics.shader_test b/tests/hlsl/uniform-semantics.shader_test index 1125117fe..6ff4d3dc3 100644 --- a/tests/hlsl/uniform-semantics.shader_test +++ b/tests/hlsl/uniform-semantics.shader_test @@ -11,7 +11,7 @@ float4 main() : sv_target [test] uniform 0 float 3.5 draw quad -probe all rgba (3.5, 3.5, 3.5, 3.5) +todo(sm<4) probe all rgba (3.5, 3.5, 3.5, 3.5)
[pixel shader] @@ -25,4 +25,4 @@ float4 main() : sv_target [test] uniform 0 float4 4.0 5.0 6.0 7.0 draw quad -probe all rgba (4.0, 5.0, 4.0, 5.0) +todo(sm<4) probe all rgba (4.0, 5.0, 4.0, 5.0) diff --git a/tests/hlsl/vector-indexing-uniform.shader_test b/tests/hlsl/vector-indexing-uniform.shader_test index e5ffbdd02..cd77462ec 100644 --- a/tests/hlsl/vector-indexing-uniform.shader_test +++ b/tests/hlsl/vector-indexing-uniform.shader_test @@ -1,6 +1,6 @@ % Use a uniform to prevent the compiler from optimizing.
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i; float4 main() : SV_TARGET { @@ -12,5 +12,5 @@ float4 main() : SV_TARGET
[test] uniform 0 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (0.5, 0.3, 0.8, 0.2) diff --git a/tests/hlsl/vector-indexing.shader_test b/tests/hlsl/vector-indexing.shader_test index 9f6f9a2ca..f5506d748 100644 --- a/tests/hlsl/vector-indexing.shader_test +++ b/tests/hlsl/vector-indexing.shader_test @@ -11,7 +11,7 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (0.02, 0.245, 0.351, 1.0) +todo(sm<4) probe all rgba (0.02, 0.245, 0.351, 1.0)
[pixel shader] uniform float4 m; @@ -24,7 +24,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 1.0 2.0 3.0 4.0 draw quad -probe all rgba (1.0, 2.0, 2.0, 3.0) +todo(sm<4) probe all rgba (1.0, 2.0, 2.0, 3.0)
[pixel shader fail(sm<6)] @@ -48,4 +48,4 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (2.0, 2.0, 2.0, 2.0) +todo(sm<4) probe all rgba (2.0, 2.0, 2.0, 2.0) diff --git a/tests/hlsl/writemask-assignop-0.shader_test b/tests/hlsl/writemask-assignop-0.shader_test index 374a38bb4..efc860402 100644 --- a/tests/hlsl/writemask-assignop-0.shader_test +++ b/tests/hlsl/writemask-assignop-0.shader_test @@ -12,4 +12,4 @@ float4 main() : SV_target [test] uniform 0 float4 0.0303 0.08 0.07 0.0202 draw quad -probe all rgba (-0.4697, -0.02, 0.57, 0.3202) 2 +todo(sm<4) probe all rgba (-0.4697, -0.02, 0.57, 0.3202) 2 diff --git a/tests/hlsl/writemask-assignop-1.shader_test b/tests/hlsl/writemask-assignop-1.shader_test index 61993257c..11a08b0f1 100644 --- a/tests/hlsl/writemask-assignop-1.shader_test +++ b/tests/hlsl/writemask-assignop-1.shader_test @@ -13,4 +13,4 @@ float4 main() : SV_target [test] uniform 0 float4 0.0303 0.08 0.07 0.0202 draw quad -probe all rgba (0.5697, -0.08, -0.27, -0.4202) +todo(sm<4) probe all rgba (0.5697, -0.08, -0.27, -0.4202) diff --git a/tests/hlsl/writemask-assignop-2.shader_test b/tests/hlsl/writemask-assignop-2.shader_test index 4e905e677..74b332c45 100644 --- a/tests/hlsl/writemask-assignop-2.shader_test +++ b/tests/hlsl/writemask-assignop-2.shader_test @@ -10,4 +10,4 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (2.1, 2.2, 0.8, 1.7) +todo(sm<4) probe all rgba (2.1, 2.2, 0.8, 1.7) diff --git a/tests/hlsl/writemask-assignop-3.shader_test b/tests/hlsl/writemask-assignop-3.shader_test index 90957cb00..faeb3dde5 100644 --- a/tests/hlsl/writemask-assignop-3.shader_test +++ b/tests/hlsl/writemask-assignop-3.shader_test @@ -8,4 +8,4 @@ float4 main() : SV_target
[test] draw quad -probe all rgba (1.9, 1.8, 1.7, 1.6) +todo(sm<4) probe all rgba (1.9, 1.8, 1.7, 1.6) diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 616de53a3..5897a7aed 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -968,8 +968,13 @@ unsigned int get_vb_stride(const struct shader_runner *runner, unsigned int slot return stride; }
-static HRESULT map_unidentified_hrs(HRESULT hr) +static HRESULT map_special_hrs(HRESULT hr) { + if (hr == 0x88760b59) + { + trace("Mapping hr %#x (D3DXERR_INVALIDDATA) as %#x.\n", hr, E_FAIL); + return E_FAIL; + } if (hr == 0x80010064) { trace("Mapping unidentified hr %#x as %#x.\n", hr, E_FAIL); @@ -1116,8 +1121,8 @@ static void compile_shader(struct shader_runner *runner, IDxcCompiler3 *dxc_comp
static const char *const shader_models[] = { - [SHADER_MODEL_2_0] = "4_0", - [SHADER_MODEL_3_0] = "4_0", + [SHADER_MODEL_2_0] = "2_0", + [SHADER_MODEL_3_0] = "3_0", [SHADER_MODEL_4_0] = "4_0", [SHADER_MODEL_4_1] = "4_1", [SHADER_MODEL_5_0] = "5_0", @@ -1146,7 +1151,7 @@ static void compile_shader(struct shader_runner *runner, IDxcCompiler3 *dxc_comp sprintf(profile, "%s_%s", shader_type_string(type), shader_models[runner->minimum_shader_model]); hr = D3DCompile(source, len, NULL, NULL, NULL, "main", profile, runner->compile_options, 0, &blob, &errors); } - hr = map_unidentified_hrs(hr); + hr = map_special_hrs(hr); ok(hr == expect, "Got unexpected hr %#x.\n", hr); if (hr == S_OK) { diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index d435a5d3d..e1271e756 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -412,8 +412,8 @@ static bool compile_shader(struct vulkan_shader_runner *runner, const char *sour
static const char *const shader_models[] = { - [SHADER_MODEL_2_0] = "4_0", - [SHADER_MODEL_3_0] = "4_0", + [SHADER_MODEL_2_0] = "2_0", + [SHADER_MODEL_3_0] = "3_0", [SHADER_MODEL_4_0] = "4_0", [SHADER_MODEL_4_1] = "4_1", [SHADER_MODEL_5_0] = "5_0", @@ -424,7 +424,11 @@ static bool compile_shader(struct vulkan_shader_runner *runner, const char *sour info.source.code = source; info.source.size = strlen(source); info.source_type = VKD3D_SHADER_SOURCE_HLSL; - info.target_type = VKD3D_SHADER_TARGET_DXBC_TPF; + if (runner->r.minimum_shader_model < SHADER_MODEL_4_0) + info.target_type = VKD3D_SHADER_TARGET_D3D_BYTECODE; + else + info.target_type = VKD3D_SHADER_TARGET_DXBC_TPF; + info.log_level = VKD3D_SHADER_LOG_WARNING;
info.options = options; @@ -468,7 +472,10 @@ static bool compile_shader(struct vulkan_shader_runner *runner, const char *sour
info.next = &spirv_info; info.source = *dxbc; - info.source_type = VKD3D_SHADER_SOURCE_DXBC_TPF; + if (runner->r.minimum_shader_model < SHADER_MODEL_4_0) + info.source_type = VKD3D_SHADER_SOURCE_D3D_BYTECODE; + else + info.source_type = VKD3D_SHADER_SOURCE_DXBC_TPF; info.target_type = VKD3D_SHADER_TARGET_SPIRV_BINARY;
spirv_info.next = &interface_info; @@ -1420,8 +1427,11 @@ void run_shader_tests_vulkan(void) if (!init_vulkan_runner(&runner)) return;
- trace("Compiling SM2-SM5 shaders with vkd3d-shader and executing with Vulkan\n"); - run_shader_tests(&runner.r, &vulkan_runner_ops, NULL, SHADER_MODEL_2_0, SHADER_MODEL_5_1); + trace("Compiling SM2-SM3 shaders with vkd3d-shader and executing with Vulkan\n"); + run_shader_tests(&runner.r, &vulkan_runner_ops, NULL, SHADER_MODEL_2_0, SHADER_MODEL_3_0); + + trace("Compiling SM4-SM5 shaders with vkd3d-shader and executing with Vulkan\n"); + run_shader_tests(&runner.r, &vulkan_runner_ops, NULL, SHADER_MODEL_4_0, SHADER_MODEL_5_1);
cleanup_vulkan_runner(&runner); }
I'm not too worried about it at this point, but note that in principle we don't need to compute the minimum/maximum shader model for the condition in read_qualifier_args_conjunction(). We could just pass it "sm", and then evaluate each part of the condition individually.
I see, I don't know why I thought it was necessary to return the conditions in read_qualifier_args_conjunction(). Well, now we just pass the shader_model, and if we add additional input formats, we could potentially include them as new values for the enum shader_model.
Those traces aren't quite right. We could do something similar to what we do with HLSL_COMPILER to switch between "vkd3d" and "d3d12.dll" here, or we could just use "#ifdef VKD3D_CROSSTEST" to print different traces like the original code does.
Yep, if I am not mistaken I forgot that for _WIN32 and on Linux the runner is "vkd3d" and not "d3d12.dll", and to only print the "Int64ShaderOps" trace when we have a dxc_compiler.
Also, since we will make each runner handle the compilation, maybe we make these macros a `static const char*` on each runner file (as I did in this version) instead of global macros in `shader_runner.h`, what do you think of this?
We might as well merge those two "if (dxc_compiler)" blocks.
Done.
The "SM1 shaders" wording is perhaps a bit unfortunate, given that we're passing SHADER_MODEL_2_0 as the minimum above. Applies to the d3d9 runner as well.
I replaced "SM1" with "SM2-SM3", and for consistency "SM4" with "SM4-SM5", if that seems right.
We should be able to run 2.0 now.
Giovanni Mascellani (@giomasce) commented about tests/shader_runner_d3d12.c:
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_D3D12_OPTIONS1, &runner.options1, sizeof(runner.options1)); ok(hr == S_OK, "Failed to check feature options1 support, hr %#x.\n", hr);
- if (maximum_shader_model >= SHADER_MODEL_6_0)
- trace("Compiling SM4-SM5 shaders with %s and executing with %s\n", HLSL_COMPILER, SHADER_RUNNER);
- run_shader_tests(&runner.r, &d3d12_runner_ops, dxc_compiler, SHADER_MODEL_4_0, SHADER_MODEL_5_1);
- if (dxc_compiler)
- { trace("Int64ShaderOps: %u.\n", runner.options1.Int64ShaderOps);
- run_shader_tests(&runner.r, &d3d12_runner_ops, dxc_compiler, minimum_shader_model, maximum_shader_model);
trace("Compiling SM6 shaders with dxcompiler and executing with vkd3d\n");
Why not using `SHADER_RUNNER` here too? Right now `dxc_compiler` is never made available with crosstests, but it might happen in the future. [Conor mentioned using it in a development environment](https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/519#note_56045).
Giovanni Mascellani (@giomasce) commented about tests/hlsl/clip.shader_test:
[test] uniform 0 float4 1 2 3 4 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4) uniform 0 float4 9 8 7 6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (9, 8, 7, 6) uniform 0 float4 -1 8 7 6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (9, 8, 7, 6) uniform 0 float4 9 0 7 6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad
Something's strange here: this shader compiles successfully to SM2 and SM3 on my computer, but it fails on the CI; so while the CI pipeline passes, I can see failures on my computer. So far I have no idea of what's causing this behavior difference. But it seems to me that `clip()` should be supported by our HLSL compiler, shouldn't it?
On Fri Jan 5 16:34:05 2024 +0000, Zebediah Figura wrote:
We should be able to run 2.0 now.
Yep, I already made the changes (moving the todos from the "draw quad"s to the "probe"s, when I rebased), I am missing something else?
On Fri Jan 5 11:34:26 2024 +0000, Giovanni Mascellani wrote:
Something's strange here: this shader compiles successfully to SM2 and SM3 on my computer, but it fails on the CI; so while the CI pipeline passes, I can see failures on my computer. So far I have no idea of what's causing this behavior difference. But it seems to me that `clip()` should be supported by our HLSL compiler, shouldn't it?
Same for me, I mentioned it [here](https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514#note_56338). I will investigate further.
On Fri Jan 5 16:34:05 2024 +0000, Francisco Casas wrote:
Yep, I already made the changes (moving the todos from the "draw quad"s to the "probe"s, when I rebased), I am missing something else?
No, I just hadn't been trying to run the tests with this series, so I didn't realize it has already been updated.
On Fri Jan 5 18:28:03 2024 +0000, Zebediah Figura wrote:
No, I just hadn't been trying to run the tests with this series, so I didn't realize it has already been updated.
Uh, it's not rebased onto 1ce7e3d8b though?
On Fri Jan 5 18:53:28 2024 +0000, Zebediah Figura wrote:
Uh, it's not rebased onto 1ce7e3d8b though?
oh, my bad, when I rebased these patches weren't there yet, so many tests passed compilation but not running. I will rebase again.