Merge "Fix out of bounds access in internal format query tests" into nyc-dev
diff --git a/Android.mk b/Android.mk
index f9aaa76..7a15c0b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -887,8 +887,7 @@
libpng_ndk \
LOCAL_CFLAGS += \
- $(deqp_compile_flags) \
- -Wno-error=date-time
+ $(deqp_compile_flags)
LOCAL_SDK_VERSION := 9
LOCAL_CPPFLAGS += -Wno-non-virtual-dtor
diff --git a/android/cts/master/com.drawelements.deqp.vk.xml b/android/cts/master/com.drawelements.deqp.vk.xml
index f00f8cd..e750dc4 100644
--- a/android/cts/master/com.drawelements.deqp.vk.xml
+++ b/android/cts/master/com.drawelements.deqp.vk.xml
@@ -3977,6 +3977,9 @@
<Test name="create_instance_invalid_api_version">
<TestInstance/>
</Test>
+ <Test name="create_instance_null_appinfo">
+ <TestInstance/>
+ </Test>
<Test name="create_instance_unsupported_extensions">
<TestInstance/>
</Test>
diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt
index 8a87b29..e0d600e 100644
--- a/android/cts/master/vk-master.txt
+++ b/android/cts/master/vk-master.txt
@@ -1306,6 +1306,7 @@
dEQP-VK.api.info.image_format_properties.3d.linear.astc_12x12_srgb_block
dEQP-VK.api.device_init.create_instance_name_version
dEQP-VK.api.device_init.create_instance_invalid_api_version
+dEQP-VK.api.device_init.create_instance_null_appinfo
dEQP-VK.api.device_init.create_instance_unsupported_extensions
dEQP-VK.api.device_init.create_device
dEQP-VK.api.device_init.create_multiple_devices
diff --git a/android/cts/runner/src/com/drawelements/deqp/runner/DeqpTestRunner.java b/android/cts/runner/src/com/drawelements/deqp/runner/DeqpTestRunner.java
index 78911bc..38c6bfd 100644
--- a/android/cts/runner/src/com/drawelements/deqp/runner/DeqpTestRunner.java
+++ b/android/cts/runner/src/com/drawelements/deqp/runner/DeqpTestRunner.java
@@ -88,9 +88,6 @@
public static final String FEATURE_VULKAN_LEVEL = "android.hardware.vulkan.level";
private static final int TESTCASE_BATCH_LIMIT = 1000;
- private static final BatchRunConfiguration DEFAULT_CONFIG =
- new BatchRunConfiguration("rgba8888d24s8", "unspecified", "window");
-
private static final int UNRESPOSIVE_CMD_TIMEOUT_MS = 60000; // one minute
// !NOTE: There's a static method copyOptions() for copying options during split.
@@ -102,8 +99,8 @@
private String mDeqpPackage;
@Option(name="deqp-gl-config-name",
description="GL render target config. See deqp documentation for syntax. ",
- importance=Option.Importance.ALWAYS)
- private String mConfigName;
+ importance=Option.Importance.NEVER)
+ private String mConfigName = "";
@Option(name="deqp-caselist-file",
description="File listing the names of the cases to be run.",
importance=Option.Importance.ALWAYS)
diff --git a/external/vulkancts/framework/vulkan/vkSpirVAsm.cpp b/external/vulkancts/framework/vulkan/vkSpirVAsm.cpp
index 9d292ef..bd5105d 100644
--- a/external/vulkancts/framework/vulkan/vkSpirVAsm.cpp
+++ b/external/vulkancts/framework/vulkan/vkSpirVAsm.cpp
@@ -104,7 +104,7 @@
TCU_THROW(NotSupportedError, "SPIR-V assembly not supported (DEQP_HAVE_SPIRV_TOOLS not defined)");
}
-bool validateSpirV (std::vector<deUint8>*, std::string*)
+bool validateSpirV (const std::vector<deUint8>&, std::string*)
{
TCU_THROW(NotSupportedError, "SPIR-V validation not supported (DEQP_HAVE_SPIRV_TOOLS not defined)");
}
diff --git a/external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp
index 75fa860..c7a9aa7 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp
@@ -240,6 +240,39 @@
return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
}
+tcu::TestStatus createInstanceWithNullApplicationInfoTest (Context& context)
+{
+ tcu::TestLog& log = context.getTestContext().getLog();
+ tcu::ResultCollector resultCollector (log);
+ const PlatformInterface& platformInterface = context.getPlatformInterface();
+
+ const VkInstanceCreateInfo instanceCreateInfo =
+ {
+ VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, // VkStructureType sType;
+ DE_NULL, // const void* pNext;
+ (VkInstanceCreateFlags)0u, // VkInstanceCreateFlags flags;
+ DE_NULL, // const VkApplicationInfo* pAppInfo;
+ 0u, // deUint32 layerCount;
+ DE_NULL, // const char*const* ppEnabledLayernames;
+ 0u, // deUint32 extensionCount;
+ DE_NULL, // const char*const* ppEnabledExtensionNames;
+ };
+
+ log << TestLog::Message << "Creating instance with NULL pApplicationInfo" << TestLog::EndMessage;
+
+ try
+ {
+ const Unique<VkInstance> instance(createInstance(platformInterface, &instanceCreateInfo));
+ log << TestLog::Message << "Succeeded" << TestLog::EndMessage;
+ }
+ catch (const vk::Error& err)
+ {
+ resultCollector.fail("Failed, Error code: " + de::toString(err.getMessage()));
+ }
+
+ return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
+}
+
tcu::TestStatus createInstanceWithUnsupportedExtensionsTest (Context& context)
{
tcu::TestLog& log = context.getTestContext().getLog();
@@ -580,6 +613,7 @@
addFunctionCase(deviceInitializationTests.get(), "create_instance_name_version", "", createInstanceTest);
addFunctionCase(deviceInitializationTests.get(), "create_instance_invalid_api_version", "", createInstanceWithInvalidApiVersionTest);
+ addFunctionCase(deviceInitializationTests.get(), "create_instance_null_appinfo", "", createInstanceWithNullApplicationInfoTest);
addFunctionCase(deviceInitializationTests.get(), "create_instance_unsupported_extensions", "", createInstanceWithUnsupportedExtensionsTest);
addFunctionCase(deviceInitializationTests.get(), "create_device", "", createDeviceTest);
addFunctionCase(deviceInitializationTests.get(), "create_multiple_devices", "", createMultipleDevicesTest);
diff --git a/modules/egl/teglCreateContextExtTests.cpp b/modules/egl/teglCreateContextExtTests.cpp
index 5153b41..c25a6a3 100644
--- a/modules/egl/teglCreateContextExtTests.cpp
+++ b/modules/egl/teglCreateContextExtTests.cpp
@@ -790,7 +790,7 @@
{
deInt32 profileMaskGL = 0;
- gl.getIntegerv(GL_CONTEXT_PROFILE_MASK, &profileMask);
+ gl.getIntegerv(GL_CONTEXT_PROFILE_MASK, &profileMaskGL);
GLU_EXPECT_NO_ERROR(gl.getError(), "glGetIntegerv()");
if (profileMask != profileMaskGL)
diff --git a/modules/gles2/functional/es2fBufferTestUtil.cpp b/modules/gles2/functional/es2fBufferTestUtil.cpp
index 59360d3..2bf7567 100644
--- a/modules/gles2/functional/es2fBufferTestUtil.cpp
+++ b/modules/gles2/functional/es2fBufferTestUtil.cpp
@@ -414,7 +414,7 @@
int maxQuadsPerBatch = maxQuadsX*maxQuadsY;
int numVerified = 0;
deUint32 program = m_program->getProgram();
- tcu::RGBA threshold = renderTarget.getPixelFormat().getColorThreshold() + tcu::RGBA(3,3,3,3);
+ tcu::RGBA threshold = renderTarget.getPixelFormat().getColorThreshold() + tcu::RGBA(4,4,4,4);
bool isOk = true;
vector<tcu::Vec2> positions;
diff --git a/modules/gles2/functional/es2fRandomFragmentOpTests.cpp b/modules/gles2/functional/es2fRandomFragmentOpTests.cpp
index 847cf37..3f8b707 100644
--- a/modules/gles2/functional/es2fRandomFragmentOpTests.cpp
+++ b/modules/gles2/functional/es2fRandomFragmentOpTests.cpp
@@ -417,7 +417,7 @@
tcu::PixelFormat format = m_context.getRenderTarget().getPixelFormat();
if (format == tcu::PixelFormat(8, 8, 8, 8) || format == tcu::PixelFormat(8, 8, 8, 0))
- return format.getColorThreshold().toIVec().asUint() + tcu::UVec4(2); // Default threshold.
+ return format.getColorThreshold().toIVec().asUint() + tcu::UVec4(6); // Default threshold.
else
return format.getColorThreshold().toIVec().asUint()
* tcu::UVec4(5) + tcu::UVec4(2); // \note Non-scientific ad hoc formula. Need big threshold when few color bits; especially multiple blendings bring extra inaccuracy.
diff --git a/modules/gles3/functional/es3fRboStateQueryTests.cpp b/modules/gles3/functional/es3fRboStateQueryTests.cpp
index 6da4d0c..9f9c576 100644
--- a/modules/gles3/functional/es3fRboStateQueryTests.cpp
+++ b/modules/gles3/functional/es3fRboStateQueryTests.cpp
@@ -155,7 +155,6 @@
checkRenderbufferParam(m_testCtx, *this, GL_RENDERBUFFER_HEIGHT, h);
}
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0);
glDeleteRenderbuffers(1, &renderbufferID);
}
};
diff --git a/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp b/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp
index 9440d47..46670ca 100644
--- a/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp
+++ b/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp
@@ -379,6 +379,16 @@
TCU_CHECK_AND_THROW(NotSupportedError,
m_context.getContextInfo().isExtensionSupported("GL_EXT_gpu_shader5"),
"GL_EXT_gpu_shader5 extension is required for dynamic indexing of sampler arrays.");
+
+ if (m_samplerType == TYPE_SAMPLER_CUBE_ARRAY
+ && m_samplerType == TYPE_SAMPLER_CUBE_ARRAY_SHADOW
+ && m_samplerType == TYPE_INT_SAMPLER_CUBE_ARRAY
+ && m_samplerType == TYPE_UINT_SAMPLER_CUBE_ARRAY)
+ {
+ TCU_CHECK_AND_THROW(NotSupportedError,
+ m_context.getContextInfo().isExtensionSupported("GL_EXT_texture_cube_map_array"),
+ "GL_EXT_texture_cube_map_array extension is required for cube map arrays.");
+ }
}
}
@@ -399,6 +409,15 @@
if (!isES32 && m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL && m_indexExprType != INDEX_EXPR_TYPE_CONST_EXPRESSION)
global << "#extension GL_EXT_gpu_shader5 : require\n";
+ if (!isES32
+ && m_samplerType == TYPE_SAMPLER_CUBE_ARRAY
+ && m_samplerType == TYPE_SAMPLER_CUBE_ARRAY_SHADOW
+ && m_samplerType == TYPE_INT_SAMPLER_CUBE_ARRAY
+ && m_samplerType == TYPE_UINT_SAMPLER_CUBE_ARRAY)
+ {
+ global << "#extension GL_EXT_texture_cube_map_array: require\n";
+ }
+
if (m_indexExprType == INDEX_EXPR_TYPE_CONST_EXPRESSION)
global << "const highp int indexBase = 1;\n";
diff --git a/modules/internal/ditBuildInfoTests.cpp b/modules/internal/ditBuildInfoTests.cpp
index 1cbd4c5..480d84a 100644
--- a/modules/internal/ditBuildInfoTests.cpp
+++ b/modules/internal/ditBuildInfoTests.cpp
@@ -187,8 +187,6 @@
const bool isDebug = false;
#endif
- addChild(new BuildInfoStringCase (m_testCtx, "date", "__DATE__", __DATE__));
- addChild(new BuildInfoStringCase (m_testCtx, "time", "__TIME__", __TIME__));
addChild(new BuildInfoStringCase (m_testCtx, "de_debug", "DE_DEBUG", isDebug ? "1" : "not defined"));
addChild(new BuildEnumCase (m_testCtx, "de_os", "DE_OS", DE_OS, getOsName));
addChild(new BuildEnumCase (m_testCtx, "de_cpu", "DE_CPU", DE_CPU, getCpuName));