diff --git a/AndroidGen.mk b/AndroidGen.mk index 60ee1ae582..0e621aa7c3 100644 --- a/AndroidGen.mk +++ b/AndroidGen.mk @@ -58,6 +58,7 @@ LOCAL_SRC_FILES := \ external/vulkancts/framework/vulkan/vkWsiUtil.cpp \ external/vulkancts/framework/vulkan/vkYCbCrImageWithMemory.cpp \ external/vulkancts/modules/vulkan/amber/vktAmberExampleTests.cpp \ + external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.cpp \ external/vulkancts/modules/vulkan/amber/vktAmberHelper.cpp \ external/vulkancts/modules/vulkan/amber/vktAmberTestCase.cpp \ external/vulkancts/modules/vulkan/api/vktApiBufferAndImageAllocationUtil.cpp \ @@ -367,9 +368,6 @@ LOCAL_SRC_FILES := \ external/vulkancts/modules/vulkan/ubo/vktUniformBlockTests.cpp \ external/vulkancts/modules/vulkan/util/vktDrawUtil.cpp \ external/vulkancts/modules/vulkan/util/vktExternalMemoryUtil.cpp \ - external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerExampleTests.cpp \ - external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerGraphicsFuzzTests.cpp \ - external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerTestCase.cpp \ external/vulkancts/modules/vulkan/vktInfoTests.cpp \ external/vulkancts/modules/vulkan/vktShaderLibrary.cpp \ external/vulkancts/modules/vulkan/vktTestCase.cpp \ @@ -1110,7 +1108,6 @@ LOCAL_C_INCLUDES := \ $(deqp_dir)/external/vulkancts/modules/vulkan/texture \ $(deqp_dir)/external/vulkancts/modules/vulkan/ubo \ $(deqp_dir)/external/vulkancts/modules/vulkan/util \ - $(deqp_dir)/external/vulkancts/modules/vulkan/vkrunner \ $(deqp_dir)/external/vulkancts/modules/vulkan/wsi \ $(deqp_dir)/external/vulkancts/modules/vulkan/ycbcr \ $(deqp_dir)/framework/common \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 666526b9d5..15c2464c26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,10 +88,6 @@ add_subdirectory(external/glslang) # spirv-tools add_subdirectory(external/spirv-tools) -# VkRunner -add_subdirectory(external/vkrunner) -include_directories(external/vkrunner/src) - # spirv-headers set(SPIRV_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/external/spirv-headers/src/include") if (NOT EXISTS ${SPIRV_INCLUDE_PATH}) diff --git a/android/cts/master/src/vk-excluded-tests.txt b/android/cts/master/src/vk-excluded-tests.txt index dbcb91ae9d..c33928a33a 100644 --- a/android/cts/master/src/vk-excluded-tests.txt +++ b/android/cts/master/src/vk-excluded-tests.txt @@ -65,8 +65,5 @@ dEQP-VK.wsi.android.shared_presentable_image.scale_down.* # Issue: b/67022169 dEQP-VK.wsi.android.incremental_present.scale_down.* -# Excluded VkRunner example tests -dEQP-VK.vkrunner-example.* - # Exclude Amber example tests dEQP-VK.amber-example.* diff --git a/external/fetch_sources.py b/external/fetch_sources.py index baa9637920..540e30ac97 100644 --- a/external/fetch_sources.py +++ b/external/fetch_sources.py @@ -328,11 +328,6 @@ def postExtractLibpng (path): None, "d3752ea20886d2fceb6cecda3c2b146a8f22d214", "spirv-headers"), - GitRepo( - "https://github.com/Igalia/vkrunner.git", - None, - "79229ee3662da691240bde7fb6c6578e0e10e3f1", - "vkrunner"), GitRepo( "https://github.com/google/amber.git", None, diff --git a/external/vkrunner/.gitignore b/external/vkrunner/.gitignore deleted file mode 100644 index 85de9cf933..0000000000 --- a/external/vkrunner/.gitignore +++ /dev/null @@ -1 +0,0 @@ -src diff --git a/external/vkrunner/CMakeLists.txt b/external/vkrunner/CMakeLists.txt deleted file mode 100644 index 727f9810ba..0000000000 --- a/external/vkrunner/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# cmake file for VkRunner - -include(CheckCCompilerFlag) - -foreach(FLAG -std=c99 -Wno-extra -Wno-pedantic -Wno-conversion -Wno-shadow) - string(REGEX REPLACE "[=-]" "_" FLAG_VAR "${FLAG}") - CHECK_C_COMPILER_FLAG("${FLAG}" HAVE_FLAG_${FLAG_VAR}) - if(${HAVE_FLAG_${FLAG_VAR}}) - add_definitions("${FLAG}") - endif() -endforeach() - -set(VULKAN_HEADER "\"vkDefs.h\"") -add_definitions("-D_DEFAULT_SOURCE") -include_directories(../../external/vulkancts/framework/vulkan/) -add_subdirectory(src) diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/continue-and-merge.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/continue-and-merge.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/continue-and-merge.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/continue-and-merge.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/control-flow-switch.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/control-flow-switch.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/control-flow-switch.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/control-flow-switch.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/dead-struct-init.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/dead-struct-init.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/dead-struct-init.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/dead-struct-init.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/fragcoord-control-flow-2.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/fragcoord-control-flow-2.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/fragcoord-control-flow-2.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/fragcoord-control-flow-2.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/fragcoord-control-flow.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/fragcoord-control-flow.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/fragcoord-control-flow.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/fragcoord-control-flow.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/mat-array-deep-control-flow.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/mat-array-deep-control-flow.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/mat-array-deep-control-flow.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/mat-array-deep-control-flow.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/mat-array-distance.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/mat-array-distance.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/mat-array-distance.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/mat-array-distance.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/pow-vec4.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/pow-vec4.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/pow-vec4.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/pow-vec4.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/swizzle-struct-init-min.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/swizzle-struct-init-min.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/swizzle-struct-init-min.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/swizzle-struct-init-min.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/while-inside-switch.shader_test b/external/vulkancts/data/vulkan/amber/graphicsfuzz/while-inside-switch.amber similarity index 100% rename from external/vulkancts/data/vulkan/vkrunner/graphicsfuzz/while-inside-switch.shader_test rename to external/vulkancts/data/vulkan/amber/graphicsfuzz/while-inside-switch.amber diff --git a/external/vulkancts/data/vulkan/vkrunner/example/spirv.shader_test b/external/vulkancts/data/vulkan/vkrunner/example/spirv.shader_test deleted file mode 100644 index c1f932a75e..0000000000 --- a/external/vulkancts/data/vulkan/vkrunner/example/spirv.shader_test +++ /dev/null @@ -1,117 +0,0 @@ -[vertex shader spirv] - OpCapability Shader - %1 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Vertex %main "main" %_ %pos %norm_coord - OpSource GLSL 430 - OpName %main "main" - OpName %gl_PerVertex "gl_PerVertex" - OpMemberName %gl_PerVertex 0 "gl_Position" - OpName %_ "" - OpName %pos "pos" - OpName %norm_coord "norm_coord" - OpMemberDecorate %gl_PerVertex 0 BuiltIn Position - OpDecorate %gl_PerVertex Block - OpDecorate %pos Location 0 - OpDecorate %norm_coord Location 0 - %void = OpTypeVoid - %3 = OpTypeFunction %void - %float = OpTypeFloat 32 - %v4float = OpTypeVector %float 4 - %uint = OpTypeInt 32 0 - %uint_1 = OpConstant %uint 1 -%_arr_float_uint_1 = OpTypeArray %float %uint_1 -%gl_PerVertex = OpTypeStruct %v4float -%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex - %_ = OpVariable %_ptr_Output_gl_PerVertex Output - %int = OpTypeInt 32 1 - %int_0 = OpConstant %int 0 -%_ptr_Input_v4float = OpTypePointer Input %v4float - %pos = OpVariable %_ptr_Input_v4float Input -%_ptr_Output_v4float = OpTypePointer Output %v4float - %norm_coord = OpVariable %_ptr_Output_v4float Output - %main = OpFunction %void None %3 - %5 = OpLabel - %18 = OpLoad %v4float %pos - %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0 - OpStore %20 %18 - OpStore %norm_coord %18 - OpReturn - OpFunctionEnd - -[fragment shader spirv] - OpCapability Shader - %1 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Fragment %main "main" %color %norm_coord - OpExecutionMode %main OriginUpperLeft - OpSource GLSL 430 - OpName %main "main" - OpName %color "color" - OpName %norm_coord "norm_coord" - OpDecorate %color Location 0 - OpDecorate %norm_coord Location 0 - %void = OpTypeVoid - %3 = OpTypeFunction %void - %float = OpTypeFloat 32 - %v4float = OpTypeVector %float 4 -%_ptr_Output_v4float = OpTypePointer Output %v4float - %color = OpVariable %_ptr_Output_v4float Output - %v2float = OpTypeVector %float 2 - %float_1 = OpConstant %float 1 - %12 = OpConstantComposite %v2float %float_1 %float_1 - %bool = OpTypeBool -%_ptr_Input_v4float = OpTypePointer Input %v4float - %norm_coord = OpVariable %_ptr_Input_v4float Input - %uint = OpTypeInt 32 0 - %uint_0 = OpConstant %uint 0 -%_ptr_Input_float = OpTypePointer Input %float - %float_0_1 = OpConstant %float 0.1 - %uint_1 = OpConstant %uint 1 - %float_0 = OpConstant %float 0 - %38 = OpConstantComposite %v2float %float_0 %float_0 - %main = OpFunction %void None %3 - %5 = OpLabel - %13 = OpLoad %v4float %color - %14 = OpVectorShuffle %v4float %13 %12 4 1 2 5 - OpStore %color %14 - %21 = OpAccessChain %_ptr_Input_float %norm_coord %uint_0 - %22 = OpLoad %float %21 - %23 = OpExtInst %float %1 FAbs %22 - %25 = OpFOrdLessThan %bool %23 %float_0_1 - %26 = OpLogicalNot %bool %25 - OpSelectionMerge %28 None - OpBranchConditional %26 %27 %28 - %27 = OpLabel - %30 = OpAccessChain %_ptr_Input_float %norm_coord %uint_1 - %31 = OpLoad %float %30 - %32 = OpExtInst %float %1 FAbs %31 - %33 = OpFOrdLessThan %bool %32 %float_0_1 - OpBranch %28 - %28 = OpLabel - %34 = OpPhi %bool %25 %5 %33 %27 - OpSelectionMerge %36 None - OpBranchConditional %34 %35 %41 - %35 = OpLabel - %39 = OpLoad %v4float %color - %40 = OpVectorShuffle %v4float %39 %38 0 4 5 3 - OpStore %color %40 - OpBranch %36 - %41 = OpLabel - %42 = OpLoad %v4float %color - %43 = OpVectorShuffle %v4float %42 %12 0 4 5 3 - OpStore %color %43 - OpBranch %36 - %36 = OpLabel - OpReturn - OpFunctionEnd - -[test] -draw rect -1 -1 2 2 - -probe rect rgba (0, 0, 11, 11) (1, 1, 1, 1) -probe rect rgba (138, 0, 112, 11) (1, 1, 1, 1) -probe rect rgba (0, 138, 11, 112) (1, 1, 1, 1) -probe rect rgba (138, 138, 112, 112) (1, 1, 1, 1) -probe rect rgba (114, 0, 23, 250) (1, 0, 0, 1) -probe rect rgba (0, 114, 250, 23) (1, 0, 0, 1) diff --git a/external/vulkancts/data/vulkan/vkrunner/example/sqrt.shader_test b/external/vulkancts/data/vulkan/vkrunner/example/sqrt.shader_test deleted file mode 100644 index 9a1fb1d9fd..0000000000 --- a/external/vulkancts/data/vulkan/vkrunner/example/sqrt.shader_test +++ /dev/null @@ -1,29 +0,0 @@ -[compute shader] -#version 450 - -layout(std140, push_constant) uniform push_constants { - float in_value; -}; - -layout(std140, binding = 0) buffer ssbo { - float out_value; -}; - -void -main() -{ - out_value = sqrt(in_value); -} - -[test] -# Allocate an ssbo big enough for a float at binding 0 -ssbo 0 4 - -# Set the push constant as an input value -uniform float 0 - -compute 1 1 1 - -# Probe that we got the expected value -tolerance 0.00006% 0.00006% 0.00006% 0.00006% -probe ssbo float 0 0 ~= diff --git a/external/vulkancts/data/vulkan/vkrunner/example/ubo.shader_test b/external/vulkancts/data/vulkan/vkrunner/example/ubo.shader_test deleted file mode 100644 index 1a3116adda..0000000000 --- a/external/vulkancts/data/vulkan/vkrunner/example/ubo.shader_test +++ /dev/null @@ -1,54 +0,0 @@ -[vertex shader] -#version 450 - -layout(location = 0) out vec4 color_out; -layout(location = 0) in vec4 pos; - -layout(binding = 3, std140) uniform block { - vec4 color_in; - mat2 transform; - float offsets[4]; -}; - -void -main() -{ - gl_Position = vec4(transform * pos.xy, 0.0, 1.0); - color_out = color_in; - - for (int i = 0; i < offsets.length(); i++) - color_out[i] += offsets[i]; -} - -[fragment shader] -#version 450 - -layout(location = 0) in vec4 color_in; -layout(location = 0) out vec4 color_out; - -void -main() -{ - color_out = color_in; -} - -[test] -clear - -uniform ubo 3 mat2 16 0.0 1.0 1.0 0.0 - -# Sets the offset array. Arrays can be specified by listing multiple values -uniform ubo 3 float 48 0.1 0.2 0.3 0.4 - -# Note that we can’t update the ubo and then draw another square -# without first probing because the command buffer isn’t flushed -# until a probe. Otherwise it would end up just using the second -# set of values in the ubo for both rectangles. - -uniform ubo 3 vec4 0 -0.1 0.8 -0.3 0.6 -draw rect -1 -1 1 2 -relative probe rect rgba (0.0, 0.0, 1.0, 0.5) (0.0, 1.0, 0.0, 1.0) - -uniform ubo 3 vec4 0 -0.1 0.6 -0.3 0.6 -draw rect 0 -1 1 2 -relative probe rect rgba (0.0, 0.5, 1.0, 0.5) (0.0, 0.8, 0.0, 1.0) diff --git a/external/vulkancts/data/vulkan/vkrunner/example/vertex-data.shader_test b/external/vulkancts/data/vulkan/vkrunner/example/vertex-data.shader_test deleted file mode 100644 index 89cfb2e786..0000000000 --- a/external/vulkancts/data/vulkan/vkrunner/example/vertex-data.shader_test +++ /dev/null @@ -1,68 +0,0 @@ -[vertex shader] -#version 430 - -layout(location = 0) in vec4 position; -layout(location = 1) in vec4 color_in; -layout(location = 0) out vec4 color_out; - -void -main() -{ - gl_Position = position; - color_out = color_in; -} - -[fragment shader] -#version 430 - -layout(location = 0) in vec4 color_in; -layout(location = 0) out vec4 color_out; - -void -main() -{ - color_out = color_in; -} - -[vertex data] -# position color -0/R32G32_SFLOAT 1/A8B8G8R8_UNORM_PACK32 - -# Top-left red --1 -1 0xff0000ff -0 -1 0xff0000ff --1 0 0xff0000ff -0 -1 0xff0000ff --1 0 0xff0000ff -0 0 0xff0000ff -# Top-right green -0 -1 0xff00ff00 -1 -1 0xff00ff00 -0 0 0xff00ff00 -1 -1 0xff00ff00 -0 0 0xff00ff00 -1 0 0xff00ff00 -# Bottom-left blue --1 0 0xffff0000 -0 0 0xffff0000 --1 1 0xffff0000 -0 0 0xffff0000 --1 1 0xffff0000 -0 1 0xffff0000 -# Bottom-right purple -0 0 0xff800080 -1 0 0xff800080 -0 1 0xff800080 -1 0 0xff800080 -0 1 0xff800080 -1 1 0xff800080 - -[test] -clear - -draw arrays TRIANGLE_LIST 0 24 - -relative probe rect rgb (0, 0, 0.5, 0.5) (1, 0, 0) -relative probe rect rgb (0.5, 0, 0.5, 0.5) (0, 1, 0) -relative probe rect rgb (0, 0.5, 0.5, 0.5) (0, 0, 1) -relative probe rect rgb (0.5, 0.5, 0.5, 0.5) (0.5, 0, 0.5) diff --git a/external/vulkancts/modules/vulkan/CMakeLists.txt b/external/vulkancts/modules/vulkan/CMakeLists.txt index 6961bf48f7..7ca0e04aeb 100644 --- a/external/vulkancts/modules/vulkan/CMakeLists.txt +++ b/external/vulkancts/modules/vulkan/CMakeLists.txt @@ -33,7 +33,6 @@ add_subdirectory(ycbcr) add_subdirectory(protected_memory) add_subdirectory(memory_model) add_subdirectory(util) -add_subdirectory(vkrunner) add_subdirectory(amber) include_directories( @@ -70,7 +69,6 @@ include_directories( protected_memory memory_model util - vkrunner amber ) @@ -126,7 +124,6 @@ set(DEQP_VK_LIBS deqp-vk-ycbcr deqp-vk-protected-memory deqp-vk-memory-model - deqp-vk-vkrunner deqp-vk-amber ) diff --git a/external/vulkancts/modules/vulkan/amber/CMakeLists.txt b/external/vulkancts/modules/vulkan/amber/CMakeLists.txt index 08d31090f1..40b761305d 100644 --- a/external/vulkancts/modules/vulkan/amber/CMakeLists.txt +++ b/external/vulkancts/modules/vulkan/amber/CMakeLists.txt @@ -9,6 +9,8 @@ set(DEQP_VK_AMBER_SRCS vktAmberTestCase.cpp vktAmberExampleTests.hpp vktAmberExampleTests.cpp + vktAmberGraphicsFuzzTests.hpp + vktAmberGraphicsFuzzTests.cpp ) set(DEQP_VK_AMBER_LIBS diff --git a/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.cpp b/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.cpp new file mode 100644 index 0000000000..fd21332c8d --- /dev/null +++ b/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.cpp @@ -0,0 +1,90 @@ +/*------------------------------------------------------------------------ + * Vulkan Conformance Tests + * ------------------------ + * + * Copyright (c) 2018 Intel Corporation + * Copyright (c) 2018 Google LLC + * Copyright (c) 2019 The Khronos Group Inc. + * + * 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. + * + *//*! + * \file + * \brief GraphicsFuzz tests + *//*--------------------------------------------------------------------*/ + +#include + +#include "vktAmberGraphicsFuzzTests.hpp" +#include "vktAmberTestCase.hpp" +#include "vktTestGroupUtil.hpp" + +namespace vkt +{ +namespace cts_amber +{ +namespace +{ + +void createAmberTests (tcu::TestCaseGroup* group) +{ + tcu::TestContext& testCtx = group->getTestContext(); + + static const struct + { + const char *filename; + const char *name; + const char *description; + } + tests[] = + { + { "continue-and-merge.amber", "continue-and-merge", "A fragment shader with two nested loops" }, + { "control-flow-switch.amber", "control-flow-switch", "A fragment shader with somewhat complex control flow and a switch" }, + { "dead-struct-init.amber", "dead-struct-init", "A fragment shader that uses struct initializers" }, + { "fragcoord-control-flow.amber", "fragcoord-control-flow", "A fragment shader that uses FragCoord and somewhat complex control flow" }, + { "fragcoord-control-flow-2.amber", "fragcoord-control-flow-2", "A fragment shader that uses FragCoord and somewhat complex control flow" }, + { "mat-array-deep-control-flow.amber", "mat-array-deep-control-flow", "A fragment shader that uses an array of matrices and has deep control flow" }, + { "mat-array-distance.amber", "mat-array-distance", "A fragment shader that uses an array of matrices and distance" }, + { "pow-vec4.amber", "pow-vec4", "A fragment shader that uses pow" }, + { "swizzle-struct-init-min.amber", "swizzle-struct-init-min", "A fragment shader that uses vector swizzles, struct initializers, and min" }, + { "while-inside-switch.amber", "while-inside-switch", "A fragment shader that uses a while loop inside a switch" }, + }; + + for (size_t i = 0; i < sizeof tests / sizeof tests[0]; i++) + { + // .amber files are saved in /external/vulkancts/data/vulkan/amber// + AmberTestCase *testCase = new AmberTestCase(testCtx, tests[i].name, tests[i].description); + + // Make sure the input can be parsed before we use it. + if (testCase->parse("graphicsfuzz", tests[i].filename)) + { + group->addChild(testCase); + } + else + { + delete testCase; + + TCU_THROW(InternalError, "Failed to parse amber file"); + } + } +} + +} // anonymous + +tcu::TestCaseGroup* createGraphicsFuzzTests (tcu::TestContext& testCtx) +{ + return createTestGroup(testCtx, "graphicsfuzz", "Amber GraphicsFuzz Tests", createAmberTests); +} + +} // cts_amber +} // vkt diff --git a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerGraphicsFuzzTests.hpp b/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.hpp similarity index 84% rename from external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerGraphicsFuzzTests.hpp rename to external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.hpp index 1c99118ff6..9b02d14a2d 100644 --- a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerGraphicsFuzzTests.hpp +++ b/external/vulkancts/modules/vulkan/amber/vktAmberGraphicsFuzzTests.hpp @@ -1,11 +1,12 @@ -#ifndef _VKTVKRUNNERGRAPHICSFUZZTESTS_HPP -#define _VKTVKRUNNERGRAPHICSFUZZTESTS_HPP +#ifndef _VKTAMBERGRAPHICSFUZZTESTS_HPP +#define _VKTAMBERGRAPHICSFUZZTESTS_HPP /*------------------------------------------------------------------------ * Vulkan Conformance Tests * ------------------------ * * Copyright (c) 2018 Intel Corporation * Copyright (c) 2018 Google LLC + * Copyright (c) 2019 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,12 +30,12 @@ namespace vkt { -namespace vkrunner +namespace cts_amber { tcu::TestCaseGroup* createGraphicsFuzzTests (tcu::TestContext& testCtx); -} // vkrunner +} // cts_amber } // vkt -#endif // _VKTVKRUNNERGRAPHICSFUZZTESTS_HPP +#endif // _VKTAMBERGRAPHICSFUZZTESTS_HPP diff --git a/external/vulkancts/modules/vulkan/vkrunner/CMakeLists.txt b/external/vulkancts/modules/vulkan/vkrunner/CMakeLists.txt deleted file mode 100644 index 6b647d480c..0000000000 --- a/external/vulkancts/modules/vulkan/vkrunner/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -# dEQP-VK.vkrunner - -include_directories(..) - -set(DEQP_VK_VKRUNNER_SRCS - vktVkRunnerTestCase.cpp - vktVkRunnerTestCase.hpp - vktVkRunnerExampleTests.cpp - vktVkRunnerExampleTests.hpp - vktVkRunnerGraphicsFuzzTests.cpp - vktVkRunnerGraphicsFuzzTests.hpp - ) - -set(DEQP_VK_VKRUNNER_LIBS - tcutil - vkutil - vkrunner - ) - -add_library(deqp-vk-vkrunner STATIC ${DEQP_VK_VKRUNNER_SRCS}) -target_link_libraries(deqp-vk-vkrunner ${DEQP_VK_VKRUNNER_LIBS}) -add_custom_target(deqp-vk-vkrunner-data) -add_dependencies(deqp-vk-vkrunner deqp-vk-vkrunner-data) -add_data_dir(deqp-vk-vkrunner ../../../data/vulkan/vkrunner vkrunner) diff --git a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerExampleTests.cpp b/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerExampleTests.cpp deleted file mode 100644 index 8d6ebe3c30..0000000000 --- a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerExampleTests.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/*------------------------------------------------------------------------ - * Vulkan Conformance Tests - * ------------------------ - * - * Copyright (c) 2018 Intel Corporation - * - * 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. - * - *//*! - * \file - * \brief Functional tests using vkrunner - *//*--------------------------------------------------------------------*/ - -#include - -#include "vktVkRunnerExampleTests.hpp" -#include "vktVkRunnerTestCase.hpp" -#include "vktTestGroupUtil.hpp" - -namespace vkt -{ -namespace vkrunner -{ -namespace -{ - -void createVkRunnerTests (tcu::TestCaseGroup* vkRunnerTests) -{ - tcu::TestContext& testCtx = vkRunnerTests->getTestContext(); - - static const struct - { - const char *filename, *name, *description; - } tests[] = - { - { "spirv.shader_test", "spirv", "Example test using a SPIR-V shaders in text format" }, - { "ubo.shader_test", "ubo", "Example test setting values in a UBO" }, - { "vertex-data.shader_test", "vertex-data", "Example test using a vertex data section" }, - }; - - for (size_t i = 0; i < sizeof tests / sizeof tests[0]; i++) - { - /* shader_test files are saved in /external/vulkancts/data/vulkan/vkrunner// */ - VkRunnerTestCase *testCase = new VkRunnerTestCase(testCtx, - "example", - tests[i].filename, - tests[i].name, - tests[i].description); - /* Need to call getShaders() manually to detect any issue in the - * shader test file, like invalid test commands or the file doesn't exist. - */ - testCase->getShaders(); - vkRunnerTests->addChild(testCase); - } - - // Add some tests of the sqrt function using the templating mechanism - for (int i = 1; i <= 8; i++) - { - std::stringstream testName; - testName << "sqrt_" << i; - VkRunnerTestCase *testCase = new VkRunnerTestCase(testCtx, - "example", - "sqrt.shader_test", - testName.str().c_str(), - "Example test using the templating mechanism"); - std::stringstream inputString; - inputString << (i * i); - std::stringstream outputString; - outputString << i; - testCase->addTokenReplacement("", inputString.str().c_str()); - testCase->addTokenReplacement("", outputString.str().c_str()); - /* Call getShaders() after doing the token - * replacements in the shader test. Otherwise, VkRunner will fail when found - * unknown commands or invalid sentences when processing the shader test file. - */ - testCase->getShaders(); - vkRunnerTests->addChild(testCase); - } -} - -} // anonymous - -tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx) -{ - return createTestGroup(testCtx, "vkrunner-example", "VkRunner Tests", createVkRunnerTests); -} - -} // vkrunner -} // vkt diff --git a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerExampleTests.hpp b/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerExampleTests.hpp deleted file mode 100644 index 8978ccaceb..0000000000 --- a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerExampleTests.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _VKTVKRUNNEREXAMPLETESTS_HPP -#define _VKTVKRUNNEREXAMPLETESTS_HPP -/*------------------------------------------------------------------------ - * Vulkan Conformance Tests - * ------------------------ - * - * Copyright (c) 2018 Intel Corporation - * - * 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. - * - *//*! - * \file - * \brief Functional tests using vkrunner - *//*--------------------------------------------------------------------*/ - -#include "tcuDefs.hpp" -#include "tcuTestCase.hpp" - -namespace vkt -{ -namespace vkrunner -{ - -tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx); - -} // vkrunner -} // vkt - -#endif // _VKTVKRUNNEREXAMPLETESTS_HPP diff --git a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerGraphicsFuzzTests.cpp b/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerGraphicsFuzzTests.cpp deleted file mode 100644 index a1a8227750..0000000000 --- a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerGraphicsFuzzTests.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*------------------------------------------------------------------------ - * Vulkan Conformance Tests - * ------------------------ - * - * Copyright (c) 2018 Intel Corporation - * Copyright (c) 2018 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. - * - *//*! - * \file - * \brief GraphicsFuzz tests - *//*--------------------------------------------------------------------*/ - -#include - -#include "vktVkRunnerGraphicsFuzzTests.hpp" -#include "vktVkRunnerTestCase.hpp" -#include "vktTestGroupUtil.hpp" - -namespace vkt -{ -namespace vkrunner -{ -namespace -{ - -void createVkRunnerTests (tcu::TestCaseGroup* graphicsFuzzTests) -{ - tcu::TestContext& testCtx = graphicsFuzzTests->getTestContext(); - - static const struct - { - const char *filename, *name, *description; - } tests[] = - { - { "continue-and-merge.shader_test", "continue-and-merge", "A fragment shader with two nested loops" }, - { "control-flow-switch.shader_test", "control-flow-switch", "A fragment shader with somewhat complex control flow and a switch" }, - { "dead-struct-init.shader_test", "dead-struct-init", "A fragment shader that uses struct initializers" }, - { "fragcoord-control-flow.shader_test", "fragcoord-control-flow", "A fragment shader that uses FragCoord and somewhat complex control flow" }, - { "fragcoord-control-flow-2.shader_test", "fragcoord-control-flow-2", "A fragment shader that uses FragCoord and somewhat complex control flow" }, - { "mat-array-deep-control-flow.shader_test", "mat-array-deep-control-flow", "A fragment shader that uses an array of matrices and has deep control flow" }, - { "mat-array-distance.shader_test", "mat-array-distance", "A fragment shader that uses an array of matrices and distance" }, - { "pow-vec4.shader_test", "pow-vec4", "A fragment shader that uses pow" }, - { "swizzle-struct-init-min.shader_test", "swizzle-struct-init-min", "A fragment shader that uses vector swizzles, struct initializers, and min" }, - { "while-inside-switch.shader_test", "while-inside-switch", "A fragment shader that uses a while loop inside a switch" }, - }; - - for (size_t i = 0; i < sizeof tests / sizeof tests[0]; i++) - { - /* shader_test files are saved in /external/vulkancts/data/vulkan/vkrunner// */ - VkRunnerTestCase *testCase = new VkRunnerTestCase(testCtx, - "graphicsfuzz", - tests[i].filename, - tests[i].name, - tests[i].description); - /* Need to call getShaders() manually to detect any issue in the - * shader test file, like invalid test commands or the file doesn't exist. - */ - testCase->getShaders(); - graphicsFuzzTests->addChild(testCase); - } -} - -} // anonymous - -tcu::TestCaseGroup* createGraphicsFuzzTests (tcu::TestContext& testCtx) -{ - return createTestGroup(testCtx, "graphicsfuzz", "VkRunner GraphicsFuzz Tests", createVkRunnerTests); -} - -} // vkrunner -} // vkt diff --git a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerTestCase.cpp b/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerTestCase.cpp deleted file mode 100644 index 5677332fb0..0000000000 --- a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerTestCase.cpp +++ /dev/null @@ -1,219 +0,0 @@ -/*------------------------------------------------------------------------ - * Vulkan Conformance Tests - * ------------------------ - * - * Copyright (c) 2018 Intel Corporation - * - * 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. - * - *//*! - * \file - * \brief Functional tests using vkrunner - *//*--------------------------------------------------------------------*/ - -#include -#include - -#include "vktVkRunnerTestCase.hpp" -#include "vktTestCaseUtil.hpp" -#include "tcuTestLog.hpp" -#include "tcuResource.hpp" - -namespace vkt -{ -namespace vkrunner -{ - -static const char * -vr_stage_name[VR_SHADER_STAGE_N_STAGES] = { - "vertex", - "tess_ctrl", - "tess_eval", - "geometry", - "fragment", - "compute", -}; - -static void errorCb(const char* message, - void* user_data) -{ - VkRunnerTestCase* test = (VkRunnerTestCase*) user_data; - - test->getTestContext().getLog() - << tcu::TestLog::Message - << message - << "\n" - << tcu::TestLog::EndMessage; -} - -VkRunnerTestCase::VkRunnerTestCase (tcu::TestContext& testCtx, - const char* categoryname, - const char* filename, - const char* name, - const char* description) - : TestCase(testCtx, name, description) -{ - m_testCaseData.categoryname = categoryname; - m_testCaseData.filename = filename; - m_testCaseData.num_shaders = 0; - m_testCaseData.script = DE_NULL; - m_testCaseData.shaders = DE_NULL; - - std::string readFilename("vulkan/vkrunner/"); - readFilename.append(m_testCaseData.categoryname); - readFilename.append("/"); - readFilename.append(m_testCaseData.filename); - - std::string s = ShaderSourceProvider::getSource(m_testCtx.getArchive(), readFilename.c_str()); - m_testCaseData.source = vr_source_from_string(s.c_str()); -} - -VkRunnerTestCase::~VkRunnerTestCase (void) -{ - if (m_testCaseData.num_shaders) - { - for (int i = 0; i < m_testCaseData.num_shaders; i++) - { - /* shaders[i]->source were allocated by VkRunner. We don't need them anymore. */ - deFree(m_testCaseData.shaders[i].source); - } - deFree(m_testCaseData.shaders); - } - if (m_testCaseData.script) - vr_script_free(m_testCaseData.script); - if (m_testCaseData.source) - vr_source_free(m_testCaseData.source); -} - -void VkRunnerTestCase::addTokenReplacement(const char *token, - const char *replacement) -{ - vr_source_add_token_replacement(m_testCaseData.source, - token, - replacement); -} - -bool VkRunnerTestCase::getShaders() -{ - /* Create a temporary vr_config to log shader_test parsing errors to test's log file */ - struct vr_config *config = vr_config_new(); - vr_config_set_user_data(config, this); - vr_config_set_error_cb(config, errorCb); - m_testCaseData.script = vr_script_load(config, m_testCaseData.source); - - if (m_testCaseData.script == DE_NULL) - { - /* Parser returned an error or shader_test file doesn't exist */ - vr_config_free(config); - return false; - } - - m_testCaseData.num_shaders = vr_script_get_num_shaders(m_testCaseData.script); - m_testCaseData.shaders = (struct vr_script_shader_code *) - malloc(sizeof(struct vr_script_shader_code)*m_testCaseData.num_shaders); - vr_script_get_shaders(m_testCaseData.script, - m_testCaseData.source, - m_testCaseData.shaders); - vr_config_free(config); - return true; -} - -TestInstance* VkRunnerTestCase::createInstance(Context& ctx) const -{ - if (m_testCaseData.script == DE_NULL) - TCU_THROW(InternalError, "Could not find script file"); - - return new VkRunnerTestInstance(ctx, m_testCaseData); -} - -void VkRunnerTestCase::initPrograms(vk::SourceCollections& programCollection) const -{ - int num_shader[VR_SHADER_STAGE_N_STAGES] = {0}; - - for (int i = 0; i < m_testCaseData.num_shaders; i++) - { - num_shader[m_testCaseData.shaders[i].stage]++; - if (num_shader[m_testCaseData.shaders[i].stage] > 1) - TCU_THROW(InternalError, "Multiple shaders per stage are not currently supported"); - - /* We ignore the SPIR-V shaders in binary form */ - if (m_testCaseData.shaders[i].source_type == VR_SCRIPT_SOURCE_TYPE_GLSL) - { - switch (m_testCaseData.shaders[i].stage) - { - case VR_SHADER_STAGE_VERTEX: - programCollection.glslSources.add(vr_stage_name[m_testCaseData.shaders[i].stage]) << glu::VertexSource(m_testCaseData.shaders[i].source); - break; - case VR_SHADER_STAGE_TESS_CTRL: - programCollection.glslSources.add(vr_stage_name[m_testCaseData.shaders[i].stage]) << glu::TessellationControlSource(m_testCaseData.shaders[i].source); - break; - case VR_SHADER_STAGE_TESS_EVAL: - programCollection.glslSources.add(vr_stage_name[m_testCaseData.shaders[i].stage]) << glu::TessellationEvaluationSource(m_testCaseData.shaders[i].source); - break; - case VR_SHADER_STAGE_GEOMETRY: - programCollection.glslSources.add(vr_stage_name[m_testCaseData.shaders[i].stage]) << glu::GeometrySource(m_testCaseData.shaders[i].source); - break; - case VR_SHADER_STAGE_FRAGMENT: - programCollection.glslSources.add(vr_stage_name[m_testCaseData.shaders[i].stage]) << glu::FragmentSource(m_testCaseData.shaders[i].source); - break; - case VR_SHADER_STAGE_COMPUTE: - programCollection.glslSources.add(vr_stage_name[m_testCaseData.shaders[i].stage]) << glu::ComputeSource(m_testCaseData.shaders[i].source); - break; - default: - assert(0 && "Shader type is not supported"); - } - } else if (m_testCaseData.shaders[i].source_type == VR_SCRIPT_SOURCE_TYPE_SPIRV) - { - programCollection.spirvAsmSources.add(vr_stage_name[m_testCaseData.shaders[i].stage]) << m_testCaseData.shaders[i].source; - } - } -} - -tcu::TestStatus VkRunnerTestInstance::iterate (void) -{ - /* Get the compiled version of the text-based shaders and replace them */ - for (int stage = 0; stage < VR_SHADER_STAGE_N_STAGES; stage++) - { - std::string name(vr_stage_name[stage]); - if (!m_context.getBinaryCollection().contains(name)) - continue; - size_t source_length = m_context.getBinaryCollection().get(name).getSize(); - unsigned *source = (unsigned *) deMalloc(source_length); - deMemcpy(source, - m_context.getBinaryCollection().get(name).getBinary(), - source_length); - vr_script_replace_shaders_stage_binary(m_testCaseData.script, - (enum vr_shader_stage)stage, - source_length, - source); - deFree(source); - } - - /* Replace text-based shaders by their binary equivalent and execute the test */ - vr_result res = vr_executor_execute_script(m_context.getExecutor(), m_testCaseData.script); - - switch (res) - { - case VR_RESULT_FAIL: - return tcu::TestStatus::fail("Fail"); - case VR_RESULT_PASS: - return tcu::TestStatus::pass("Pass"); - case VR_RESULT_SKIP: - return tcu::TestStatus::incomplete(); - } - - return tcu::TestStatus::fail("Fail"); -} - -} // vkrunner -} // vkt diff --git a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerTestCase.hpp b/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerTestCase.hpp deleted file mode 100644 index 19eec5f958..0000000000 --- a/external/vulkancts/modules/vulkan/vkrunner/vktVkRunnerTestCase.hpp +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef _VKTVKRUNNERTESTCASE_HPP -#define _VKTVKRUNNERTESTCASE_HPP -/*------------------------------------------------------------------------ - * Vulkan Conformance Tests - * ------------------------ - * - * Copyright (c) 2018 Intel Corporation - * - * 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. - * - *//*! - * \file - * \brief Functional tests using vkrunner - *//*--------------------------------------------------------------------*/ - -#include "tcuDefs.hpp" -#include "tcuTestCase.hpp" -#include "vktTestCase.hpp" - -struct vr_source; -struct vr_script; -struct vr_script_shader_code; - -namespace vkt -{ -namespace vkrunner -{ - -struct TestCaseData -{ - std::string categoryname; - std::string filename; - int num_shaders; - struct vr_source *source; - struct vr_script *script; - struct vr_script_shader_code *shaders; -}; - -class VkRunnerTestInstance : public TestInstance -{ -public: - VkRunnerTestInstance (Context& context, const TestCaseData& testCaseData) - : TestInstance(context), - m_testCaseData(testCaseData) - { - } - - virtual tcu::TestStatus iterate (void); - -private: - TestCaseData m_testCaseData; -}; - -class VkRunnerTestCase : public TestCase -{ -public: - VkRunnerTestCase (tcu::TestContext& testCtx, - const char* categoryname, - const char* filename, - const char* name, - const char* description); - - ~VkRunnerTestCase (void); - - void addTokenReplacement(const char *token, - const char *replacement); - - bool getShaders(); - - virtual TestInstance* createInstance (Context& ctx) const; - - void initPrograms(vk::SourceCollections& programCollection) const; - -private: - TestCaseData m_testCaseData; -}; - -} // vkrunner -} // vkt - -#endif // _VKTVKRUNNERTESTCASE_HPP diff --git a/external/vulkancts/modules/vulkan/vktTestCase.cpp b/external/vulkancts/modules/vulkan/vktTestCase.cpp index c2e1d6f2a7..b1bdb8c974 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.cpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.cpp @@ -36,7 +36,6 @@ #include "deSTLUtil.hpp" #include "deMemory.h" -#include #include @@ -603,18 +602,6 @@ vk::Allocator* createAllocator (DefaultDevice* device) // Context -void Context::errorCb(const char* message, - void* user_data) -{ - Context* context = (Context*) user_data; - - context->getTestContext().getLog() - << tcu::TestLog::Message - << message - << "\n" - << tcu::TestLog::EndMessage; -} - Context::Context (tcu::TestContext& testCtx, const vk::PlatformInterface& platformInterface, vk::BinaryCollection& progCollection) @@ -624,22 +611,10 @@ Context::Context (tcu::TestContext& testCtx, , m_device (new DefaultDevice(m_platformInterface, testCtx.getCommandLine())) , m_allocator (createAllocator(m_device.get())) { - m_config = vr_config_new(); - vr_config_set_user_data(m_config, this); - vr_config_set_error_cb(m_config, errorCb); - m_executor = vr_executor_new(m_config); - vr_executor_set_device(m_executor, - getInstanceProc, - this, - getPhysicalDevice(), - getUniversalQueueFamilyIndex(), - getDevice()); } Context::~Context (void) { - vr_config_free(m_config); - vr_executor_free(m_executor); } deUint32 Context::getAvailableInstanceVersion (void) const { return m_device->getAvailableInstanceVersion(); } @@ -687,8 +662,6 @@ deUint32 Context::getSparseQueueFamilyIndex (void) const { return m_devi vk::VkQueue Context::getSparseQueue (void) const { return m_device->getSparseQueue(); } vk::Allocator& Context::getDefaultAllocator (void) const { return *m_allocator; } deUint32 Context::getUsedApiVersion (void) const { return m_device->getUsedApiVersion(); } -vr_executor* Context::getExecutor (void) const - { return m_executor; } bool Context::contextSupports (const deUint32 majorNum, const deUint32 minorNum, const deUint32 patchNum) const { return m_device->getUsedApiVersion() >= VK_MAKE_VERSION(majorNum, minorNum, patchNum); } bool Context::contextSupports (const ApiVersion version) const @@ -796,12 +769,6 @@ bool Context::requireDeviceCoreFeature (const DeviceCoreFeature requiredFeature) return true; } -void* Context::getInstanceProc (const char* name, void* user_data) -{ - Context *context = (Context*) user_data; - return (void*) context->m_platformInterface.getInstanceProcAddr(context->getInstance(), name); -} - void* Context::getInstanceProcAddr () { return (void*)m_platformInterface.getGetInstanceProcAddr(); diff --git a/external/vulkancts/modules/vulkan/vktTestCase.hpp b/external/vulkancts/modules/vulkan/vktTestCase.hpp index 0f84c8ac22..1cfc22af0e 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.hpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.hpp @@ -31,9 +31,6 @@ #include "vkApiVersion.hpp" #include "vktTestCaseDefs.hpp" -struct vr_executor; -struct vr_config; - namespace glu { struct ProgramSources; @@ -109,7 +106,6 @@ class Context deUint32 getSparseQueueFamilyIndex (void) const; vk::VkQueue getSparseQueue (void) const; vk::Allocator& getDefaultAllocator (void) const; - vr_executor* getExecutor (void) const; bool contextSupports (const deUint32 majorNum, const deUint32 minorNum, const deUint32 patchNum) const; bool contextSupports (const vk::ApiVersion version) const; bool contextSupports (const deUint32 requiredApiVersionBits) const; @@ -127,15 +123,9 @@ class Context const de::UniquePtr m_device; const de::UniquePtr m_allocator; - vr_executor* m_executor; - vr_config* m_config; - private: Context (const Context&); // Not allowed Context& operator= (const Context&); // Not allowed - - static void* getInstanceProc (const char* name, void* user_data); - static void errorCb (const char *message, void *user_data); }; class TestInstance; diff --git a/external/vulkancts/modules/vulkan/vktTestPackage.cpp b/external/vulkancts/modules/vulkan/vktTestPackage.cpp index a34ec68c62..5d0fbfb81b 100644 --- a/external/vulkancts/modules/vulkan/vktTestPackage.cpp +++ b/external/vulkancts/modules/vulkan/vktTestPackage.cpp @@ -88,9 +88,8 @@ #include "vktProtectedMemTests.hpp" #include "vktDeviceGroupTests.hpp" #include "vktMemoryModelTests.hpp" -#include "vktVkRunnerExampleTests.hpp" -#include "vktVkRunnerGraphicsFuzzTests.hpp" #include "vktAmberExampleTests.hpp" +#include "vktAmberGraphicsFuzzTests.hpp" #include #include @@ -499,9 +498,8 @@ void TestPackage::init (void) addChild(DeviceGroup::createTests (m_testCtx)); addChild(MemoryModel::createTests (m_testCtx)); addChild(conditional::createTests (m_testCtx)); - addChild(vkrunner::createTests (m_testCtx)); - addChild(vkrunner::createGraphicsFuzzTests (m_testCtx)); addChild(cts_amber::createExampleTests (m_testCtx)); + addChild(cts_amber::createGraphicsFuzzTests (m_testCtx)); } } // vkt diff --git a/external/vulkancts/mustpass/1.1.4/src/excluded-tests.txt b/external/vulkancts/mustpass/1.1.4/src/excluded-tests.txt index 045381be34..dc641fe6f9 100644 --- a/external/vulkancts/mustpass/1.1.4/src/excluded-tests.txt +++ b/external/vulkancts/mustpass/1.1.4/src/excluded-tests.txt @@ -28,9 +28,6 @@ dEQP-VK.glsl.texture_functions.texture.sparse_usampler3d_bias_fragment # New tests from AOSP dEQP-VK.texture.explicit_lod.* -# Excluded VkRunner example tests -dEQP-VK.vkrunner-example.* - # Excluded Amber example tests dEQP-VK.amber-example.*