Commit bc0a7b58 by Courtney Goeltzenleuchter Committed by Commit Bot

Add support for sampling stencil texture

Suspect a potential driver issue with integer sampling from stencil so skip dEQP-GLES31.functional.stencil_texturing.misc.compare_mode_effect in the expectations file. Will follow-up with more directed tests. Also skip dEQP-GLES31.functional.stencil_texturing.misc.base_level Blocking Bug: angleproject:3148 Test: dEQP-GLES31.functional.stencil_texturing* Bug: angleproject:3575 Change-Id: I9547406b44ec16629631c1bf50907e6a24f1a20e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1736946 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 5a2553a7
......@@ -134,6 +134,7 @@ class TextureState final : private angle::NonCopyable
const SamplerState &getSamplerState() const { return mSamplerState; }
GLenum getUsage() const { return mUsage; }
GLenum getDepthStencilTextureMode() const { return mDepthStencilTextureMode; }
bool isStencilMode() const { return mDepthStencilTextureMode == GL_STENCIL_INDEX; }
// Returns the desc of the base level. Only valid for cube-complete/mip-complete textures.
const ImageDesc &getBaseLevelDesc() const;
......
......@@ -173,6 +173,19 @@ class TextureVk : public TextureImpl
}
private:
struct TextureVkViews final : angle::NonCopyable
{
TextureVkViews();
~TextureVkViews();
void release(ContextVk *contextVk, Serial currentSerial);
vk::ImageView mDrawBaseLevelImageView;
vk::ImageView mReadBaseLevelImageView;
vk::ImageView mReadMipmapImageView;
vk::ImageView mFetchBaseLevelImageView;
vk::ImageView mFetchMipmapImageView;
};
// Transform an image index from the frontend into one that can be used on the backing
// ImageHelper, taking into account mipmap or cube face offsets
gl::ImageIndex getNativeImageIndex(const gl::ImageIndex &inputImageIndex) const;
......@@ -283,6 +296,13 @@ class TextureVk : public TextureImpl
uint32_t levelCount,
uint32_t layerCount);
angle::Result init3DRenderTargets(ContextVk *contextVk);
angle::Result initImageViewImpl(ContextVk *contextVk,
const vk::Format &format,
uint32_t levelCount,
uint32_t layerCount,
TextureVkViews *views,
VkImageAspectFlags aspectFlags,
gl::SwizzleState mappedSwizzle);
angle::Result initCubeMapRenderTargets(ContextVk *contextVk);
angle::Result ensureImageInitializedImpl(ContextVk *contextVk,
......@@ -292,6 +312,8 @@ class TextureVk : public TextureImpl
void onStagingBufferChange() { onStateChange(angle::SubjectMessage::SubjectChanged); }
const TextureVkViews *getTextureViews() const;
bool mOwnsImage;
gl::TextureType mImageNativeType;
......@@ -306,11 +328,8 @@ class TextureVk : public TextureImpl
vk::ImageHelper *mImage;
vk::ImageView mDrawBaseLevelImageView;
vk::ImageView mReadBaseLevelImageView;
vk::ImageView mReadMipmapImageView;
vk::ImageView mFetchBaseLevelImageView;
vk::ImageView mFetchMipmapImageView;
TextureVkViews mDefaultViews;
TextureVkViews mStencilViews;
std::vector<std::vector<vk::ImageView>> mLayerLevelDrawImageViews;
vk::Sampler mSampler;
......
......@@ -695,8 +695,10 @@
// Transform feedback:
3205 VULKAN : dEQP-GLES31.functional.debug.*transform_feedback = SKIP
// Stencil textures (some missing support for 3D and 2D array textures):
3585 VULKAN : dEQP-GLES31.functional.stencil_texturing.* = SKIP
// Stencil textures (some missing support for base level):
3683 VULKAN PIXEL2 : dEQP-GLES31.functional.stencil_texturing.format.* = FAIL
3683 VULKAN PIXEL2 : dEQP-GLES31.functional.stencil_texturing.misc.compare_mode_effect = FAIL
3148 VULKAN : dEQP-GLES31.functional.stencil_texturing.misc.base_level = SKIP
// Multisampled textures:
3565 VULKAN : dEQP-GLES31.functional.texture.multisample.* = 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