Commit 01b21b19 by Yuly Novikov Committed by Commit Bot

Vulkan: get render target format from config

Instead of hardcoded GL_BGRA8_EXT. Also change renderTargetFormat to GL_BGRA8_EXT in DisplayVk::generateConfigs() BUG=angleproject:2314 Change-Id: I47471add4e681fd0b8101d475c4a33ab59920c5c Reviewed-on: https://chromium-review.googlesource.com/881952 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent e49f1e95
......@@ -51,7 +51,7 @@ egl::ConfigSet DisplayVk::generateConfigs()
{
// TODO(jmadill): Multiple configs, pbuffers, and proper checking of config attribs.
egl::Config singleton;
singleton.renderTargetFormat = GL_RGBA8;
singleton.renderTargetFormat = GL_BGRA8_EXT;
singleton.depthStencilFormat = GL_NONE;
singleton.bufferSize = 32;
singleton.redSize = 8;
......
......@@ -24,12 +24,6 @@ namespace rx
namespace
{
const vk::Format &GetVkFormatFromConfig(RendererVk *renderer, const egl::Config &config)
{
// TODO(jmadill): Properly handle format interpretation.
return renderer->getFormat(GL_BGRA8_EXT);
}
VkPresentModeKHR GetDesiredPresentMode(const std::vector<VkPresentModeKHR> &presentModes,
EGLint minSwapInterval,
EGLint maxSwapInterval)
......@@ -306,7 +300,7 @@ vk::Error WindowSurfaceVk::initializeImpl(RendererVk *renderer)
ANGLE_VK_TRY(vkGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, mSurface, &surfaceFormatCount,
surfaceFormats.data()));
mRenderTarget.format = &GetVkFormatFromConfig(renderer, *mState.config);
mRenderTarget.format = &renderer->getFormat(mState.config->renderTargetFormat);
VkFormat nativeFormat = mRenderTarget.format->vkTextureFormat;
if (surfaceFormatCount == 1u && surfaceFormats[0].format == VK_FORMAT_UNDEFINED)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment