Commit ab9aae05 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Implement multisampled incomplete textures

Bug: angleproject:3588 Change-Id: I5b7d3151b34a77998b25dd4fa5761c92d74d8c81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562120Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarMohan Maiya <m.maiya@samsung.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 2114fcf2
......@@ -537,9 +537,7 @@ angle::Result ContextVk::getIncompleteTexture(const gl::Context *context,
gl::TextureType type,
gl::Texture **textureOut)
{
// At some point, we'll need to support multisample and we'll pass "this" instead of nullptr
// and implement the necessary interface.
return mIncompleteTextures.getIncompleteTexture(context, type, nullptr, textureOut);
return mIncompleteTextures.getIncompleteTexture(context, type, this, textureOut);
}
angle::Result ContextVk::initialize()
......@@ -4874,6 +4872,15 @@ void ContextVk::invalidateGraphicsPipelineAndDescriptorSets()
mGraphicsDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS);
}
angle::Result ContextVk::initializeMultisampleTextureToBlack(const gl::Context *context,
gl::Texture *glTexture)
{
ASSERT(glTexture->getType() == gl::TextureType::_2DMultisample);
TextureVk *textureVk = vk::GetImpl(glTexture);
return textureVk->initializeContents(context, gl::ImageIndex::Make2DMultisample());
}
angle::Result ContextVk::updateRenderPassDepthStencilAccess()
{
if (hasStartedRenderPass() && mDrawFramebuffer->getDepthStencilRenderTarget())
......
......@@ -37,7 +37,7 @@ class ShareGroupVk;
static constexpr uint32_t kMaxGpuEventNameLen = 32;
using EventName = std::array<char, kMaxGpuEventNameLen>;
class ContextVk : public ContextImpl, public vk::Context
class ContextVk : public ContextImpl, public vk::Context, public MultisampleTextureInitializer
{
public:
ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk *renderer);
......@@ -570,6 +570,10 @@ class ContextVk : public ContextImpl, public vk::Context
// descriptor sets it binds need to be undone.
void invalidateGraphicsPipelineAndDescriptorSets();
// Implementation of MultisampleTextureInitializer
angle::Result initializeMultisampleTextureToBlack(const gl::Context *context,
gl::Texture *glTexture) override;
private:
// Dirty bits.
enum DirtyBitType : size_t
......
......@@ -59,12 +59,8 @@
4723 VULKAN NVIDIA : KHR-GLES31.core.shader_image_size.advanced-nonMS-vs-uint = SKIP
4723 VULKAN NVIDIA : KHR-GLES31.core.program_interface_query.transform-feedback-types = SKIP
// Cannot support incomplete multisample texture:
3588 VULKAN : KHR-GLES31.core.sample_variables*samples_0* = SKIP
// These test are failed, but the fault about incomplete multisample texture, these tests need to be SKIP.
// Incompatible between incomplete texture and sampler format (isampler2D or usampler2D):
3588 VULKAN : KHR-GLES31.core.sample_variables.mask.rgba8*i.* = SKIP
3588 VULKAN : KHR-GLES31.core.sample_variables.mask.rgba8*i.* = FAIL
// Geometry shader support
5406 VULKAN : KHR-GLES31.core.draw_indirect.basic-mode-*adjacency = SKIP
......@@ -106,8 +102,7 @@
4159 VULKAN PIXEL2ORXL : KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-arrays = FAIL
// Fails to link the shader program on Pixel2 and Pixel2 XL
// These test are failed, but the fault about incomplete multisample texture, these tests need to be SKIP.
3588 VULKAN PIXEL2ORXL : KHR-GLES31.core.sample_variables.mask.rgba8.samples_*.mask_* = SKIP
3588 VULKAN PIXEL2ORXL : KHR-GLES31.core.sample_variables.mask.rgba8.samples_*.mask_* = FAIL
// Android uses "old" sampler rewrite that doesn't support array of arrays
2703 VULKAN ANDROID : KHR-GLES31.core.arrays_of_arrays.* = SKIP
......
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