Reviewed-by: Marek Olšák <marek.ol...@amd.com> Marek
On Tue, Jul 22, 2014 at 2:11 AM, Anuj Phogat <anuj.pho...@gmail.com> wrote: > because float depth texture data needs clamping to [0.0, 1.0]. Let the > _mesa_texstore() fallback to slower path. > > Fixes Khronos GLES3 CTS tests: > shadow_execution_vert > shadow_execution_frag > > V2: Move the check to _mesa_texstore_can_use_memcpy() function. > Add check for floating point data types. > > Cc: <mesa-sta...@lists.freedesktop.org> > Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> > --- > src/mesa/main/texstore.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c > index d363f9f..c87e407 100644 > --- a/src/mesa/main/texstore.c > +++ b/src/mesa/main/texstore.c > @@ -3830,6 +3830,21 @@ _mesa_texstore_can_use_memcpy(struct gl_context *ctx, > return GL_FALSE; > } > > + /* Depth texture data needs clamping in following cases: > + * - Floating point dstFormat with signed srcType: clamp to [0.0, 1.0]. > + * - Fixed point dstFormat with signed srcType: clamp to [0, 2^n -1]. > + * > + * All the cases except one (float dstFormat with float srcType) are ruled > + * out by _mesa_format_matches_format_and_type() check above. Handle the > + * remaining case here. > + */ > + if ((baseInternalFormat == GL_DEPTH_COMPONENT || > + baseInternalFormat == GL_DEPTH_STENCIL) && > + (srcType == GL_FLOAT || > + srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV)) { > + return GL_FALSE; > + } > + > return GL_TRUE; > } > > -- > 1.9.3 > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev