1e5c31af7Sopenharmony_ci#ifndef _TCUTEXCOMPAREVERIFIER_HPP 2e5c31af7Sopenharmony_ci#define _TCUTEXCOMPAREVERIFIER_HPP 3e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci * drawElements Quality Program Tester Core 5e5c31af7Sopenharmony_ci * ---------------------------------------- 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Copyright 2014 The Android Open Source Project 8e5c31af7Sopenharmony_ci * 9e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 10e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License. 11e5c31af7Sopenharmony_ci * You may obtain a copy of the License at 12e5c31af7Sopenharmony_ci * 13e5c31af7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 14e5c31af7Sopenharmony_ci * 15e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 16e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 17e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and 19e5c31af7Sopenharmony_ci * limitations under the License. 20e5c31af7Sopenharmony_ci * 21e5c31af7Sopenharmony_ci *//*! 22e5c31af7Sopenharmony_ci * \file 23e5c31af7Sopenharmony_ci * \brief Texture compare (shadow) result verifier. 24e5c31af7Sopenharmony_ci *//*--------------------------------------------------------------------*/ 25e5c31af7Sopenharmony_ci 26e5c31af7Sopenharmony_ci#include "tcuDefs.hpp" 27e5c31af7Sopenharmony_ci#include "tcuTexture.hpp" 28e5c31af7Sopenharmony_ci#include "tcuTexLookupVerifier.hpp" 29e5c31af7Sopenharmony_ci 30e5c31af7Sopenharmony_cinamespace tcu 31e5c31af7Sopenharmony_ci{ 32e5c31af7Sopenharmony_ci 33e5c31af7Sopenharmony_ci/*--------------------------------------------------------------------*//*! 34e5c31af7Sopenharmony_ci * \brief Texture compare (shadow) lookup precision parameters. 35e5c31af7Sopenharmony_ci * \see LookupPrecision 36e5c31af7Sopenharmony_ci *//*--------------------------------------------------------------------*/ 37e5c31af7Sopenharmony_cistruct TexComparePrecision 38e5c31af7Sopenharmony_ci{ 39e5c31af7Sopenharmony_ci IVec3 coordBits; //!< Bits per coordinate component before any transformations. Assumed to be floating-point. 40e5c31af7Sopenharmony_ci IVec3 uvwBits; //!< Bits per component in final per-level UV(W) coordinates. Assumed to be fixed-point. 41e5c31af7Sopenharmony_ci int pcfBits; //!< Number of accurate bits in PCF. This is additional error taken into account when doing filtering. Assumed to be fixed-point. 42e5c31af7Sopenharmony_ci int referenceBits; //!< Number of accurate bits in compare reference value. Assumed to be fixed-point. 43e5c31af7Sopenharmony_ci int resultBits; //!< Number of accurate bits in result value. Assumed to be fixed-point. 44e5c31af7Sopenharmony_ci 45e5c31af7Sopenharmony_ci TexComparePrecision (void) 46e5c31af7Sopenharmony_ci : coordBits (22) 47e5c31af7Sopenharmony_ci , uvwBits (16) 48e5c31af7Sopenharmony_ci , pcfBits (16) 49e5c31af7Sopenharmony_ci , referenceBits (16) 50e5c31af7Sopenharmony_ci , resultBits (16) 51e5c31af7Sopenharmony_ci { 52e5c31af7Sopenharmony_ci } 53e5c31af7Sopenharmony_ci} DE_WARN_UNUSED_TYPE; 54e5c31af7Sopenharmony_ci 55e5c31af7Sopenharmony_cibool isTexCompareResultValid (const Texture2DView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec2& coord, const Vec2& lodBounds, const float cmpReference, const float result); 56e5c31af7Sopenharmony_cibool isTexCompareResultValid (const TextureCubeView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec3& coord, const Vec2& lodBounds, const float cmpReference, const float result); 57e5c31af7Sopenharmony_cibool isTexCompareResultValid (const Texture2DArrayView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec3& coord, const Vec2& lodBounds, const float cmpReference, const float result); 58e5c31af7Sopenharmony_cibool isTexCompareResultValid (const Texture1DView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec1& coord, const Vec2& lodBounds, const float cmpReference, const float result); 59e5c31af7Sopenharmony_cibool isTexCompareResultValid (const Texture1DArrayView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec2& coord, const Vec2& lodBounds, const float cmpReference, const float result); 60e5c31af7Sopenharmony_cibool isTexCompareResultValid (const TextureCubeArrayView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec4& coord, const Vec2& lodBounds, const float cmpReference, const float result); 61e5c31af7Sopenharmony_ci 62e5c31af7Sopenharmony_cibool isGatherOffsetsCompareResultValid (const Texture2DView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec2& coord, const IVec2 (&offsets)[4], float cmpReference, const Vec4& result); 63e5c31af7Sopenharmony_cibool isGatherOffsetsCompareResultValid (const Texture2DArrayView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec3& coord, const IVec2 (&offsets)[4], float cmpReference, const Vec4& result); 64e5c31af7Sopenharmony_ci// \note For cube textures, gather is only defined without offset. 65e5c31af7Sopenharmony_cibool isGatherCompareResultValid (const TextureCubeView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec3& coord, float cmpReference, const Vec4& result); 66e5c31af7Sopenharmony_ci 67e5c31af7Sopenharmony_ci} // tcu 68e5c31af7Sopenharmony_ci 69e5c31af7Sopenharmony_ci#endif // _TCUTEXCOMPAREVERIFIER_HPP 70