Lines Matching refs:vk
32 …xt& context, const char* vertexShaderName, const char* fragmentShaderName, vk::VkPrimitiveTopology… in DrawTestsBaseClass()
34 , m_colorAttachmentFormat (vk::VK_FORMAT_R8G8B8A8_UNORM) in DrawTestsBaseClass()
44 const vk::VkDevice device = m_context.getDevice(); in initialize()
48 m_pipelineLayout = vk::createPipelineLayout(m_vk, device, &pipelineLayoutCreateInfo); in initialize()
50 const vk::VkExtent3D targetImageExtent = { WIDTH, HEIGHT, 1 }; in initialize()
51 … ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, targetImageE… in initialize()
52 …vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER… in initialize()
56 …const ImageViewCreateInfo colorTargetViewInfo(m_colorTargetImage->object(), vk::VK_IMAGE_VIEW_TYPE… in initialize()
57 m_colorTargetView = vk::createImageView(m_vk, device, &colorTargetViewInfo); in initialize()
61 vk::VK_SAMPLE_COUNT_1_BIT, in initialize()
62 vk::VK_ATTACHMENT_LOAD_OP_LOAD, in initialize()
63 vk::VK_ATTACHMENT_STORE_OP_STORE, in initialize()
64 vk::VK_ATTACHMENT_LOAD_OP_DONT_CARE, in initialize()
65 vk::VK_ATTACHMENT_STORE_OP_STORE, in initialize()
66 vk::VK_IMAGE_LAYOUT_GENERAL, in initialize()
67 vk::VK_IMAGE_LAYOUT_GENERAL)); in initialize()
70 const vk::VkAttachmentReference colorAttachmentReference = in initialize()
73 vk::VK_IMAGE_LAYOUT_GENERAL in initialize()
76 renderPassCreateInfo.addSubpass(SubpassDescription(vk::VK_PIPELINE_BIND_POINT_GRAPHICS, in initialize()
87 m_renderPass = vk::createRenderPass(m_vk, device, &renderPassCreateInfo); in initialize()
89 std::vector<vk::VkImageView> colorAttachments(1); in initialize()
94 m_framebuffer = vk::createFramebuffer(m_vk, device, &framebufferCreateInfo); in initialize()
96 const vk::VkVertexInputBindingDescription vertexInputBindingDescription = in initialize()
100 vk::VK_VERTEX_INPUT_RATE_VERTEX, in initialize()
103 const vk::VkVertexInputAttributeDescription vertexInputAttributeDescriptions[] = in initialize()
108 vk::VK_FORMAT_R32G32B32A32_SFLOAT, in initialize()
114 vk::VK_FORMAT_R32G32B32A32_SFLOAT, in initialize()
120 vk::VK_FORMAT_R32_SINT, in initialize()
130 const vk::VkDeviceSize dataSize = m_data.size() * sizeof(VertexElementData); in initialize()
132 …vk::VK_BUFFER_USAGE_VERTEX_BUFFER_BIT), m_context.getDefaultAllocator(), vk::MemoryRequirement::Ho… in initialize()
137 vk::flushMappedMemoryRange(m_vk, in initialize()
144 m_cmdPool = vk::createCommandPool(m_vk, device, &cmdPoolCreateInfo); in initialize()
145 …m_cmdBuffer = vk::allocateCommandBuffer(m_vk, device, *m_cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIM… in initialize()
150 void DrawTestsBaseClass::initPipeline (const vk::VkDevice device) in initPipeline()
152 …const vk::Unique<vk::VkShaderModule> vs(createShaderModule(m_vk, device, m_context.getBinaryCollec… in initPipeline()
153 …const vk::Unique<vk::VkShaderModule> fs(createShaderModule(m_vk, device, m_context.getBinaryCollec… in initPipeline()
157 vk::VkViewport viewport; in initPipeline()
165 vk::VkRect2D scissor; in initPipeline()
172 …pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_ST… in initPipeline()
173 …pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_ST… in initPipeline()
177 …tate(PipelineCreateInfo::ViewportState(1, std::vector<vk::VkViewport>(1, viewport), std::vector<vk… in initPipeline()
182 m_pipeline = vk::createGraphicsPipeline(m_vk, device, DE_NULL, &pipelineCreateInfo); in initPipeline()
187 const vk::VkClearColorValue clearColor = { { 0.0f, 0.0f, 0.0f, 1.0f } }; in beginRenderPass()
192 …initialTransitionColor2DImage(m_vk, *m_cmdBuffer, m_colorTargetImage->object(), vk::VK_IMAGE_LAYOU… in beginRenderPass()
194 const ImageSubresourceRange subresourceRange(vk::VK_IMAGE_ASPECT_COLOR_BIT); in beginRenderPass()
196 vk::VK_IMAGE_LAYOUT_GENERAL, &clearColor, 1, &subresourceRange); in beginRenderPass()
198 const vk::VkMemoryBarrier memBarrier = in beginRenderPass()
200 vk::VK_STRUCTURE_TYPE_MEMORY_BARRIER, in beginRenderPass()
202 vk::VK_ACCESS_TRANSFER_WRITE_BIT, in beginRenderPass()
203 vk::VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | vk::VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT in beginRenderPass()
206 m_vk.cmdPipelineBarrier(*m_cmdBuffer, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, in beginRenderPass()
207 vk::VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, in beginRenderPass()
210 const vk::VkRect2D renderArea = { { 0, 0 }, { WIDTH, HEIGHT } }; in beginRenderPass()
213 m_vk.cmdBeginRenderPass(*m_cmdBuffer, &renderPassBegin, vk::VK_SUBPASS_CONTENTS_INLINE); in beginRenderPass()