Commit 0f2aa31d by JiangYizhou Committed by Commit Bot

ES31: Fix bug on incomplete texture validation of internalformat and filterable

Multisampled texture with unfilterable internalformat and default filter state shouldn't be justified as incomplete texture in angle. However, the default filter state is set to LINEAR and internalformat like R8I or R8UI is not filterable, which lead to texture incomplete. In es 3.1 spec 8.16, 'The effective internal format specified for the texture arrays is a sized internal color format that is not texture - filterable(see table 8.13), and either the magnification filter is not NEAREST or the minification filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST'. As to Table 20.11, The default value of minFilter is NEAREST_MIPMAP_LINEAR, magFilter is LINEAR. Because in 11.1.3.3,'Multisample textures are not filtered when samples are fetched, and filter state is ignored.' So we ignore filtering for multismaple texture completeness. BUG=angleproject:1590 TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_*_texture_2d TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_*_texture_int_2d TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_*_texture_uint_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_color_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_int_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_uint_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_depth_2d Change-Id: I0533bd028e0bbb66d9f731a2395f6c8ae7db8938 Reviewed-on: https://chromium-review.googlesource.com/564843 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent c71ea661
......@@ -222,7 +222,13 @@ bool TextureState::computeSamplerCompleteness(const SamplerState &samplerState,
return false;
}
if (!baseImageDesc.format.info->filterSupport(data.getClientVersion(), data.getExtensions()) &&
// According to es 3.1 spec, texture is justified as incomplete if sized internalformat is
// unfilterable(table 20.11) and filter is not GL_NEAREST(8.16). The default value of minFilter
// is NEAREST_MIPMAP_LINEAR and magFilter is LINEAR(table 20.11,). For multismaple texture,
// filter state of multisample texture is ignored(11.1.3.3). So it shouldn't be judged as
// incomplete texture. So, we ignore filtering for multisample texture completeness here.
if (mTarget != GL_TEXTURE_2D_MULTISAMPLE &&
!baseImageDesc.format.info->filterSupport(data.getClientVersion(), data.getExtensions()) &&
!IsPointSampled(samplerState))
{
return false;
......@@ -237,7 +243,7 @@ bool TextureState::computeSamplerCompleteness(const SamplerState &samplerState,
}
}
if (IsMipmapFiltered(samplerState))
if (mTarget != GL_TEXTURE_2D_MULTISAMPLE && IsMipmapFiltered(samplerState))
{
if (!npotSupport)
{
......@@ -286,7 +292,8 @@ bool TextureState::computeSamplerCompleteness(const SamplerState &samplerState,
// depth and stencil format (see table 3.13), the value of TEXTURE_COMPARE_-
// MODE is NONE, and either the magnification filter is not NEAREST or the mini-
// fication filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST.
if (baseImageDesc.format.info->depthBits > 0 && data.getClientMajorVersion() >= 3)
if (mTarget != GL_TEXTURE_2D_MULTISAMPLE && baseImageDesc.format.info->depthBits > 0 &&
data.getClientMajorVersion() >= 3)
{
// Note: we restrict this validation to sized types. For the OES_depth_textures
// extension, due to some underspecification problems, we must allow linear filtering
......
......@@ -37,20 +37,7 @@
1442 D3D11 : dEQP-GLES31.functional.stencil_texturing.* = SKIP
1442 D3D11 : dEQP-GLES31.functional.texture.gather.* = SKIP
// OpenGL Failing Tests
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_1_texture_2d_array = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_4_texture_2d_array = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_1_texture_int_2d = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_4_texture_int_2d = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_1_texture_int_2d_array = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_4_texture_int_2d_array = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_1_texture_uint_2d = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_4_texture_uint_2d = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_1_texture_uint_2d_array = FAIL
1442 OPENGL : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_4_texture_uint_2d_array = FAIL
// D3D11 Failing Tests
1442 D3D11 : dEQP-GLES31.functional.shaders.builtin_functions.texture_size.* = FAIL
1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_color_texture_samples_* = FAIL
1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_depth_texture_samples_* = FAIL
1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_integer_samples_* = FAIL
......@@ -1336,12 +1323,3 @@
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_64.sample_mask_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_1.use_texture_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_2.use_texture_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_3.use_texture_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_4.use_texture_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_8.use_texture_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_10.use_texture_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_12.use_texture_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_13.use_texture_* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.texture.multisample.samples_64.use_texture_* = FAIL
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