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, ...@@ -537,9 +537,7 @@ angle::Result ContextVk::getIncompleteTexture(const gl::Context *context,
gl::TextureType type, gl::TextureType type,
gl::Texture **textureOut) gl::Texture **textureOut)
{ {
// At some point, we'll need to support multisample and we'll pass "this" instead of nullptr return mIncompleteTextures.getIncompleteTexture(context, type, this, textureOut);
// and implement the necessary interface.
return mIncompleteTextures.getIncompleteTexture(context, type, nullptr, textureOut);
} }
angle::Result ContextVk::initialize() angle::Result ContextVk::initialize()
...@@ -4874,6 +4872,15 @@ void ContextVk::invalidateGraphicsPipelineAndDescriptorSets() ...@@ -4874,6 +4872,15 @@ void ContextVk::invalidateGraphicsPipelineAndDescriptorSets()
mGraphicsDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS); 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() angle::Result ContextVk::updateRenderPassDepthStencilAccess()
{ {
if (hasStartedRenderPass() && mDrawFramebuffer->getDepthStencilRenderTarget()) if (hasStartedRenderPass() && mDrawFramebuffer->getDepthStencilRenderTarget())
......
...@@ -37,7 +37,7 @@ class ShareGroupVk; ...@@ -37,7 +37,7 @@ class ShareGroupVk;
static constexpr uint32_t kMaxGpuEventNameLen = 32; static constexpr uint32_t kMaxGpuEventNameLen = 32;
using EventName = std::array<char, kMaxGpuEventNameLen>; using EventName = std::array<char, kMaxGpuEventNameLen>;
class ContextVk : public ContextImpl, public vk::Context class ContextVk : public ContextImpl, public vk::Context, public MultisampleTextureInitializer
{ {
public: public:
ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk *renderer); ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk *renderer);
...@@ -570,6 +570,10 @@ class ContextVk : public ContextImpl, public vk::Context ...@@ -570,6 +570,10 @@ class ContextVk : public ContextImpl, public vk::Context
// descriptor sets it binds need to be undone. // descriptor sets it binds need to be undone.
void invalidateGraphicsPipelineAndDescriptorSets(); void invalidateGraphicsPipelineAndDescriptorSets();
// Implementation of MultisampleTextureInitializer
angle::Result initializeMultisampleTextureToBlack(const gl::Context *context,
gl::Texture *glTexture) override;
private: private:
// Dirty bits. // Dirty bits.
enum DirtyBitType : size_t enum DirtyBitType : size_t
......
...@@ -59,12 +59,8 @@ ...@@ -59,12 +59,8 @@
4723 VULKAN NVIDIA : KHR-GLES31.core.shader_image_size.advanced-nonMS-vs-uint = SKIP 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 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): // 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 // Geometry shader support
5406 VULKAN : KHR-GLES31.core.draw_indirect.basic-mode-*adjacency = SKIP 5406 VULKAN : KHR-GLES31.core.draw_indirect.basic-mode-*adjacency = SKIP
...@@ -106,8 +102,7 @@ ...@@ -106,8 +102,7 @@
4159 VULKAN PIXEL2ORXL : KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-arrays = FAIL 4159 VULKAN PIXEL2ORXL : KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-arrays = FAIL
// Fails to link the shader program on Pixel2 and Pixel2 XL // 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_* = FAIL
3588 VULKAN PIXEL2ORXL : KHR-GLES31.core.sample_variables.mask.rgba8.samples_*.mask_* = SKIP
// Android uses "old" sampler rewrite that doesn't support array of arrays // Android uses "old" sampler rewrite that doesn't support array of arrays
2703 VULKAN ANDROID : KHR-GLES31.core.arrays_of_arrays.* = SKIP 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