if proc.returncode != 0:
raise Exception("adb devices -l failed, got %d" % proc.returncode)
- ptrn = re.compile(r'^([a-zA-Z0-9:]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)')
+ ptrn = re.compile(r'^([a-zA-Z0-9\.:]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)')
devices = []
for line in stdout.splitlines()[1:]:
if len(line.strip()) == 0:
"spirv-tools"),
GitRepo(
"https://github.com/KhronosGroup/glslang.git",
- "5639f3aca5b75cbe5419a623eecf5e3794fab917",
+ "d02dc5d05ad1f63db8d37fda9928a4d59e3c132d",
"glslang"),
]
${GLSLANG_ABS_PATH}/glslang/MachineIndependent
${GLSLANG_ABS_PATH}/glslang/GenericCodeGen
${GLSLANG_ABS_PATH}/glslang/OSDependent
+ ${GLSLANG_ABS_PATH}/hlsl
${GLSLANG_ABS_PATH}/OGLCompilersDLL
${GLSLANG_ABS_PATH}/SPIRV
)
set(GLSLANG_SRCS
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Constant.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/glslang_tab.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/InfoSink.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Initialize.cpp
- ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/IntermTraverse.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Intermediate.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/intermOut.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/IntermTraverse.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/limits.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/linkValidate.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/parseConst.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/ParseHelper.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/PoolAlloc.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/propagateNoContraction.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/reflection.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/RemoveTree.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Scan.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/ShaderLang.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/SymbolTable.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Versions.cpp
- ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/glslang_tab.cpp
- ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/intermOut.cpp
- ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/limits.cpp
- ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/linkValidate.cpp
- ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/parseConst.cpp
- ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/reflection.cpp
- ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/Pp.cpp
+
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpAtom.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpContext.cpp
+ ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/Pp.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpMemory.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpScanner.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpSymbols.cpp
${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpTokens.cpp
+
${GLSLANG_ABS_PATH}/glslang/GenericCodeGen/CodeGen.cpp
${GLSLANG_ABS_PATH}/glslang/GenericCodeGen/Link.cpp
+
${GLSLANG_ABS_PATH}/OGLCompilersDLL/InitializeDll.cpp
+ ${GLSLANG_ABS_PATH}/hlsl/hlslGrammar.cpp
+ ${GLSLANG_ABS_PATH}/hlsl/hlslOpMap.cpp
+ ${GLSLANG_ABS_PATH}/hlsl/hlslParseables.cpp
+ ${GLSLANG_ABS_PATH}/hlsl/hlslParseHelper.cpp
+ ${GLSLANG_ABS_PATH}/hlsl/hlslScanContext.cpp
+ ${GLSLANG_ABS_PATH}/hlsl/hlslTokenStream.cpp
+
+ ${GLSLANG_ABS_PATH}/SPIRV/disassemble.cpp
+ ${GLSLANG_ABS_PATH}/SPIRV/doc.cpp
${GLSLANG_ABS_PATH}/SPIRV/GlslangToSpv.cpp
${GLSLANG_ABS_PATH}/SPIRV/InReadableOrder.cpp
+ ${GLSLANG_ABS_PATH}/SPIRV/Logger.cpp
${GLSLANG_ABS_PATH}/SPIRV/SpvBuilder.cpp
${GLSLANG_ABS_PATH}/SPIRV/SPVRemapper.cpp
- ${GLSLANG_ABS_PATH}/SPIRV/doc.cpp
- ${GLSLANG_ABS_PATH}/SPIRV/disassemble.cpp
osinclude.cpp
)
layout(location = 0) out vec4 out_color;
+out gl_PerVertex {
+ vec4 gl_Position;
+};
+
void main() {
gl_Position = in_position;
out_color = in_color;
layout(location = 0) out vec4 out_color;
+out gl_PerVertex {
+ vec4 gl_Position;
+};
+
void main() {
vec2 perVertex = vec2(in_position.x, in_position.y);
vec2 perInstance[6] = vec2[6](vec2(0.0, 0.0), vec2(0.3, 0.0), vec2(0.0, -0.3),vec2(0.3, -0.3), vec2(0.7, -0.7), vec2(-0.75, 0.8));
layout(location = 0) out vec4 out_color;
+out gl_PerVertex {
+ vec4 gl_Position;
+};
+
void main() {
vec2 perVertex = vec2(in_position.x, in_position.y);
vec2 perInstance[6] = vec2[6](vec2(0.7, -0.7), vec2(-0.75, 0.8), vec2(0.0, 0.0), vec2(0.3, 0.0), vec2(0.0, -0.3),vec2(0.3, -0.3) );
-#version 310 es
+#version 450
precision highp float;
layout(location = 0) in vec4 in_position;
layout(location = 1) in vec4 in_color;
layout(location = 0) out vec4 out_color;
+out gl_PerVertex { vec4 gl_Position; };
void main() {
gl_Position = in_position;
-#version 430
+#version 450
layout(triangles) in;
layout(triangle_strip, max_vertices = 3) out;
+in gl_PerVertex { vec4 gl_Position; } gl_in[];
+out gl_PerVertex { vec4 gl_Position; };
layout(location = 0) in vec4 in_color[];
layout(location = 0) out vec4 out_color;
results.check(imageType != VK_IMAGE_TYPE_3D || (properties.maxExtent.width >= 1 && properties.maxExtent.height >= 1 && properties.maxExtent.depth >= 1), "Invalid dimensions for 3D image");
results.check(imageType != VK_IMAGE_TYPE_3D || properties.maxArrayLayers == 1, "Invalid maxArrayLayers for 3D image");
- if (tiling == VK_IMAGE_TILING_OPTIMAL)
+ if (tiling == VK_IMAGE_TILING_OPTIMAL && imageType == VK_IMAGE_TYPE_2D && !(curCreateFlags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) &&
+ ((supportedFeatures & (VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) ||
+ ((supportedFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) && deviceFeatures.shaderStorageImageMultisample)))
{
- // Vulkan API specification has changed since initial Android Nougat release.
- // For NYC CTS we need to tolerate old behavior as well and issue compatibility
- // warning instead.
- //
- // See spec issues 272, 282, 302, 445 and CTS issues 369, 440.
- const bool requiredByNewSpec = (imageType == VK_IMAGE_TYPE_2D && !(curCreateFlags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) &&
- ((supportedFeatures & (VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) ||
- ((supportedFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) && deviceFeatures.shaderStorageImageMultisample)));
-
- if (requiredByNewSpec)
- {
- const VkSampleCountFlags requiredSampleCounts = getRequiredOptimalTilingSampleCounts(deviceLimits, format, curUsageFlags);
-
- results.check((properties.sampleCounts & requiredSampleCounts) == requiredSampleCounts, "Required sample counts not supported");
- }
- else if (properties.sampleCounts != VK_SAMPLE_COUNT_1_BIT)
- {
- results.addResult(QP_TEST_RESULT_COMPATIBILITY_WARNING,
- "Implementation supports more sample counts than allowed by the spec");
- }
+ const VkSampleCountFlags requiredSampleCounts = getRequiredOptimalTilingSampleCounts(deviceLimits, format, curUsageFlags);
+ results.check((properties.sampleCounts & requiredSampleCounts) == requiredSampleCounts, "Required sample counts not supported");
}
else
results.check(properties.sampleCounts == VK_SAMPLE_COUNT_1_BIT, "sampleCounts != VK_SAMPLE_COUNT_1_BIT");
" quadrant_id = gl_VertexIndex / 6;\n"
" result_position = vec4(float(quadOriginX + quadXcoord - 1), float(quadOriginY + quadYcoord - 1), 0.0, 1.0);\n";
+std::string genPerVertexBlock (const vk::VkShaderStageFlagBits stage, const glu::GLSLVersion version)
+{
+ static const char* const block = "gl_PerVertex {\n"
+ " vec4 gl_Position;\n"
+ " float gl_PointSize;\n" // not used, but for compatibility with how implicit block is declared in ES
+ "}";
+ std::ostringstream str;
+
+ if (!glu::glslVersionIsES(version))
+ switch (stage)
+ {
+ case vk::VK_SHADER_STAGE_VERTEX_BIT:
+ str << "out " << block << ";\n";
+ break;
+
+ case vk::VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT:
+ str << "in " << block << " gl_in[gl_MaxPatchVertices];\n"
+ << "out " << block << " gl_out[];\n";
+ break;
+
+ case vk::VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT:
+ str << "in " << block << " gl_in[gl_MaxPatchVertices];\n"
+ << "out " << block << ";\n";
+ break;
+
+ case vk::VK_SHADER_STAGE_GEOMETRY_BIT:
+ str << "in " << block << " gl_in[];\n"
+ << "out " << block << ";\n";
+ break;
+
+ default:
+ break;
+ }
+
+ return str.str();
+}
+
bool isUniformDescriptorType (vk::VkDescriptorType type)
{
return type == vk::VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER ||
<< genResourceDeclarations(vk::VK_SHADER_STAGE_VERTEX_BIT, 0)
<< "layout(location = 0) out highp vec4 " << nextStageName << "_color;\n"
<< (onlyVS ? "" : "layout(location = 1) flat out highp int " + de::toString(nextStageName) + "_quadrant_id;\n")
+ << genPerVertexBlock(vk::VK_SHADER_STAGE_VERTEX_BIT, m_glslVersion)
<< "void main (void)\n"
<< "{\n"
<< " highp vec4 result_position;\n"
buf << versionDecl << "\n"
<< genExtensionDeclarations(vk::VK_SHADER_STAGE_VERTEX_BIT)
<< "layout(location = 1) flat out highp int " << nextStageName << "_quadrant_id;\n"
+ << genPerVertexBlock(vk::VK_SHADER_STAGE_VERTEX_BIT, m_glslVersion)
<< "void main (void)\n"
<< "{\n"
<< " highp vec4 result_position;\n"
<< genResourceDeclarations(vk::VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, 0)
<< "layout(location = 1) flat in highp int tsc_quadrant_id[];\n"
<< "layout(location = 0) out highp vec4 tes_color[];\n"
+ << genPerVertexBlock(vk::VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, m_glslVersion)
<< "void main (void)\n"
<< "{\n"
<< " highp vec4 result_color;\n"
<< "layout(vertices=3) out;\n"
<< "layout(location = 1) flat in highp int tsc_quadrant_id[];\n"
<< "layout(location = 1) flat out highp int tes_quadrant_id[];\n"
+ << genPerVertexBlock(vk::VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, m_glslVersion)
<< "void main (void)\n"
<< "{\n"
<< " tes_quadrant_id[gl_InvocationID] = tsc_quadrant_id[0];\n"
<< genResourceDeclarations(vk::VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, 0)
<< "layout(location = 1) flat in highp int tes_quadrant_id[];\n"
<< "layout(location = 0) out highp vec4 frag_color;\n"
+ << genPerVertexBlock(vk::VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, m_glslVersion)
<< "void main (void)\n"
<< "{\n"
<< " highp vec4 result_color;\n"
<< "layout(triangles) in;\n"
<< "layout(location = 0) in highp vec4 tes_color[];\n"
<< "layout(location = 0) out highp vec4 frag_color;\n"
+ << genPerVertexBlock(vk::VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, m_glslVersion)
<< "void main (void)\n"
<< "{\n"
<< " frag_color = tes_color[0];\n"
<< genResourceDeclarations(vk::VK_SHADER_STAGE_GEOMETRY_BIT, 0)
<< "layout(location = 1) flat in highp int geo_quadrant_id[];\n"
<< "layout(location = 0) out highp vec4 frag_color;\n"
+ << genPerVertexBlock(vk::VK_SHADER_STAGE_GEOMETRY_BIT, m_glslVersion)
<< "void main (void)\n"
<< "{\n"
<< " highp int quadrant_id;\n"
0u, // deUint32 writeMask;
0u, // deUint32 reference;
},
- -1.0f, // float minDepthBounds;
- +1.0f, // float maxDepthBounds;
+ 0.0f, // float minDepthBounds;
+ 1.0f, // float maxDepthBounds;
};
- const VkPipelineTessellationStateCreateInfo* pTessCreateInfo = DE_NULL;
- if (m_patchControlPoints > 0)
+ const VkPipelineTessellationStateCreateInfo tessStateCreateInfo =
{
- const VkPipelineTessellationStateCreateInfo tessStateCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, // VkStructureType sType;
- DE_NULL, // const void* pNext;
- 0u, // VkPipelineTesselationStateCreateFlags flags;
- m_patchControlPoints, // deUint32 patchControlPoints;
- };
-
- pTessCreateInfo = &tessStateCreateInfo;
- }
+ VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, // VkStructureType sType;
+ DE_NULL, // const void* pNext;
+ 0u, // VkPipelineTesselationStateCreateFlags flags;
+ m_patchControlPoints, // deUint32 patchControlPoints;
+ };
+ const VkPipelineTessellationStateCreateInfo* pTessCreateInfo = (m_patchControlPoints > 0)
+ ? &tessStateCreateInfo
+ : DE_NULL;
const VkGraphicsPipelineCreateInfo graphicsPipelineParams =
{
de::MovePtr<Allocation> m_depthImageAlloc;
de::MovePtr<Allocation> m_colorImageAlloc[PIPELINE_CACHE_NDX_COUNT];
Move<VkImageView> m_depthAttachmentView;
+ VkImageMemoryBarrier m_imageLayoutBarriers[3];
Move<VkBuffer> m_vertexBuffer;
de::MovePtr<Allocation> m_vertexBufferMemory;
case VK_SHADER_STAGE_GEOMETRY_BIT:
programCollection.glslSources.add("dummy_geo") << glu::GeometrySource(
"#version 450 \n"
- "layout (triangles) in;\n"
- "layout (triangle_strip, max_vertices = 3) out;\n"
+ "layout(triangles) in;\n"
+ "layout(triangle_strip, max_vertices = 3) out;\n"
+ "layout(location = 0) in highp vec4 in_vtxColor[];\n"
+ "layout(location = 0) out highp vec4 vtxColor;\n"
+ "out gl_PerVertex { vec4 gl_Position; };\n"
+ "in gl_PerVertex { vec4 gl_Position; } gl_in[];\n"
"void main (void)\n"
"{\n"
" for(int ndx=0; ndx<3; ndx++)\n"
" {\n"
" gl_Position = gl_in[ndx].gl_Position;\n"
+ " vtxColor = in_vtxColor[ndx];\n"
" EmitVertex();\n"
" }\n"
" EndPrimitive();\n"
"layout(vertices = 3) out;\n"
"layout(location = 0) in highp vec4 color[];\n"
"layout(location = 0) out highp vec4 vtxColor[];\n"
+ "out gl_PerVertex { vec4 gl_Position; } gl_out[3];\n"
+ "in gl_PerVertex { vec4 gl_Position; } gl_in[gl_MaxPatchVertices];\n"
"void main()\n"
"{\n"
" gl_TessLevelOuter[0] = 4.0;\n"
"layout(triangles, fractional_even_spacing, ccw) in;\n"
"layout(location = 0) in highp vec4 colors[];\n"
"layout(location = 0) out highp vec4 vtxColor;\n"
+ "out gl_PerVertex { vec4 gl_Position; };\n"
+ "in gl_PerVertex { vec4 gl_Position; } gl_in[gl_MaxPatchVertices];\n"
"void main() \n"
"{\n"
" float u = gl_TessCoord.x;\n"
VK_ATTACHMENT_STORE_OP_STORE, // VkAttachmentStoreOp storeOp;
VK_ATTACHMENT_LOAD_OP_DONT_CARE, // VkAttachmentLoadOp stencilLoadOp;
VK_ATTACHMENT_STORE_OP_DONT_CARE, // VkAttachmentStoreOp stencilStoreOp;
- VK_IMAGE_LAYOUT_UNDEFINED, // VkImageLayout initialLayout;
+ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // VkImageLayout initialLayout;
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // VkImageLayout finalLayout;
};
VK_ATTACHMENT_STORE_OP_DONT_CARE, // VkAttachmentStoreOp storeOp;
VK_ATTACHMENT_LOAD_OP_DONT_CARE, // VkAttachmentLoadOp stencilLoadOp;
VK_ATTACHMENT_STORE_OP_DONT_CARE, // VkAttachmentStoreOp stencilStoreOp;
- VK_IMAGE_LAYOUT_UNDEFINED, // VkImageLayout initialLayout;
+ VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, // VkImageLayout initialLayout;
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, // VkImageLayout finalLayout;
};
&m_depthImageAlloc);
}
+ // Set up image layout transition barriers
+ {
+ VkImageMemoryBarrier colorImageBarrier =
+ {
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // VkStructureType sType;
+ DE_NULL, // const void* pNext;
+ 0u, // VkAccessFlags srcAccessMask;
+ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, // VkAccessFlags dstAccessMask;
+ VK_IMAGE_LAYOUT_UNDEFINED, // VkImageLayout oldLayout;
+ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // VkImageLayout newLayout;
+ VK_QUEUE_FAMILY_IGNORED, // deUint32 srcQueueFamilyIndex;
+ VK_QUEUE_FAMILY_IGNORED, // deUint32 dstQueueFamilyIndex;
+ *m_colorImage[PIPELINE_CACHE_NDX_NO_CACHE], // VkImage image;
+ { VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u }, // VkImageSubresourceRange subresourceRange;
+ };
+
+ m_imageLayoutBarriers[0] = colorImageBarrier;
+
+ colorImageBarrier.image = *m_colorImage[PIPELINE_CACHE_NDX_CACHED];
+ m_imageLayoutBarriers[1] = colorImageBarrier;
+
+ const VkImageMemoryBarrier depthImageBarrier =
+ {
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // VkStructureType sType;
+ DE_NULL, // const void* pNext;
+ 0u, // VkAccessFlags srcAccessMask;
+ VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, // VkAccessFlags dstAccessMask;
+ VK_IMAGE_LAYOUT_UNDEFINED, // VkImageLayout oldLayout;
+ VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, // VkImageLayout newLayout;
+ VK_QUEUE_FAMILY_IGNORED, // deUint32 srcQueueFamilyIndex;
+ VK_QUEUE_FAMILY_IGNORED, // deUint32 dstQueueFamilyIndex;
+ *m_depthImage, // VkImage image;
+ { VK_IMAGE_ASPECT_DEPTH_BIT, 0u, 1u, 0u, 1u }, // VkImageSubresourceRange subresourceRange;
+ };
+
+ m_imageLayoutBarriers[2] = depthImageBarrier;
+ }
// Create color attachment view
{
VkImageViewCreateInfo colorAttachmentViewParams =
VK_CHECK(vk.beginCommandBuffer(*m_cmdBuffer, &cmdBufferBeginInfo));
+ vk.cmdPipelineBarrier(*m_cmdBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, (VkDependencyFlags)0,
+ 0u, DE_NULL, 0u, DE_NULL, DE_LENGTH_OF_ARRAY(m_imageLayoutBarriers), m_imageLayoutBarriers);
+
prepareRenderPass(*m_framebuffer[PIPELINE_CACHE_NDX_NO_CACHE], *m_pipeline[PIPELINE_CACHE_NDX_NO_CACHE]);
+ // After the first render pass, the images are in correct layouts
+
prepareRenderPass(*m_framebuffer[PIPELINE_CACHE_NDX_CACHED], *m_pipeline[PIPELINE_CACHE_NDX_CACHED]);
VK_CHECK(vk.endCommandBuffer(*m_cmdBuffer));
<< "\n"
<< "layout(location = 0) in highp vec4 position;\n"
<< "\n"
+ << "out gl_PerVertex {\n"
+ << " vec4 gl_Position;\n"
+ << "};\n"
+ << "\n"
<< "void main (void)\n"
<< "{\n"
<< " gl_Position = position;\n"
<< "layout(location = 0) in highp vec4 position;\n"
<< "layout(location = 1) in highp vec4 color;\n"
<< "layout(location = 0) out highp vec4 vtxColor;\n"
+ << "out gl_PerVertex { vec4 gl_Position; };\n"
<< "layout(push_constant) uniform Material {\n";
switch (getRangeSizeCase(m_pushConstantRange[rangeNdx].range.size))
<< "} tessLevel;\n"
<< "layout(location = 0) in highp vec4 color[];\n"
<< "layout(location = 0) out highp vec4 vtxColor[];\n"
+ << "in gl_PerVertex { vec4 gl_Position; } gl_in[gl_MaxPatchVertices];\n"
+ << "out gl_PerVertex { vec4 gl_Position; } gl_out[];\n"
<< "void main()\n"
<< "{\n"
<< " gl_TessLevelInner[0] = tessLevel.level;\n"
<< "} matInst;\n"
<< "layout(location = 0) in highp vec4 color[];\n"
<< "layout(location = 0) out highp vec4 vtxColor;\n"
+ << "in gl_PerVertex { vec4 gl_Position; } gl_in[gl_MaxPatchVertices];\n"
+ << "out gl_PerVertex { vec4 gl_Position; };\n"
<< "void main()\n"
<< "{\n"
<< " gl_Position = gl_TessCoord.x * gl_in[0].gl_Position + gl_TessCoord.y * gl_in[1].gl_Position + gl_TessCoord.z * gl_in[2].gl_Position;\n"
<< "} matInst;\n"
<< "layout(location = 0) in highp vec4 color[];\n"
<< "layout(location = 0) out highp vec4 vtxColor;\n"
+ << "in gl_PerVertex { vec4 gl_Position; } gl_in[];\n"
+ << "out gl_PerVertex { vec4 gl_Position; };\n"
<< "void main()\n"
<< "{\n"
<< " for(int i=0; i<3; i++)\n"
BasicGraphicsTest::initPrograms(programCollection);
programCollection.glslSources.add("dummy_geo") << glu::GeometrySource(
- "#version 450 \n"
+ "#version 310 es\n"
+ "#extension GL_EXT_geometry_shader : enable\n"
"layout(triangles) in;\n"
"layout(triangle_strip, max_vertices = 3) out;\n"
"layout(location = 0) in highp vec4 in_vtxColor[];\n"
"}\n");
programCollection.glslSources.add("basic_tcs") << glu::TessellationControlSource(
- "#version 450 \n"
+ "#version 310 es\n"
+ "#extension GL_EXT_tessellation_shader : enable\n"
"layout(vertices = 3) out;\n"
"layout(location = 0) in highp vec4 color[];\n"
"layout(location = 0) out highp vec4 vtxColor[];\n"
"}\n");
programCollection.glslSources.add("basic_tes") << glu::TessellationEvaluationSource(
- "#version 450 \n"
+ "#version 310 es\n"
+ "#extension GL_EXT_tessellation_shader : enable\n"
"layout(triangles, fractional_even_spacing, ccw) in;\n"
"layout(location = 0) in highp vec4 colors[];\n"
"layout(location = 0) out highp vec4 vtxColor;\n"
"}\n");
programCollection.glslSources.add("vert") << glu::VertexSource("#version 430\n"
- "layout(location = 0) in vec4 in_Postion;\n"
+ "layout(location = 0) in vec4 in_Position;\n"
+ "out gl_PerVertex { vec4 gl_Position; float gl_PointSize; };\n"
"void main() {\n"
- " gl_Position = in_Postion;\n"
+ " gl_Position = in_Position;\n"
" gl_PointSize = 1.0;\n"
"}\n");
}
{
std::ostringstream src;
- src << "#version 450\n";
+ src << "#version 310 es\n";
src << "layout(local_size_x = 1) in;\n";
src << "\n";
std::string generateVertexShader (const ShaderInterface& interface, const UniformLayout& layout, const std::map<int, void*>& blockPointers)
{
std::ostringstream src;
- src << "#version 450\n";
+ src << "#version 310 es\n";
src << "layout(location = 0) in highp vec4 a_position;\n";
src << "layout(location = 0) out mediump float v_vtxResult;\n";
std::string generateFragmentShader (const ShaderInterface& interface, const UniformLayout& layout, const std::map<int, void*>& blockPointers)
{
std::ostringstream src;
- src << "#version 450\n";
+ src << "#version 310 es\n";
src << "layout(location = 0) in mediump float v_vtxResult;\n";
src << "layout(location = 0) out mediump vec4 dEQP_FragColor;\n";
queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_evaluation_texture_image_units", "Test MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS", GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS, 16));
queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_control_output_components", "Test MAX_TESS_CONTROL_OUTPUT_COMPONENTS", GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS, 64));
queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_patch_components", "Test MAX_TESS_PATCH_COMPONENTS", GL_MAX_TESS_PATCH_COMPONENTS, 120));
- queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_control_total_output_components", "Test MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS", GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS, 4096));
+ queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_control_total_output_components", "Test MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS", GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS, 2048));
queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_evaluation_output_components", "Test MAX_TESS_EVALUATION_OUTPUT_COMPONENTS", GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS, 64));
queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_control_uniform_blocks", "Test MAX_TESS_CONTROL_UNIFORM_BLOCKS", GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS, 12));
queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_evaluation_uniform_blocks", "Test MAX_TESS_EVALUATION_UNIFORM_BLOCKS", GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS, 12));