From: Paul Thomson Date: Sun, 1 Sep 2019 18:57:04 +0000 (+0100) Subject: dEQP-VK.graphicsfuzz.two-loops-with-break X-Git-Tag: upstream/1.3.5~1836 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd74111915c16320ec1fc0b5c5b4bc3c0ff89938;p=platform%2Fupstream%2FVK-GL-CTS.git dEQP-VK.graphicsfuzz.two-loops-with-break Components: Vulkan New Tests: dEQP-VK.graphicsfuzz.two-loops-with-break Change-Id: Iaa1bc71ae6ae5db7f2fd77dd09771eec377643d2 --- diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt index 137c73d..d30bd92 100644 --- a/android/cts/master/vk-master.txt +++ b/android/cts/master/vk-master.txt @@ -484092,6 +484092,7 @@ dEQP-VK.graphicsfuzz.struct-used-as-temporary dEQP-VK.graphicsfuzz.swizzle-struct-init-min dEQP-VK.graphicsfuzz.two-loops-matrix dEQP-VK.graphicsfuzz.two-loops-set-struct +dEQP-VK.graphicsfuzz.two-loops-with-break dEQP-VK.graphicsfuzz.unreachable-barrier-in-loops dEQP-VK.graphicsfuzz.unreachable-loops dEQP-VK.graphicsfuzz.unreachable-loops-in-switch diff --git a/external/vulkancts/data/vulkan/amber/graphicsfuzz/two-loops-with-break.amber b/external/vulkancts/data/vulkan/amber/graphicsfuzz/two-loops-with-break.amber new file mode 100644 index 0000000..8b0eed4 --- /dev/null +++ b/external/vulkancts/data/vulkan/amber/graphicsfuzz/two-loops-with-break.amber @@ -0,0 +1,217 @@ +#!amber + +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# A test for a bug found by GraphicsFuzz. + +# Short description: A fragment shader with two loops with breaks + +# The test passes because the fragment shader always writes red; the loops do nothing. + +SHADER vertex variant_vertex_shader PASSTHROUGH + +# variant_fragment_shader is derived from the following GLSL: +# #version 310 es +# precision highp float; +# +# layout(location = 0) out vec4 _GLF_color; +# +# void main() +# { +# vec4 GLF_live15c = vec4(0.0); +# for ( +# int GLF_live15i = 0; +# GLF_live15i < 4; +# GLF_live15i++) +# { +# if (GLF_live15i >= 3) +# { +# break; +# } +# if (GLF_live15c[1] >= 1.0) +# { +# GLF_live15c[GLF_live15i] = 1.0; +# } +# } +# vec4 GLF_live15d = vec4(0.0); +# for ( +# int GLF_live15i = 0; +# GLF_live15i < 4; +# GLF_live15i++) +# { +# if (GLF_live15i >= 3) +# { +# break; +# } +# if (GLF_live15d[1] >= 1.0) +# { +# GLF_live15d[GLF_live15i] = 1.0; +# } +# } +# _GLF_color = vec4(1.0, 0.0, 0.0, 1.0); +# } +SHADER fragment variant_fragment_shader SPIRV-ASM +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 71 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %4 "main" %69 + OpExecutionMode %4 OriginUpperLeft + OpSource ESSL 310 + OpName %4 "main" + OpName %9 "GLF_live15c" + OpName %14 "GLF_live15i" + OpName %45 "GLF_live15d" + OpName %46 "GLF_live15i" + OpName %69 "_GLF_color" + OpDecorate %14 RelaxedPrecision + OpDecorate %21 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %69 Location 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypePointer Function %7 + %10 = OpConstant %6 0 + %11 = OpConstantComposite %7 %10 %10 %10 %10 + %12 = OpTypeInt 32 1 + %13 = OpTypePointer Function %12 + %15 = OpConstant %12 0 + %22 = OpConstant %12 4 + %23 = OpTypeBool + %26 = OpConstant %12 3 + %31 = OpTypeInt 32 0 + %32 = OpConstant %31 1 + %33 = OpTypePointer Function %6 + %36 = OpConstant %6 1 + %43 = OpConstant %12 1 + %68 = OpTypePointer Output %7 + %69 = OpVariable %68 Output + %70 = OpConstantComposite %7 %36 %10 %10 %36 + %4 = OpFunction %2 None %3 + %5 = OpLabel + %9 = OpVariable %8 Function + %14 = OpVariable %13 Function + %45 = OpVariable %8 Function + %46 = OpVariable %13 Function + OpStore %9 %11 + OpStore %14 %15 + OpBranch %16 + %16 = OpLabel + OpLoopMerge %18 %19 None + OpBranch %20 + %20 = OpLabel + %21 = OpLoad %12 %14 + %24 = OpSLessThan %23 %21 %22 + OpBranchConditional %24 %17 %18 + %17 = OpLabel + %25 = OpLoad %12 %14 + %27 = OpSGreaterThanEqual %23 %25 %26 + OpSelectionMerge %29 None + OpBranchConditional %27 %28 %29 + %28 = OpLabel + OpBranch %18 + %29 = OpLabel + %34 = OpAccessChain %33 %9 %32 + %35 = OpLoad %6 %34 + %37 = OpFOrdGreaterThanEqual %23 %35 %36 + OpSelectionMerge %39 None + OpBranchConditional %37 %38 %39 + %38 = OpLabel + %40 = OpLoad %12 %14 + %41 = OpAccessChain %33 %9 %40 + OpStore %41 %36 + OpBranch %39 + %39 = OpLabel + OpBranch %19 + %19 = OpLabel + %42 = OpLoad %12 %14 + %44 = OpIAdd %12 %42 %43 + OpStore %14 %44 + OpBranch %16 + %18 = OpLabel + OpStore %45 %11 + OpStore %46 %15 + OpBranch %47 + %47 = OpLabel + OpLoopMerge %49 %50 None + OpBranch %51 + %51 = OpLabel + %52 = OpLoad %12 %46 + %53 = OpSLessThan %23 %52 %22 + OpBranchConditional %53 %48 %49 + %48 = OpLabel + %54 = OpLoad %12 %46 + %55 = OpSGreaterThanEqual %23 %54 %26 + OpSelectionMerge %57 None + OpBranchConditional %55 %56 %57 + %56 = OpLabel + OpBranch %49 + %57 = OpLabel + %59 = OpAccessChain %33 %45 %32 + %60 = OpLoad %6 %59 + %61 = OpFOrdGreaterThanEqual %23 %60 %36 + OpSelectionMerge %63 None + OpBranchConditional %61 %62 %63 + %62 = OpLabel + %64 = OpLoad %12 %46 + %65 = OpAccessChain %33 %45 %64 + OpStore %65 %36 + OpBranch %63 + %63 = OpLabel + OpBranch %50 + %50 = OpLabel + %66 = OpLoad %12 %46 + %67 = OpIAdd %12 %66 %43 + OpStore %46 %67 + OpBranch %47 + %49 = OpLabel + OpStore %69 %70 + OpReturn + OpFunctionEnd +END + +# uniforms for variant + + +BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM + +PIPELINE graphics variant_pipeline + ATTACH variant_vertex_shader + ATTACH variant_fragment_shader + FRAMEBUFFER_SIZE 256 256 + BIND BUFFER variant_framebuffer AS color LOCATION 0 +END +CLEAR_COLOR variant_pipeline 0 0 0 255 + +CLEAR variant_pipeline +RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 256 256 + +EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255 diff --git a/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.cpp b/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.cpp index cf1ada6..b17cf6f 100644 --- a/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.cpp +++ b/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.cpp @@ -77,6 +77,7 @@ void createAmberTests (tcu::TestCaseGroup* group) { "swizzle-struct-init-min.amber", "swizzle-struct-init-min", "A fragment shader that uses vector swizzles, struct initializers, and min" }, { "two-loops-matrix.amber", "two-loops-matrix", "A fragment shader with two loops and some matrices" }, { "two-loops-set-struct.amber", "two-loops-set-struct", "A fragment shader with two loops that write to a struct" }, + { "two-loops-with-break.amber", "two-loops-with-break", "A fragment shader with two loops with breaks" }, { "unreachable-barrier-in-loops.amber", "unreachable-barrier-in-loops", "A compute shader with an unreachable barrier in a loop nest" }, { "unreachable-loops.amber", "unreachable-loops", "Fragment shader that writes red despite unreachable loops" }, { "unreachable-loops-in-switch.amber", "unreachable-loops-in-switch", "A fragment shader with unreachable loops in a switch" }, diff --git a/external/vulkancts/mustpass/master/vk-default-no-waivers.txt b/external/vulkancts/mustpass/master/vk-default-no-waivers.txt index c9fc295..e6ef04b 100644 --- a/external/vulkancts/mustpass/master/vk-default-no-waivers.txt +++ b/external/vulkancts/mustpass/master/vk-default-no-waivers.txt @@ -486238,6 +486238,7 @@ dEQP-VK.graphicsfuzz.struct-used-as-temporary dEQP-VK.graphicsfuzz.swizzle-struct-init-min dEQP-VK.graphicsfuzz.two-loops-matrix dEQP-VK.graphicsfuzz.two-loops-set-struct +dEQP-VK.graphicsfuzz.two-loops-with-break dEQP-VK.graphicsfuzz.unreachable-barrier-in-loops dEQP-VK.graphicsfuzz.unreachable-loops dEQP-VK.graphicsfuzz.unreachable-loops-in-switch diff --git a/external/vulkancts/mustpass/master/vk-default.txt b/external/vulkancts/mustpass/master/vk-default.txt index 44d750a..22e9965 100644 --- a/external/vulkancts/mustpass/master/vk-default.txt +++ b/external/vulkancts/mustpass/master/vk-default.txt @@ -486085,6 +486085,7 @@ dEQP-VK.graphicsfuzz.struct-used-as-temporary dEQP-VK.graphicsfuzz.swizzle-struct-init-min dEQP-VK.graphicsfuzz.two-loops-matrix dEQP-VK.graphicsfuzz.two-loops-set-struct +dEQP-VK.graphicsfuzz.two-loops-with-break dEQP-VK.graphicsfuzz.unreachable-barrier-in-loops dEQP-VK.graphicsfuzz.unreachable-loops dEQP-VK.graphicsfuzz.unreachable-loops-in-switch