diff options
author | Iago Toral Quiroga <[email protected]> | 2015-02-10 16:40:48 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2015-05-18 11:23:17 +0200 |
commit | 845ad2667ab2466752f06ea30bdb9c837116c308 (patch) | |
tree | 94ba9f2746f43d26c3220b0b7dff1a0ad23eb46e /src/SConscript | |
parent | 5a55f681f6208122cd4921b283cffd54ea335128 (diff) |
i965: Fix textureSize for Lod > 0 with non-mipmap filters
Currently, when the MinFilter is GL_LINEAR or GL_NEAREST we hide the
actual miplevel count from the hardware (and we avoid re-creating
the miptree structure with all the levels), since we don't expect
levels other than the base level to be needed. Unfortunately,
GLSL's textureSize() function is an exception to this rule. This
function takes a lod parameter that we need to use to return the
size of the appropriate miplevel (if it exists). The spec only
requires that the miplevel exists, so even if the sampler is
configured with a linear or nearest MinFilter, as far as the user
has uploaded miplevels for the texture, textureSize() should return
the appropriate sizes.
This patch fixes this by exposing the actual miplevel count for all
sampling engine textures while keeping the original implementation
for render targets (for render targets textures we do not provide
the miplevel count but the actual LOD we are wrting to, so we
want to make sure that we make this the base level).
Fixes 28 dEQP tests in the following category:
dEQP-GLES3.functional.shaders.texture_functions.texturesize.*
Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/SConscript')
0 files changed, 0 insertions, 0 deletions