MovePtr<Buffer> dstImageBuffer = MovePtr<Buffer>(new Buffer(vk, device, allocator, dstImageBufferInfo, MemoryRequirement::HostVisible));
const VkExtent2D renderSize (makeExtent2D(uncompressedImageRes.x(), uncompressedImageRes.y()));
- const VkViewport viewport = makeViewport(renderSize.width, renderSize.height);
+ const VkViewport viewport = makeViewport(0.0f, 0.0f, static_cast<float>(renderSize.width), static_cast<float>(renderSize.height), 0.0f, 1.0f);
const VkRect2D scissor = makeScissor(renderSize.width, renderSize.height);
for (deUint32 layerNdx = 0; layerNdx < getLayerCount(); ++layerNdx)
const VkImageCreateInfo srcImageCreateInfo = makeCreateImageInfo(m_srcFormat, m_parameters.imageType, srcImageResolution, m_srcImageUsageFlags, imgCreateFlagsOverride, SINGLE_LEVEL, SINGLE_LAYER);
const VkExtent2D renderSize (makeExtent2D(uncompressedImageRes.x(), uncompressedImageRes.y()));
- const VkViewport viewport = makeViewport(renderSize.width, renderSize.height);
+ const VkViewport viewport = makeViewport(0.0f, 0.0f, static_cast<float>(renderSize.width), static_cast<float>(renderSize.height), 0.0f, 1.0f);
const VkRect2D scissor = makeScissor(renderSize.width, renderSize.height);
for (deUint32 layerNdx = 0; layerNdx < getLayerCount(); ++layerNdx)
MovePtr<Buffer> dstImageBuffer = MovePtr<Buffer>(new Buffer(vk, device, allocator, dstImageBufferInfo, MemoryRequirement::HostVisible));
const VkExtent2D renderSize (makeExtent2D(uncompressedImageRes.x(), uncompressedImageRes.y()));
- const VkViewport viewport = makeViewport(renderSize.width, renderSize.height);
+ const VkViewport viewport = makeViewport(0.0f, 0.0f, static_cast<float>(renderSize.width), static_cast<float>(renderSize.height), 0.0f, 1.0f);
const VkRect2D scissor = makeScissor(renderSize.width, renderSize.height);
for (deUint32 layerNdx = 0; layerNdx < getLayerCount(); ++layerNdx)
const VkImageCreateInfo srcImageCreateInfo = makeCreateImageInfo(m_srcFormat, m_parameters.imageType, srcImageResolution, m_srcImageUsageFlags, imgCreateFlagsOverride, SINGLE_LEVEL, SINGLE_LAYER);
const VkExtent2D renderSize (makeExtent2D(uncompressedImageRes.x(), uncompressedImageRes.y()));
- const VkViewport viewport = makeViewport(renderSize.width, renderSize.height);
+ const VkViewport viewport = makeViewport(0.0f, 0.0f, static_cast<float>(renderSize.width), static_cast<float>(renderSize.height), 0.0f, 1.0f);
const VkRect2D scissor = makeScissor(renderSize.width, renderSize.height);
for (deUint32 layerNdx = 0; layerNdx < getLayerCount(); ++layerNdx)
return createFramebuffer(vk, device, &framebufferInfo);
}
-VkViewport makeViewport (const deUint32 width,
- const deUint32 height)
-{
- const VkViewport viewport =
- {
- 0.0f, // float originX;
- 0.0f, // float originY;
- (float)width, // float width;
- (float)height, // float height;
- 0.0f, // float minDepth;
- 1.0f // float maxDepth;
- };
-
- return viewport;
-}
-
VkRect2D makeScissor (const deUint32 width,
const deUint32 height)
{