#include "xsDefs.hpp"
#include "xsProtocol.hpp"
#include "deSocket.hpp"
+#include "deUniquePtr.hpp"
#include "deString.h"
namespace xs
{
-typedef std::auto_ptr<Message> ScopedMsgPtr;
+typedef de::UniquePtr<Message> ScopedMsgPtr;
class SocketError : public Error
{
#include "deBlockBuffer.hpp"
#include "deThread.hpp"
#include "deStringUtil.hpp"
+#include "deUniquePtr.hpp"
#include "deClock.h"
#include "deProcess.h"
namespace xs
{
-typedef std::auto_ptr<Message> ScopedMsgPtr;
+typedef de::UniquePtr<Message> ScopedMsgPtr;
class SocketError : public Error
{
#include "deCommandLine.hpp"
#include "deDirectoryIterator.hpp"
#include "deStringUtil.hpp"
+#include "deUniquePtr.hpp"
#include "deString.h"
readLogFile(&batchResult, cmdLine.inFile.c_str());
// Initialize commLink.
- std::auto_ptr<xe::CommLink> commLink(createCommLink(cmdLine));
+ de::UniquePtr<xe::CommLink> commLink(createCommLink(cmdLine));
xe::BatchExecutor executor(cmdLine.targetCfg, commLink.get(), &root, testSet, &batchResult, &infoLog);
* be lost! Modify the generating script instead.
*/
m_vk.createInstance = (CreateInstanceFunc) GET_PROC_ADDR("vkCreateInstance");
-m_vk.getInstanceProcAddr = (GetInstanceProcAddrFunc) GET_PROC_ADDR("vkGetInstanceProcAddr");
m_vk.enumerateInstanceExtensionProperties = (EnumerateInstanceExtensionPropertiesFunc) GET_PROC_ADDR("vkEnumerateInstanceExtensionProperties");
m_vk.enumerateInstanceLayerProperties = (EnumerateInstanceLayerPropertiesFunc) GET_PROC_ADDR("vkEnumerateInstanceLayerProperties");
PlatformDriver::PlatformDriver (const tcu::FunctionLibrary& library)
{
-#define GET_PROC_ADDR(NAME) library.getFunction(NAME)
+ m_vk.getInstanceProcAddr = (GetInstanceProcAddrFunc)library.getFunction("vkGetInstanceProcAddr");
+
+#define GET_PROC_ADDR(NAME) m_vk.getInstanceProcAddr(DE_NULL, NAME)
#include "vkInitPlatformFunctionPointers.inl"
#undef GET_PROC_ADDR
}
}
}
- if (limits->viewportBoundsRange[0] > -2 * limits->maxViewportDimensions[0])
+ if (limits->viewportBoundsRange[0] > float(-2 * limits->maxViewportDimensions[0]))
{
log << TestLog::Message << "limit validation failed, viewPortBoundsRange[0] of " << limits->viewportBoundsRange[0]
<< "is larger than -2*maxViewportDimension[0] of " << -2*limits->maxViewportDimensions[0] << TestLog::EndMessage;
limitsOk = false;
}
- if (limits->viewportBoundsRange[1] < 2 * limits->maxViewportDimensions[1] - 1)
+ if (limits->viewportBoundsRange[1] < float(2 * limits->maxViewportDimensions[1] - 1))
{
log << TestLog::Message << "limit validation failed, viewportBoundsRange[1] of " << limits->viewportBoundsRange[1]
<< "is less than 2*maxViewportDimension[1] of " << 2*limits->maxViewportDimensions[1] << TestLog::EndMessage;
"VK_KHR_maintenance1",
"VK_KHR_push_descriptor",
"VK_KHR_descriptor_update_template",
+ "VK_KHR_incremental_present",
};
checkKhrExtensions(results, extensions, DE_LENGTH_OF_ARRAY(s_allowedDeviceKhrExtensions), s_allowedDeviceKhrExtensions);
if (isCompressedFormat(format) && (imageType == VK_IMAGE_TYPE_1D || imageType == VK_IMAGE_TYPE_3D))
return false;
+ // Support for 1D and 3D depth/stencil textures is optional
+ if (isDepthStencilFormat(format) && (imageType == VK_IMAGE_TYPE_1D || imageType == VK_IMAGE_TYPE_3D))
+ return false;
+
DE_ASSERT(deviceFeatures.sparseBinding || (createFlags & (VK_IMAGE_CREATE_SPARSE_BINDING_BIT|VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT)) == 0);
DE_ASSERT(deviceFeatures.sparseResidencyAliased || (createFlags & VK_IMAGE_CREATE_SPARSE_ALIASED_BIT) == 0);
if (!isSupportedSamplableFormat(context.getInstanceInterface(), context.getPhysicalDevice(), imageFormat))
throw tcu::NotSupportedError(std::string("Unsupported format for sampling: ") + getFormatName(imageFormat));
+ if ((deUint32)imageCount > context.getDeviceProperties().limits.maxColorAttachments)
+ throw tcu::NotSupportedError(std::string("Unsupported render target count: ") + de::toString(imageCount));
+
if ((samplerParams.minFilter == VK_FILTER_LINEAR ||
samplerParams.magFilter == VK_FILTER_LINEAR ||
samplerParams.mipmapMode == VK_SAMPLER_MIPMAP_MODE_LINEAR) &&
template <typename T0 = Void, typename T1 = Void, typename T2 = Void, typename T3 = Void>
struct Tuple4
{
- explicit Tuple4 (const T0& e0 = T0(),
- const T1& e1 = T1(),
- const T2& e2 = T2(),
- const T3& e3 = T3())
+ explicit Tuple4 (const T0 e0 = T0(),
+ const T1 e1 = T1(),
+ const T2 e2 = T2(),
+ const T3 e3 = T3())
: a (e0)
, b (e1)
, c (e2)
else
throw tcu::TestError("invalid data type for u_arr");
- instance.addUniform(5u, vk::VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, sizeof(Vec4) * 4, arr[0].getPtr());
+ instance.addUniform(5u, vk::VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, sizeof(Vec4) * 4, arr[0].getPtr());
}
}
"OpDecorate %id BuiltIn GlobalInvocationId\n"
- + string(s_InputOutputBufferTraits) + string(s_CommonTypes) + string(s_InputOutputBuffer) +
+ + string(s_InputOutputBufferTraits) + string(s_CommonTypes) +
+ "%uvec2 = OpTypeVector %u32 2\n"
+ "%bvec3 = OpTypeVector %bool 3\n"
+ "%fvec4 = OpTypeVector %f32 4\n"
+ "%fmat33 = OpTypeMatrix %fvec3 3\n"
+ "%const100 = OpConstant %u32 100\n"
+ "%uarr100 = OpTypeArray %i32 %const100\n"
+ "%struct = OpTypeStruct %f32 %i32 %u32\n"
+ "%pointer = OpTypePointer Function %i32\n"
+ + string(s_InputOutputBuffer) +
- "${TYPE}\n"
- "%null = OpConstantNull %type\n"
+ "%null = OpConstantNull ${TYPE}\n"
"%id = OpVariable %uvec3ptr Input\n"
"%zero = OpConstant %i32 0\n"
" OpReturn\n"
" OpFunctionEnd\n");
- cases.push_back(CaseParameter("bool", "%type = OpTypeBool"));
- cases.push_back(CaseParameter("sint32", "%type = OpTypeInt 32 1"));
- cases.push_back(CaseParameter("uint32", "%type = OpTypeInt 32 0"));
- cases.push_back(CaseParameter("float32", "%type = OpTypeFloat 32"));
- cases.push_back(CaseParameter("vec4float32", "%type = OpTypeVector %f32 4"));
- cases.push_back(CaseParameter("vec3bool", "%type = OpTypeVector %bool 3"));
- cases.push_back(CaseParameter("vec2uint32", "%type = OpTypeVector %u32 2"));
- cases.push_back(CaseParameter("matrix", "%type = OpTypeMatrix %fvec3 3"));
- cases.push_back(CaseParameter("array", "%100 = OpConstant %u32 100\n"
- "%type = OpTypeArray %i32 %100"));
- cases.push_back(CaseParameter("struct", "%type = OpTypeStruct %f32 %i32 %u32"));
- cases.push_back(CaseParameter("pointer", "%type = OpTypePointer Function %i32"));
+ cases.push_back(CaseParameter("bool", "%bool"));
+ cases.push_back(CaseParameter("sint32", "%i32"));
+ cases.push_back(CaseParameter("uint32", "%u32"));
+ cases.push_back(CaseParameter("float32", "%f32"));
+ cases.push_back(CaseParameter("vec4float32", "%fvec4"));
+ cases.push_back(CaseParameter("vec3bool", "%bvec3"));
+ cases.push_back(CaseParameter("vec2uint32", "%uvec2"));
+ cases.push_back(CaseParameter("matrix", "%fmat33"));
+ cases.push_back(CaseParameter("array", "%uarr100"));
+ cases.push_back(CaseParameter("struct", "%struct"));
+ cases.push_back(CaseParameter("pointer", "%pointer"));
fillRandomScalars(rnd, 1.f, 100.f, &positiveFloats[0], numElements);
"OpDecorate %id BuiltIn GlobalInvocationId\n"
- + string(s_InputOutputBufferTraits) + string(s_CommonTypes) + string(s_InputOutputBuffer) +
-
- "${TYPE}\n"
-
+ + string(s_InputOutputBufferTraits) + string(s_CommonTypes) +
+ "%uvec2 = OpTypeVector %u32 2\n"
+ "%fvec4 = OpTypeVector %f32 4\n"
+ "%fmat33 = OpTypeMatrix %fvec3 3\n"
+ "%image = OpTypeImage %f32 2D 0 0 0 1 Unknown\n"
+ "%sampler = OpTypeSampler\n"
+ "%simage = OpTypeSampledImage %image\n"
+ "%const100 = OpConstant %u32 100\n"
+ "%uarr100 = OpTypeArray %i32 %const100\n"
+ "%struct = OpTypeStruct %f32 %i32 %u32\n"
+ "%pointer = OpTypePointer Function %i32\n"
+ + string(s_InputOutputBuffer) +
"%id = OpVariable %uvec3ptr Input\n"
"%zero = OpConstant %i32 0\n"
"%main = OpFunction %void None %voidf\n"
"%label = OpLabel\n"
- "%undef = OpUndef %type\n"
+ "%undef = OpUndef ${TYPE}\n"
"%idval = OpLoad %uvec3 %id\n"
"%x = OpCompositeExtract %u32 %idval 0\n"
" OpReturn\n"
" OpFunctionEnd\n");
- cases.push_back(CaseParameter("bool", "%type = OpTypeBool"));
- cases.push_back(CaseParameter("sint32", "%type = OpTypeInt 32 1"));
- cases.push_back(CaseParameter("uint32", "%type = OpTypeInt 32 0"));
- cases.push_back(CaseParameter("float32", "%type = OpTypeFloat 32"));
- cases.push_back(CaseParameter("vec4float32", "%type = OpTypeVector %f32 4"));
- cases.push_back(CaseParameter("vec2uint32", "%type = OpTypeVector %u32 2"));
- cases.push_back(CaseParameter("matrix", "%type = OpTypeMatrix %fvec3 3"));
- cases.push_back(CaseParameter("image", "%type = OpTypeImage %f32 2D 0 0 0 1 Unknown"));
- cases.push_back(CaseParameter("sampler", "%type = OpTypeSampler"));
- cases.push_back(CaseParameter("sampledimage", "%img = OpTypeImage %f32 2D 0 0 0 1 Unknown\n"
- "%type = OpTypeSampledImage %img"));
- cases.push_back(CaseParameter("array", "%100 = OpConstant %u32 100\n"
- "%type = OpTypeArray %i32 %100"));
- cases.push_back(CaseParameter("runtimearray", "%type = OpTypeRuntimeArray %f32"));
- cases.push_back(CaseParameter("struct", "%type = OpTypeStruct %f32 %i32 %u32"));
- cases.push_back(CaseParameter("pointer", "%type = OpTypePointer Function %i32"));
+ cases.push_back(CaseParameter("bool", "%bool"));
+ cases.push_back(CaseParameter("sint32", "%i32"));
+ cases.push_back(CaseParameter("uint32", "%u32"));
+ cases.push_back(CaseParameter("float32", "%f32"));
+ cases.push_back(CaseParameter("vec4float32", "%fvec4"));
+ cases.push_back(CaseParameter("vec2uint32", "%uvec2"));
+ cases.push_back(CaseParameter("matrix", "%fmat33"));
+ cases.push_back(CaseParameter("image", "%image"));
+ cases.push_back(CaseParameter("sampler", "%sampler"));
+ cases.push_back(CaseParameter("sampledimage", "%simage"));
+ cases.push_back(CaseParameter("array", "%uarr100"));
+ cases.push_back(CaseParameter("runtimearray", "%f32arr"));
+ cases.push_back(CaseParameter("struct", "%struct"));
+ cases.push_back(CaseParameter("pointer", "%pointer"));
fillRandomScalars(rnd, 1.f, 100.f, &positiveFloats[0], numElements);
getDefaultColors(defaultColors);
// First, simple cases that don't do anything with the OpUndef result.
- fragments["testfun"] =
- "%test_code = OpFunction %v4f32 None %v4f32_function\n"
- "%param1 = OpFunctionParameter %v4f32\n"
- "%label_testfun = OpLabel\n"
- "%undef = OpUndef %type\n"
- "OpReturnValue %param1\n"
- "OpFunctionEnd\n"
- ;
- struct NameCodePair { string name, code; };
+ struct NameCodePair { string name, decl, type; };
const NameCodePair tests[] =
{
- {"bool", "%type = OpTypeBool"},
- {"vec2uint32", "%type = OpTypeVector %u32 2"},
- {"image", "%type = OpTypeImage %f32 2D 0 0 0 1 Unknown"},
- {"sampler", "%type = OpTypeSampler"},
- {"sampledimage", "%img = OpTypeImage %f32 2D 0 0 0 1 Unknown\n" "%type = OpTypeSampledImage %img"},
- {"pointer", "%type = OpTypePointer Function %i32"},
- {"runtimearray", "%type = OpTypeRuntimeArray %f32"},
- {"array", "%c_u32_100 = OpConstant %u32 100\n" "%type = OpTypeArray %i32 %c_u32_100"},
- {"struct", "%type = OpTypeStruct %f32 %i32 %u32"}};
+ {"bool", "", "%bool"},
+ {"vec2uint32", "%type = OpTypeVector %u32 2", "%type"},
+ {"image", "%type = OpTypeImage %f32 2D 0 0 0 1 Unknown", "%type"},
+ {"sampler", "%type = OpTypeSampler", "%type"},
+ {"sampledimage", "%img = OpTypeImage %f32 2D 0 0 0 1 Unknown\n" "%type = OpTypeSampledImage %img", "%type"},
+ {"pointer", "", "%fp_i32"},
+ {"runtimearray", "%type = OpTypeRuntimeArray %f32", "%type"},
+ {"array", "%c_u32_100 = OpConstant %u32 100\n" "%type = OpTypeArray %i32 %c_u32_100", "%type"},
+ {"struct", "%type = OpTypeStruct %f32 %i32 %u32", "%type"}};
for (size_t testNdx = 0; testNdx < sizeof(tests) / sizeof(NameCodePair); ++testNdx)
{
- fragments["pre_main"] = tests[testNdx].code;
+ fragments["undef_type"] = tests[testNdx].type;
+ fragments["testfun"] = StringTemplate(
+ "%test_code = OpFunction %v4f32 None %v4f32_function\n"
+ "%param1 = OpFunctionParameter %v4f32\n"
+ "%label_testfun = OpLabel\n"
+ "%undef = OpUndef ${undef_type}\n"
+ "OpReturnValue %param1\n"
+ "OpFunctionEnd\n").specialize(fragments);
+ fragments["pre_main"] = tests[testNdx].decl;
createTestsForAllStages(tests[testNdx].name, defaultColors, defaultColors, fragments, opUndefTests.get());
}
fragments.clear();
vector<BlockDataPtr> mappedBlockPtrs;
// Upload base buffers
+ const std::vector<int> bufferSizes = computeBufferSizes(m_interface, m_refLayout);
{
- const std::vector<int> bufferSizes = computeBufferSizes(m_interface, m_refLayout);
std::vector<void*> mapPtrs;
std::vector<BlockLocation> blockLocations (numBlocks);
vk.cmdDispatch(*cmdBuffer, 1, 1, 1);
+ // Add barriers for shader writes to storage buffers before host access
+ std::vector<vk::VkBufferMemoryBarrier> barriers;
+ if (m_bufferMode == SSBOLayoutCase::BUFFERMODE_PER_BLOCK)
+ {
+ for (int blockNdx = 0; blockNdx < numBlocks; blockNdx++)
+ {
+ const vk::VkBuffer uniformBuffer = m_uniformBuffers[blockNdx].get()->get();
+
+ const vk::VkBufferMemoryBarrier barrier =
+ {
+ vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER,
+ DE_NULL,
+ vk::VK_ACCESS_SHADER_WRITE_BIT,
+ vk::VK_ACCESS_HOST_READ_BIT,
+ VK_QUEUE_FAMILY_IGNORED,
+ VK_QUEUE_FAMILY_IGNORED,
+ uniformBuffer,
+ 0u,
+ static_cast<vk::VkDeviceSize>(bufferSizes[blockNdx])
+ };
+ barriers.push_back(barrier);
+ }
+ }
+ else
+ {
+ const vk::VkBuffer uniformBuffer = m_uniformBuffers[0].get()->get();
+
+ vk::VkDeviceSize totalSize = 0;
+ for (size_t bufferNdx = 0; bufferNdx < bufferSizes.size(); bufferNdx++)
+ totalSize += bufferSizes[bufferNdx];
+
+ const vk::VkBufferMemoryBarrier barrier =
+ {
+ vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER,
+ DE_NULL,
+ vk::VK_ACCESS_SHADER_WRITE_BIT,
+ vk::VK_ACCESS_HOST_READ_BIT,
+ VK_QUEUE_FAMILY_IGNORED,
+ VK_QUEUE_FAMILY_IGNORED,
+ uniformBuffer,
+ 0u,
+ totalSize
+ };
+ barriers.push_back(barrier);
+ }
+ vk.cmdPipelineBarrier(*cmdBuffer, vk::VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT, (vk::VkDependencyFlags)0,
+ 0u, DE_NULL, static_cast<deUint32>(barriers.size()), &barriers[0], 0u, DE_NULL);
+
VK_CHECK(vk.endCommandBuffer(*cmdBuffer));
const vk::VkFenceCreateInfo fenceParams =
renderedFrame.getAccess(), renderedAnisotropyFrame.getAccess(), 0.05f, tcu::COMPARE_LOG_RESULT))
return tcu::TestStatus::fail("Fail");
- if (floatThresholdCompare (m_context.getTestContext().getLog(), "Expecting comparison to fail", "Expecting comparison to fail",
- renderedFrame.getAccess(), renderedAnisotropyFrame.getAccess(), Vec4(0.05f), tcu::COMPARE_LOG_RESULT))
- return tcu::TestStatus::fail("Fail");
+ // Anisotropic filtering is implementation dependent. Expecting differences with minification/magnification filter set to NEAREST is too strict.
+ if (m_refParams.minFilter != tcu::Sampler::NEAREST && m_refParams.magFilter != tcu::Sampler::NEAREST)
+ {
+ if (floatThresholdCompare (m_context.getTestContext().getLog(), "Expecting comparison to fail", "Expecting comparison to fail",
+ renderedFrame.getAccess(), renderedAnisotropyFrame.getAccess(), Vec4(0.05f), tcu::COMPARE_LOG_RESULT))
+ return tcu::TestStatus::fail("Fail");
+ }
}
return tcu::TestStatus::pass("Pass");
}
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.sparse_level_1
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.level_2
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.sparse_level_2
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.sparse_clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.repeat_mirrored_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.sparse_repeat_mirrored_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.mirrored_repeat_clamp_to_edge
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_nearest_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_nearest_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_nearest_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_nearest_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.level_1
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.sparse_level_1
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.level_2
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.sparse_level_2
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.sparse_clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.repeat_mirrored_repeat
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.sparse_level_1
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.level_2
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.sparse_level_2
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.sparse_clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.repeat_mirrored_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.sparse_repeat_mirrored_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.mirrored_repeat_clamp_to_edge
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_nearest_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_nearest_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_nearest_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_nearest_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.level_1
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.sparse_level_1
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.level_2
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.sparse_level_2
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.sparse_clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.repeat_mirrored_repeat
--- /dev/null
+#
+# VK-GL-CTS Issue #336
+#
+# This occurs on some versions of Imagination Technologies G6200, G6230, G6400, and G6430
+# Rogue Series 6 GPU's.
+#
+# The affected GPU's are unable to correctly filter CEM corners with F32 textures, this
+# includes the ability to gather texels for texel gather instructions.
+#
+# An application using gather on an F32 texture would obtain incorrect texel values around
+# the corners of the cubemap.
+#
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.clamp_to_edge_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_clamp_to_edge_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.repeat_mirrored_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_repeat_mirrored_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_mirrored_repeat_clamp_to_edge
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.clamp_to_edge_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_clamp_to_edge_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.repeat_mirrored_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_repeat_mirrored_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.clamp_to_edge_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_clamp_to_edge_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.repeat_mirrored_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_repeat_mirrored_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_mirrored_repeat_clamp_to_edge
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.clamp_to_edge_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_clamp_to_edge_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.repeat_mirrored_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_repeat_mirrored_repeat
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_nearest_mipmap_nearest_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_nearest_mipmap_nearest_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_nearest_mipmap_linear_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_nearest_mipmap_linear_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mipmap_nearest_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mipmap_nearest_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mipmap_linear_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mipmap_linear_mag_linear
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.level_1
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.sparse_level_1
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.level_2
+dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.sparse_level_2
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.sparse_level_1
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.level_2
dEQP-VK.glsl.texture_gather.basic.cube.rgba8i.base_level.sparse_level_2
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_less.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_pot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_less.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_clamp_to_edge_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_repeat_mirrored_repeat
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.size_npot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.sparse_clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_pot.compare_less.repeat_mirrored_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.sparse_repeat_mirrored_repeat
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.mirrored_repeat_clamp_to_edge
dEQP-VK.glsl.texture_gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.sparse_mirrored_repeat_clamp_to_edge
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_nearest_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_nearest_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_nearest_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_nearest_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mipmap_nearest_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.min_linear_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.filter_mode.sparse_min_linear_mipmap_linear_mag_linear
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.level_1
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.sparse_level_1
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.level_2
-dEQP-VK.glsl.texture_gather.basic.cube.depth32f.base_level.sparse_level_2
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.sparse_clamp_to_edge_repeat
dEQP-VK.glsl.texture_gather.offset.min_required_offset.2d.rgba8.size_pot.repeat_mirrored_repeat
from build.common import DEQP_DIR
from build.config import ANY_GENERATOR
from build_caselists import Module, getModuleByName, getBuildConfig, DEFAULT_BUILD_DIR, DEFAULT_TARGET
-from mustpass import Project, Package, Mustpass, Configuration, include, exclude, genMustpassLists
+from mustpass import Project, Package, Mustpass, Configuration, include, exclude, genMustpassLists, parseBuildConfigFromCmdLineArgs
COPYRIGHT_DECLARATION = """
Licensed under the Apache License, Version 2.0 (the "License");
filters = [include("master.txt"),
exclude("test-issues.txt"),
exclude("excluded-tests.txt"),
- exclude("android-tests.txt")]),
+ exclude("android-tests.txt"),
+ exclude("waivers.txt")]),
])
MUSTPASS_LISTS = [
]
if __name__ == "__main__":
- genMustpassLists(MUSTPASS_LISTS, ANY_GENERATOR, BUILD_CONFIG)
+ genMustpassLists(MUSTPASS_LISTS, ANY_GENERATOR, parseBuildConfigFromCmdLineArgs())
def writeFunctionPointers (api, filename, functionTypes):
writeInlFile(filename, INL_HEADER, indentLines(["%s\t%s;" % (getFunctionTypeName(function), getInterfaceName(function)) for function in api.functions if function.getType() in functionTypes]))
-def writeInitFunctionPointers (api, filename, functionTypes):
+def writeInitFunctionPointers (api, filename, functionTypes, cond = None):
def makeInitFunctionPointers ():
for function in api.functions:
- if function.getType() in functionTypes:
+ if function.getType() in functionTypes and (cond == None or cond(function)):
yield "m_vk.%s\t= (%s)\tGET_PROC_ADDR(\"%s\");" % (getInterfaceName(function), getFunctionTypeName(function), function.name)
writeInlFile(filename, INL_HEADER, indentLines(makeInitFunctionPointers()))
writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkPlatformFunctionPointers.inl"), functionTypes = platformFuncs)
writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInstanceFunctionPointers.inl"), functionTypes = instanceFuncs)
writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkDeviceFunctionPointers.inl"), functionTypes = deviceFuncs)
- writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitPlatformFunctionPointers.inl"), functionTypes = platformFuncs)
+ writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitPlatformFunctionPointers.inl"), functionTypes = platformFuncs, cond = lambda f: f.name != "vkGetInstanceProcAddr")
writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitInstanceFunctionPointers.inl"), functionTypes = instanceFuncs)
writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitDeviceFunctionPointers.inl"), functionTypes = deviceFuncs)
writeFuncPtrInterfaceImpl (api, os.path.join(VULKAN_DIR, "vkPlatformDriverImpl.inl"), functionTypes = platformFuncs, className = "PlatformDriver")
static inline int mirror (int a)
{
- return a >= 0.0f ? a : -(1 + a);
+ return a >= 0 ? a : -(1 + a);
}
int wrap (Sampler::WrapMode mode, int c, int size)
static inline int mirror (int a)
{
- return a >= 0.0f ? a : -(1 + a);
+ return a >= 0 ? a : -(1 + a);
}
// Nearest-even rounding in case of tie (fractional part 0.5), otherwise ordinary rounding.
# \note Remove -Wno-sign-conversion for more warnings
set(WARNING_FLAGS "-Wall -Wextra -Wno-long-long -Wshadow -Wundef -Wconversion -Wno-sign-conversion")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_FLAGS} ${WARNING_FLAGS} -ansi -pedantic ")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_FLAGS} ${WARNING_FLAGS} -Wno-delete-non-virtual-dtor")
+ set(CMAKE_C_FLAGS "${TARGET_FLAGS} ${WARNING_FLAGS} ${CMAKE_C_FLAGS} -std=c90 -pedantic ")
+ set(CMAKE_CXX_FLAGS "${TARGET_FLAGS} ${WARNING_FLAGS} ${CMAKE_CXX_FLAGS} -std=c++03 -Wno-delete-non-virtual-dtor")
# Force compiler to generate code where integers have well defined overflow
# Turn on -Wstrict-overflow=5 and check all warnings before removing
if (texObj->getType() == Texture::TYPE_2D_ARRAY || texObj->getType() == Texture::TYPE_CUBE_MAP_ARRAY)
{
RC_IF_ERROR((layer < 0) || (layer >= GL_MAX_ARRAY_TEXTURE_LAYERS), GL_INVALID_VALUE, RC_RET_VOID);
- RC_IF_ERROR((level < 0) || (level > deFloatLog2(GL_MAX_TEXTURE_SIZE)), GL_INVALID_VALUE, RC_RET_VOID);
+ RC_IF_ERROR((level < 0) || (level > deLog2Floor32(GL_MAX_TEXTURE_SIZE)),GL_INVALID_VALUE, RC_RET_VOID);
}
else if (texObj->getType() == Texture::TYPE_3D)
{
RC_IF_ERROR((layer < 0) || (layer >= GL_MAX_3D_TEXTURE_SIZE), GL_INVALID_VALUE, RC_RET_VOID);
- RC_IF_ERROR((level < 0) || (level > deFloatLog2(GL_MAX_3D_TEXTURE_SIZE)), GL_INVALID_VALUE, RC_RET_VOID);
+ RC_IF_ERROR((level < 0) || (level > deLog2Floor32(GL_MAX_3D_TEXTURE_SIZE)), GL_INVALID_VALUE, RC_RET_VOID);
}
}
void start (void);
void join (void);
- void log (TestLog& log);
bool resultOk (void) { return m_isOk; }
m_contexts.clear();
}
-void TestThread::log (TestLog& testLog)
-{
- if (!m_isOk)
- testLog << TestLog::Message << "Thread failed: " << m_errorString << TestLog::EndMessage;
-}
-
void TestThread::start (void)
{
m_startBeginUs = deGetMicroseconds();
try
{
- std::auto_ptr<eglu::NativePixmap> pixmap (pixmapFactory.createPixmap(&nativeDisplay, display, config, DE_NULL, width, height));
+ de::UniquePtr<eglu::NativePixmap> pixmap (pixmapFactory.createPixmap(&nativeDisplay, display, config, DE_NULL, width, height));
EGLSurface eglSurface = createPixmapSurface(nativeDisplay, *pixmap, display, config, DE_NULL);
eglu::UniqueSurface surface (egl, display, eglSurface);
if (!state.verifyValidity(testCtx))
return;
- if (GLuint(state) < GLfloat(reference))
+ if (state < GLfloat(reference))
{
- testCtx.getLog() << TestLog::Message << "// ERROR: expected greater or equal to " << GLfloat(reference) << "; got " << GLuint(state) << TestLog::EndMessage;
+ testCtx.getLog() << TestLog::Message << "// ERROR: expected greater or equal to " << GLfloat(reference) << "; got " << state << TestLog::EndMessage;
if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid float value");
}
{
public:
BasicInvarianceTest (Context& ctx, const char* name, const char* desc, const std::string& vertexShader1, const std::string& vertexShader2);
- BasicInvarianceTest (Context& ctx, const char* name, const char* desc, const std::string& vertexShader1, const std::string& vertexShader2, const std::string& fragmentShader);
ShaderPair genShaders (void) const;
private:
{
}
-BasicInvarianceTest::BasicInvarianceTest (Context& ctx, const char* name, const char* desc, const std::string& vertexShader1, const std::string& vertexShader2, const std::string& fragmentShader)
- : InvarianceTest (ctx, name, desc)
- , m_vertexShader1 (vertexShader1)
- , m_vertexShader2 (vertexShader2)
- , m_fragmentShader (fragmentShader)
-{
-}
-
BasicInvarianceTest::ShaderPair BasicInvarianceTest::genShaders (void) const
{
ShaderPair retVal;
FEATURE_ARRAY_FIRST_ELEM_NAME_NO_INDEX = 1<<7
};
- UniformCase (Context& context, const char* name, const char* description, CaseShaderType caseType, const SharedPtr<const UniformCollection>& uniformCollection);
UniformCase (Context& context, const char* name, const char* description, CaseShaderType caseType, const SharedPtr<const UniformCollection>& uniformCollection, deUint32 features);
UniformCase (Context& context, const char* name, const char* description, deUint32 seed); // \note Randomizes caseType, uniformCollection and features.
virtual ~UniformCase (void);
{
}
-UniformCase::UniformCase (Context& context, const char* const name, const char* const description, const CaseShaderType caseShaderType, const SharedPtr<const UniformCollection>& uniformCollection)
- : TestCase (context, name, description)
- , CallLogWrapper (context.getRenderContext().getFunctions(), m_testCtx.getLog())
- , m_features (0)
- , m_uniformCollection (uniformCollection)
- , m_caseShaderType (caseShaderType)
-{
-}
-
UniformCase::UniformCase (Context& context, const char* name, const char* description, const deUint32 seed)
: TestCase (context, name, description)
, CallLogWrapper (context.getRenderContext().getFunctions(), m_testCtx.getLog())
template <typename T>
static tcu::Vector<T, 4> castVectorSaturate (const tcu::Vec4& in)
{
- return tcu::Vector<T, 4>((in.x() + 0.5f >= std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : ((in.x() - 0.5f <= std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.x()))),
- (in.y() + 0.5f >= std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : ((in.y() - 0.5f <= std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.y()))),
- (in.z() + 0.5f >= std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : ((in.z() - 0.5f <= std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.z()))),
- (in.w() + 0.5f >= std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : ((in.w() - 0.5f <= std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.w()))));
+ return tcu::Vector<T, 4>(((double)in.x() + 0.5 >= (double)std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : (((double)in.x() - 0.5 <= (double)std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.x()))),
+ ((double)in.y() + 0.5 >= (double)std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : (((double)in.y() - 0.5 <= (double)std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.y()))),
+ ((double)in.z() + 0.5 >= (double)std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : (((double)in.z() - 0.5 <= (double)std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.z()))),
+ ((double)in.w() + 0.5 >= (double)std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : (((double)in.w() - 0.5 <= (double)std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.w()))));
}
FlatColorShader::FlatColorShader (glu::DataType outputType)
if (!state.verifyValidity(testCtx))
return;
- if (GLuint(state) < GLfloat(reference))
+ if (state < GLfloat(reference))
{
- testCtx.getLog() << TestLog::Message << "// ERROR: expected greater or equal to " << GLfloat(reference) << "; got " << GLuint(state) << TestLog::EndMessage;
+ testCtx.getLog() << TestLog::Message << "// ERROR: expected greater or equal to " << GLfloat(reference) << "; got " << state << TestLog::EndMessage;
if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid float value");
}
{
public:
BasicInvarianceTest (Context& ctx, const char* name, const char* desc, const std::string& vertexShader1, const std::string& vertexShader2);
- BasicInvarianceTest (Context& ctx, const char* name, const char* desc, const std::string& vertexShader1, const std::string& vertexShader2, const std::string& fragmentShader);
ShaderPair genShaders (void) const;
private:
{
}
-BasicInvarianceTest::BasicInvarianceTest (Context& ctx, const char* name, const char* desc, const std::string& vertexShader1, const std::string& vertexShader2, const std::string& fragmentShader)
- : InvarianceTest (ctx, name, desc)
- , m_vertexShader1 (vertexShader1)
- , m_vertexShader2 (vertexShader2)
- , m_fragmentShader (fragmentShader)
-{
-}
-
BasicInvarianceTest::ShaderPair BasicInvarianceTest::genShaders (void) const
{
ShaderPair retVal;
FEATURE_ARRAY_FIRST_ELEM_NAME_NO_INDEX = 1<<9
};
- UniformCase (Context& context, const char* name, const char* description, CaseShaderType caseType, const SharedPtr<const UniformCollection>& uniformCollection);
UniformCase (Context& context, const char* name, const char* description, CaseShaderType caseType, const SharedPtr<const UniformCollection>& uniformCollection, deUint32 features);
UniformCase (Context& context, const char* name, const char* description, deUint32 seed); // \note Randomizes caseType, uniformCollection and features.
virtual ~UniformCase (void);
{
}
-UniformCase::UniformCase (Context& context, const char* const name, const char* const description, const CaseShaderType caseShaderType, const SharedPtr<const UniformCollection>& uniformCollection)
- : TestCase (context, name, description)
- , CallLogWrapper (context.getRenderContext().getFunctions(), m_testCtx.getLog())
- , m_features (0)
- , m_uniformCollection (uniformCollection)
- , m_caseShaderType (caseShaderType)
-{
-}
-
UniformCase::UniformCase (Context& context, const char* name, const char* description, const deUint32 seed)
: TestCase (context, name, description)
, CallLogWrapper (context.getRenderContext().getFunctions(), m_testCtx.getLog())
template <typename T>
static tcu::Vector<T, 4> castVectorSaturate (const tcu::Vec4& in)
{
- return tcu::Vector<T, 4>((in.x() + 0.5f >= std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : ((in.x() - 0.5f <= std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.x()))),
- (in.y() + 0.5f >= std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : ((in.y() - 0.5f <= std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.y()))),
- (in.z() + 0.5f >= std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : ((in.z() - 0.5f <= std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.z()))),
- (in.w() + 0.5f >= std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : ((in.w() - 0.5f <= std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.w()))));
+ return tcu::Vector<T, 4>(((double)in.x() + 0.5 >= (double)std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : (((double)in.x() - 0.5 <= (double)std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.x()))),
+ ((double)in.y() + 0.5 >= (double)std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : (((double)in.y() - 0.5 <= (double)std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.y()))),
+ ((double)in.z() + 0.5 >= (double)std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : (((double)in.z() - 0.5 <= (double)std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.z()))),
+ ((double)in.w() + 0.5 >= (double)std::numeric_limits<T>::max()) ? (std::numeric_limits<T>::max()) : (((double)in.w() - 0.5 <= (double)std::numeric_limits<T>::min()) ? (std::numeric_limits<T>::min()) : (T(in.w()))));
}
static string genTexFragmentShader (const vector<glu::DataType>& samplerTypes, glu::DataType outputType)
protected:
void renderTriangle (const Vec3& p0, const Vec3& p1, const Vec3& p2, const Vec4& c0, const Vec4& c1, const Vec4& c2) const;
- void renderTriangle (const Vec3& p0, const Vec3& p1, const Vec3& p2, const Vec4& color) const;
void renderTriangle (const Vec2& p0, const Vec2& p1, const Vec2& p2, const Vec4& c0, const Vec4& c1, const Vec4& c2) const;
void renderTriangle (const Vec2& p0, const Vec2& p1, const Vec2& p2, const Vec4& color) const;
void renderQuad (const Vec2& p0, const Vec2& p1, const Vec2& p2, const Vec2& p3, const Vec4& c0, const Vec4& c1, const Vec4& c2, const Vec4& c3) const;
GLU_EXPECT_NO_ERROR(gl.getError(), "drawArrays");
}
-void DefaultFBOMultisampleCase::renderTriangle (const Vec3& p0, const Vec3& p1, const Vec3& p2, const Vec4& color) const
-{
- renderTriangle(p0, p1, p2, color, color, color);
-}
-
void DefaultFBOMultisampleCase::renderTriangle (const Vec2& p0, const Vec2& p1, const Vec2& p2, const Vec4& c0, const Vec4& c1, const Vec4& c2) const
{
renderTriangle(Vec3(p0.x(), p0.y(), 0.0f),
bool isStagePresent (glu::ShaderType stage) const;
bool isStageReferencing (glu::ShaderType stage) const;
- deUint32 getPresentMask (void) const;
deUint32 getReferencingMask (void) const;
const glu::GLSLVersion m_version;
return m_stageReferencing[stage];
}
-deUint32 ShaderSet::getPresentMask (void) const
-{
- deUint32 mask = 0;
- for (deUint32 stage = 0; stage < glu::SHADERTYPE_LAST; ++stage)
- {
- if (m_stagePresent[stage])
- mask |= (1u << stage);
- }
- return mask;
-}
-
deUint32 ShaderSet::getReferencingMask (void) const
{
deUint32 mask = 0;
FEATURE_ARRAY_FIRST_ELEM_NAME_NO_INDEX = 1<<8
};
- UniformCase (Context& context, const char* name, const char* description, CaseShaderType caseType, const SharedPtr<const UniformCollection>& uniformCollection);
UniformCase (Context& context, const char* name, const char* description, CaseShaderType caseType, const SharedPtr<const UniformCollection>& uniformCollection, deUint32 features);
virtual ~UniformCase (void);
{
}
-UniformCase::UniformCase (Context& context, const char* const name, const char* const description, const CaseShaderType caseShaderType, const SharedPtr<const UniformCollection>& uniformCollection)
- : TestCase (context, name, description)
- , CallLogWrapper (context.getRenderContext().getFunctions(), m_testCtx.getLog())
- , m_features (0)
- , m_uniformCollection (uniformCollection)
- , m_caseShaderType (caseShaderType)
-{
-}
-
void UniformCase::init (void)
{
{
template <typename T0 = Void, typename T1 = Void, typename T2 = Void, typename T3 = Void>
struct Tuple4
{
- explicit Tuple4 (const T0& e0 = T0(),
- const T1& e1 = T1(),
- const T2& e2 = T2(),
- const T3& e3 = T3())
+ explicit Tuple4 (const T0 e0 = T0(),
+ const T1 e1 = T1(),
+ const T2 e2 = T2(),
+ const T3 e3 = T3())
: a (e0)
, b (e1)
, c (e2)
return GLValue::Half::create(std::fabs(val.to<float>()));
}
-// AttriuteArray
+// AttributeArray
class AttributeArray
{
~AttributeArray (void);
void data (DrawTestSpec::Target target, size_t size, const char* data, DrawTestSpec::Usage usage);
- void subdata (DrawTestSpec::Target target, int offset, int size, const char* data);
void setupArray (bool bound, int offset, int size, DrawTestSpec::InputType inType, DrawTestSpec::OutputType outType, bool normalized, int stride, int instanceDivisor, const rr::GenericVec4& defaultAttrib, bool isPositionAttr, bool bgraComponentOrder);
void bindAttribute (deUint32 loc);
void bindIndexArray (DrawTestSpec::Target storage);
DE_ASSERT(false);
}
-void AttributeArray::subdata (DrawTestSpec::Target target, int offset, int size, const char* ptr)
-{
- m_target = target;
-
- if (m_storage == DrawTestSpec::STORAGE_BUFFER)
- {
- m_ctx.bindBuffer(targetToGL(target), m_glBuffer);
- GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glBindBuffer()");
-
- m_ctx.bufferSubData(targetToGL(target), offset, size, ptr);
- GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glBufferSubData()");
- }
- else if (m_storage == DrawTestSpec::STORAGE_USER)
- std::memcpy(m_data + offset, ptr, size);
- else
- DE_ASSERT(false);
-}
-
void AttributeArray::setupArray (bool bound, int offset, int size, DrawTestSpec::InputType inputType, DrawTestSpec::OutputType outType, bool normalized, int stride, int instanceDivisor, const rr::GenericVec4& defaultAttrib, bool isPositionAttr, bool bgraComponentOrder)
{
m_componentCount = size;
private:
template<typename T>
static char* createIndices (int seed, int elementCount, int offset, int min, int max, int indexBase);
- static void setData (char* data, DrawTestSpec::InputType type, deRandom& rnd, GLValue min, GLValue max);
static char* generateBasicArray (int seed, int elementCount, int componentCount, int offset, int stride, DrawTestSpec::InputType type);
template<typename T, typename GLType>
static char* generatePackedArray (int seed, int elementCount, int componentCount, int offset, int stride);
};
-void RandomArrayGenerator::setData (char* data, DrawTestSpec::InputType type, deRandom& rnd, GLValue min, GLValue max)
-{
- switch (type)
- {
- case DrawTestSpec::INPUTTYPE_FLOAT:
- {
- alignmentSafeAssignment<float>(data, getRandom<GLValue::Float>(rnd, min.fl, max.fl));
- break;
- }
-
- case DrawTestSpec::INPUTTYPE_SHORT:
- {
- alignmentSafeAssignment<deInt16>(data, getRandom<GLValue::Short>(rnd, min.s, max.s));
- break;
- }
-
- case DrawTestSpec::INPUTTYPE_UNSIGNED_SHORT:
- {
- alignmentSafeAssignment<deUint16>(data, getRandom<GLValue::Ushort>(rnd, min.us, max.us));
- break;
- }
-
- case DrawTestSpec::INPUTTYPE_BYTE:
- {
- alignmentSafeAssignment<deInt8>(data, getRandom<GLValue::Byte>(rnd, min.b, max.b));
- break;
- }
-
- case DrawTestSpec::INPUTTYPE_UNSIGNED_BYTE:
- {
- alignmentSafeAssignment<deUint8>(data, getRandom<GLValue::Ubyte>(rnd, min.ub, max.ub));
- break;
- }
-
- case DrawTestSpec::INPUTTYPE_FIXED:
- {
- alignmentSafeAssignment<deInt32>(data, getRandom<GLValue::Fixed>(rnd, min.fi, max.fi));
- break;
- }
-
- case DrawTestSpec::INPUTTYPE_INT:
- {
- alignmentSafeAssignment<deInt32>(data, getRandom<GLValue::Int>(rnd, min.i, max.i));
- break;
- }
-
- case DrawTestSpec::INPUTTYPE_UNSIGNED_INT:
- {
- alignmentSafeAssignment<deUint32>(data, getRandom<GLValue::Uint>(rnd, min.ui, max.ui));
- break;
- }
-
- case DrawTestSpec::INPUTTYPE_HALF:
- {
- alignmentSafeAssignment<deFloat16>(data, getRandom<GLValue::Half>(rnd, min.h, max.h).getValue());
- break;
- }
-
- default:
- DE_ASSERT(false);
- break;
- }
-}
-
char* RandomArrayGenerator::generateArray (int seed, int elementCount, int componentCount, int offset, int stride, DrawTestSpec::InputType type)
{
if (type == DrawTestSpec::INPUTTYPE_INT_2_10_10_10 || type == DrawTestSpec::INPUTTYPE_UNSIGNED_INT_2_10_10_10)
from build.common import DEQP_DIR
from build.config import ANY_GENERATOR
from build_caselists import Module, getModuleByName, getBuildConfig, DEFAULT_BUILD_DIR, DEFAULT_TARGET
-from mustpass import Project, Package, Mustpass, Configuration, include, exclude, genMustpassLists
+from mustpass import Project, Package, Mustpass, Configuration, include, exclude, genMustpassLists, parseBuildConfigFromCmdLineArgs
import os
Mustpass(project = CTS_PROJECT, version = "master", packages = [MASTER_EGL_PKG, MASTER_GLES2_PKG, MASTER_GLES3_PKG, MASTER_GLES31_PKG, MASTER_VULKAN_PKG])
]
-BUILD_CONFIG = getBuildConfig(DEFAULT_BUILD_DIR, DEFAULT_TARGET, "Debug")
-
if __name__ == "__main__":
- genMustpassLists(MUSTPASS_LISTS, ANY_GENERATOR, BUILD_CONFIG)
+ genMustpassLists(MUSTPASS_LISTS, ANY_GENERATOR, parseBuildConfigFromCmdLineArgs())
raise Exception("Not implemented")
class RunScript(BuildTestStep):
- def __init__ (self, scriptPath):
- self.scriptPath = scriptPath
+ def __init__ (self, scriptPath, getExtraArgs = None):
+ self.scriptPath = scriptPath
+ self.getExtraArgs = getExtraArgs
def getName (self):
return self.scriptPath
def run (self, env):
- execute(["python", os.path.join(env.srcDir, self.scriptPath)])
+ args = ["python", os.path.join(env.srcDir, self.scriptPath)]
+
+ if self.getExtraArgs != None:
+ args += self.getExtraArgs(env)
+
+ execute(args)
def makeCflagsArgs (cflags):
cflagsStr = " ".join(cflags)
return "-" + version
return ""
+def runSteps (steps):
+ for step in steps:
+ if step.isAvailable(env):
+ print "Run: %s" % step.getName()
+ step.run(env)
+ else:
+ print "Skip: %s" % step.getName()
+
+def runRecipe (steps):
+ allSteps = PREREQUISITES + steps + POST_CHECKS
+ runSteps(allSteps)
+
COMMON_GCC_CFLAGS = ["-Werror"]
COMMON_CLANG_CFLAGS = COMMON_GCC_CFLAGS + ["-Wno-error=unused-command-line-argument"]
GCC_32BIT_CFLAGS = COMMON_GCC_CFLAGS + ["-m32"]
CLANG_64BIT_CFLAGS = COMMON_CLANG_CFLAGS + ["-m64"]
CLANG_VERSION = getClangVersion()
-STEPS = [
- RunScript(os.path.join("external", "fetch_sources.py")),
+# Always ran before any receipe
+PREREQUISITES = [
+ RunScript(os.path.join("external", "fetch_sources.py"))
+]
+
+# Always ran after any receipe
+POST_CHECKS = [
+ CheckSrcChanges()
+]
+
+BUILD_TARGETS = [
Build("clang-64-debug",
UnixConfig("null",
"Debug",
Build("vs-64-debug",
VSConfig("Debug"),
ANY_VS_X64_GENERATOR),
- RunScript(os.path.join("scripts", "build_android_mustpass.py")),
- RunScript(os.path.join("external", "vulkancts", "scripts", "build_mustpass.py")),
- RunScript(os.path.join("scripts", "gen_egl.py")),
- RunScript(os.path.join("scripts", "opengl", "gen_all.py")),
- RunScript(os.path.join("scripts", "src_util", "check_all.py")),
- RunScript(os.path.join("external", "vulkancts", "scripts", "gen_framework.py")),
- CheckSrcChanges(),
]
+SPECIAL_RECIPES = [
+ ('android-mustpass', [
+ RunScript(os.path.join("scripts", "build_android_mustpass.py"),
+ lambda env: ["--build-dir", os.path.join(env.tmpDir, "android-mustpass")]),
+ ]),
+ ('vulkan-mustpass', [
+ RunScript(os.path.join("external", "vulkancts", "scripts", "build_mustpass.py"),
+ lambda env: ["--build-dir", os.path.join(env.tmpDir, "vulkan-mustpass")]),
+ ]),
+ ('gen-inl-files', [
+ RunScript(os.path.join("scripts", "gen_egl.py")),
+ RunScript(os.path.join("scripts", "opengl", "gen_all.py")),
+ RunScript(os.path.join("external", "vulkancts", "scripts", "gen_framework.py")),
+ RunScript(os.path.join("scripts", "src_util", "check_all.py")),
+ ])
+]
+
+def getBuildRecipes ():
+ return [(b.getName(), [b]) for b in BUILD_TARGETS]
+
+def getAllRecipe (recipes):
+ allSteps = []
+ for name, steps in recipes:
+ allSteps += steps
+ return ("all", allSteps)
+
+def getRecipes ():
+ recipes = getBuildRecipes()
+ recipes += SPECIAL_RECIPES
+ return recipes
+
+def getRecipe (recipes, recipeName):
+ for curName, steps in recipes:
+ if curName == recipeName:
+ return (curName, steps)
+ return None
+
+RECIPES = getRecipes()
+
def parseArgs ():
parser = argparse.ArgumentParser(description = "Build and test source",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
-
parser.add_argument("-s",
"--src-dir",
dest="srcDir",
dest="tmpDir",
default=os.path.join(tempfile.gettempdir(), "deqp-build-test"),
help="Temporary directory")
+ parser.add_argument("-r",
+ "--recipe",
+ dest="recipe",
+ choices=[n for n, s in RECIPES] + ["all"],
+ default="all",
+ help="Build / test recipe")
+ parser.add_argument("-d",
+ "--dump-recipes",
+ dest="dumpRecipes",
+ action="store_true",
+ help="Print out recipes that have any available actions")
return parser.parse_args()
if __name__ == "__main__":
args = parseArgs()
env = Environment(args.srcDir, args.tmpDir)
- for step in STEPS:
- if step.isAvailable(env):
- print "Run: %s" % step.getName()
- step.run(env)
- else:
- print "Skip: %s" % step.getName()
+ if args.dumpRecipes:
+ for name, steps in RECIPES:
+ for step in steps:
+ if step.isAvailable(env):
+ print name
+ break
+ else:
+ name, steps = getAllRecipe(RECIPES) if args.recipe == "all" \
+ else getRecipe(RECIPES, args.recipe)
+
+ print "Running %s" % name
+
+ runRecipe(steps)
- print "All steps completed successfully"
+ print "All steps completed successfully"
from fnmatch import fnmatch
from copy import copy
+import argparse
import xml.etree.cElementTree as ElementTree
import xml.dom.minidom as minidom
for mustpass in mustpassLists:
genMustpass(mustpass, moduleCaseLists)
+
+def parseCmdLineArgs ():
+ parser = argparse.ArgumentParser(description = "Build Android CTS mustpass",
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser.add_argument("-b",
+ "--build-dir",
+ dest="buildDir",
+ default=DEFAULT_BUILD_DIR,
+ help="Temporary build directory")
+ parser.add_argument("-t",
+ "--build-type",
+ dest="buildType",
+ default="Debug",
+ help="Build type")
+ parser.add_argument("-c",
+ "--deqp-target",
+ dest="targetName",
+ default=DEFAULT_TARGET,
+ help="dEQP build target")
+ return parser.parse_args()
+
+def parseBuildConfigFromCmdLineArgs ():
+ args = parseCmdLineArgs()
+ return getBuildConfig(args.buildDir, args.targetName, args.buildType)