{
TestLog& log = m_context.getTestContext().getLog();
std::vector<Vec4> vertices;
- std::vector<Shader> shaders;
+ std::vector<VulkanShader> shaders;
FrontFacingVertexShader vertexShader;
FrontFacingFragmentShader fragmentShader;
std::string testDesc;
vertices.push_back(Vec4( 0.75f, -0.75f, 0.0f, 1.0f));
vertices.push_back(Vec4( 0.0f, -0.75f, 0.0f, 1.0f));
- shaders.push_back(Shader(VK_SHADER_STAGE_VERTEX_BIT, m_context.getBinaryCollection().get("vert")));
- shaders.push_back(Shader(VK_SHADER_STAGE_FRAGMENT_BIT, m_context.getBinaryCollection().get("frag")));
+ shaders.push_back(VulkanShader(VK_SHADER_STAGE_VERTEX_BIT, m_context.getBinaryCollection().get("vert")));
+ shaders.push_back(VulkanShader(VK_SHADER_STAGE_FRAGMENT_BIT, m_context.getBinaryCollection().get("frag")));
testDesc = "gl_FrontFacing " + getPrimitiveTopologyShortName(m_topology) + " ";
// Perform Draw
{
std::vector<Vec4> vertices;
- std::vector<Shader> shaders;
+ std::vector<VulkanShader> shaders;
Move<VkDescriptorSetLayout> descriptorSetLayout;
Move<VkDescriptorPool> descriptorPool;
Move<VkDescriptorSet> descriptorSet;
vertices.push_back(Vec4( 0.78f, 0.0f, 0.0f, 1.0f));
vertices.push_back(Vec4( -0.1f, 0.6f, 0.0f, 1.0f));
- shaders.push_back(Shader(VK_SHADER_STAGE_VERTEX_BIT, m_context.getBinaryCollection().get("FragDepthVert")));
- shaders.push_back(Shader(VK_SHADER_STAGE_FRAGMENT_BIT, m_context.getBinaryCollection().get("FragDepthFrag")));
+ shaders.push_back(VulkanShader(VK_SHADER_STAGE_VERTEX_BIT, m_context.getBinaryCollection().get("FragDepthVert")));
+ shaders.push_back(VulkanShader(VK_SHADER_STAGE_FRAGMENT_BIT, m_context.getBinaryCollection().get("FragDepthFrag")));
DrawState drawState(m_topology, m_renderSize.x(), m_renderSize.y());
DrawCallData drawCallData(vertices);
drawState.compareOp = rr::TESTFUNC_ALWAYS;
drawState.depthTestEnable = true;
drawState.depthWriteEnable = true;
+ drawState.depthBoundsTestEnable = true;
drawState.sampleShadingEnable = true;
- vulkanProgram.depthImageView = depthImageView;
- vulkanProgram.descriptorSetLayout = descriptorSetLayout;
- vulkanProgram.descriptorSet = descriptorSet;
+ vulkanProgram.depthImageView = *depthImageView;
+ vulkanProgram.descriptorSetLayout = *descriptorSetLayout;
+ vulkanProgram.descriptorSet = *descriptorSet;
VulkanDrawContext vulkanDrawContext(m_context, drawState, drawCallData, vulkanProgram);
vulkanDrawContext.draw();
1,
vulkanDrawContext.getColorPixels().getDataPtr()));
- depthImageView = vulkanProgram.depthImageView;
}
// Barrier to transition between first and second pass
// Resolve Depth Buffer
{
std::vector<Vec4> vertices;
- std::vector<Shader> shaders;
+ std::vector<VulkanShader> shaders;
Move<VkDescriptorSetLayout> descriptorSetLayout;
Move<VkDescriptorPool> descriptorPool;
Move<VkDescriptorSet> descriptorSet;
vertices.push_back(Vec4( 1.0f, -1.0f, 0.0f, 1.0f));
vertices.push_back(Vec4( 1.0f, 1.0f, 0.0f, 1.0f));
- shaders.push_back(Shader(VK_SHADER_STAGE_VERTEX_BIT, m_context.getBinaryCollection().get("FragDepthVertPass2")));
- shaders.push_back(Shader(VK_SHADER_STAGE_FRAGMENT_BIT, m_context.getBinaryCollection().get("FragDepthFragPass2")));
+ shaders.push_back(VulkanShader(VK_SHADER_STAGE_VERTEX_BIT, m_context.getBinaryCollection().get("FragDepthVertPass2")));
+ shaders.push_back(VulkanShader(VK_SHADER_STAGE_FRAGMENT_BIT, m_context.getBinaryCollection().get("FragDepthFragPass2")));
DrawState drawState(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, m_renderSize.x(), m_renderSize.y());
DrawCallData drawCallData(vertices);
drawState.numSamples = m_samples;
drawState.sampleShadingEnable = true;
- vulkanProgram.descriptorSetLayout = descriptorSetLayout;
- vulkanProgram.descriptorSet = descriptorSet;
+ vulkanProgram.descriptorSetLayout = *descriptorSetLayout;
+ vulkanProgram.descriptorSet = *descriptorSet;
VulkanDrawContext vulkanDrawContext(m_context, drawState, drawCallData, vulkanProgram);
vulkanDrawContext.draw();
// Perform draw
{
std::vector<Vec4> vertices;
- std::vector<Shader> shaders;
+ std::vector<VulkanShader> shaders;
vertices.push_back(Vec4( -1.0f, -1.0f, 0.0f, 1.0f));
vertices.push_back(Vec4( -1.0f, 1.0f, 0.0f, 1.0f));
vertices.push_back(Vec4( 1.0f, -1.0f, 0.0f, 1.0f));
vertices.push_back(Vec4( 1.0f, 1.0f, 0.0f, 1.0f));
- shaders.push_back(Shader(VK_SHADER_STAGE_VERTEX_BIT, m_context.getBinaryCollection().get("FragCoordMsaaVert")));
- shaders.push_back(Shader(VK_SHADER_STAGE_FRAGMENT_BIT, m_context.getBinaryCollection().get("FragCoordMsaaFrag")));
+ shaders.push_back(VulkanShader(VK_SHADER_STAGE_VERTEX_BIT, m_context.getBinaryCollection().get("FragCoordMsaaVert")));
+ shaders.push_back(VulkanShader(VK_SHADER_STAGE_FRAGMENT_BIT, m_context.getBinaryCollection().get("FragCoordMsaaFrag")));
DrawState drawState(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, m_renderSize.x(), m_renderSize.y());
DrawCallData drawCallData(vertices);
drawState.numSamples = m_sampleCount;
drawState.sampleShadingEnable = true;
- vulkanProgram.descriptorSetLayout = descriptorSetLayout;
- vulkanProgram.descriptorSet = descriptorSet;
+ vulkanProgram.descriptorSetLayout = *descriptorSetLayout;
+ vulkanProgram.descriptorSet = *descriptorSet;
VulkanDrawContext vulkanDrawContext(m_context, drawState, drawCallData, vulkanProgram);
vulkanDrawContext.draw();