1e5c31af7Sopenharmony_ci------------------------------------------------------------------------- 2e5c31af7Sopenharmony_cidrawElements Quality Program Test Specification 3e5c31af7Sopenharmony_ci----------------------------------------------- 4e5c31af7Sopenharmony_ci 5e5c31af7Sopenharmony_ciCopyright 2014 The Android Open Source Project 6e5c31af7Sopenharmony_ci 7e5c31af7Sopenharmony_ciLicensed under the Apache License, Version 2.0 (the "License"); 8e5c31af7Sopenharmony_ciyou may not use this file except in compliance with the License. 9e5c31af7Sopenharmony_ciYou may obtain a copy of the License at 10e5c31af7Sopenharmony_ci 11e5c31af7Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 12e5c31af7Sopenharmony_ci 13e5c31af7Sopenharmony_ciUnless required by applicable law or agreed to in writing, software 14e5c31af7Sopenharmony_cidistributed under the License is distributed on an "AS IS" BASIS, 15e5c31af7Sopenharmony_ciWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16e5c31af7Sopenharmony_ciSee the License for the specific language governing permissions and 17e5c31af7Sopenharmony_cilimitations under the License. 18e5c31af7Sopenharmony_ci------------------------------------------------------------------------- 19e5c31af7Sopenharmony_ci Multisample interpolation tests 20e5c31af7Sopenharmony_ci 21e5c31af7Sopenharmony_ciTests: 22e5c31af7Sopenharmony_ci + dEQP-GLES31.functional.shaders.multisample_interpolation.* 23e5c31af7Sopenharmony_ci + dEQP-GLES31.functional.state_query.multisample_interpolation.* 24e5c31af7Sopenharmony_ci 25e5c31af7Sopenharmony_ciIncludes: 26e5c31af7Sopenharmony_ci + Sample qualifier 27e5c31af7Sopenharmony_ci + interpolateAtSample 28e5c31af7Sopenharmony_ci + interpolateAtCentroid 29e5c31af7Sopenharmony_ci + interpolateAtOffset 30e5c31af7Sopenharmony_ci + Rendering to the default framebuffer, multi- and single sample 31e5c31af7Sopenharmony_ci textures and renderbuffers 32e5c31af7Sopenharmony_ci + Implementation limit queries for 33e5c31af7Sopenharmony_ci - MIN_FRAGMENT_INTERPOLATION_OFFSET 34e5c31af7Sopenharmony_ci - MAX_FRAGMENT_INTERPOLATION_OFFSET 35e5c31af7Sopenharmony_ci - FRAGMENT_INTERPOLATION_OFFSET_BITS 36e5c31af7Sopenharmony_ci 37e5c31af7Sopenharmony_ciExcludes: 38e5c31af7Sopenharmony_ci + interpolateAtSample() with non dynamically uniform sample index. 39e5c31af7Sopenharmony_ci + Rendering to every supported render buffer sample count / format 40e5c31af7Sopenharmony_ci + Rendering to every supported multisample texture sample count / format 41e5c31af7Sopenharmony_ci 42e5c31af7Sopenharmony_ciDescription: 43e5c31af7Sopenharmony_ci 44e5c31af7Sopenharmony_cisample_qualifier.* cases test sample qualifier by rendering a high frequency 45e5c31af7Sopenharmony_citest pattern with a sample-qualified varying. Using the same reasoning as in 46e5c31af7Sopenharmony_cisample shading test specification, the result image should contain numSamples + 47e5c31af7Sopenharmony_ci1 different shades of gray, e.g. single sampled render target should contain two 48e5c31af7Sopenharmony_cishades (black and white) and 2x sampled three shades. 49e5c31af7Sopenharmony_ci 50e5c31af7Sopenharmony_ciinterpolate_at_sample.* cases test interpolateAtSample() function with different 51e5c31af7Sopenharmony_ciinputs and render target configurations. 52e5c31af7Sopenharmony_ci 53e5c31af7Sopenharmony_ciinterpolate_at_sample.static_sample_number and 54e5c31af7Sopenharmony_ciinterpolate_at_sample.dynamic_sample_number cases sample a high frequency 55e5c31af7Sopenharmony_cifunction with at every sample position and average the result. static cases use 56e5c31af7Sopenharmony_ciinteger literals at which samples values are interpolated, in dynamic cases the 57e5c31af7Sopenharmony_cisample index "depends" (all samples are sampled anyway) on uniform values. 58e5c31af7Sopenharmony_ci 59e5c31af7Sopenharmony_ciinterpolate_at_sample.non_multisample_buffer cases test that using 60e5c31af7Sopenharmony_ciinterpolateAtSample() with a non-multisample render target with any sample index 61e5c31af7Sopenharmony_ciwill result in a value interpolated at the center of the pixel. Value is 62e5c31af7Sopenharmony_civerified by interpolating a varying containing screen-space location in pixels. 63e5c31af7Sopenharmony_ci 64e5c31af7Sopenharmony_ciinterpolate_at_sample.centroid_qualifier cases interpolate a centroid-qualified 65e5c31af7Sopenharmony_civarying with interpolateAtSample(). The tests render narrow triangles and 66e5c31af7Sopenharmony_cicompare results of interpolateAtSample of two identical varyings, but with 67e5c31af7Sopenharmony_cidifferent centroid-qualification. The centroid qualifier should not have any 68e5c31af7Sopenharmony_cieffect on the values returned by interpolateAtSample(). 69e5c31af7Sopenharmony_ci 70e5c31af7Sopenharmony_ciinterpolate_at_sample.at_sample_id cases test that sample index used by 71e5c31af7Sopenharmony_ciinterpolateAtSample is the same as in gl_SampleID. Tests compare value 72e5c31af7Sopenharmony_ciper-sample qualified varying and the value returned by 73e5c31af7Sopenharmony_ciinterpolateAtSample(v_varying, gl_SampleID). Values should be equal. 74e5c31af7Sopenharmony_ci 75e5c31af7Sopenharmony_ciinterpolate_at_centroid.* cases test interpolateAtCentroid() function with 76e5c31af7Sopenharmony_cidifferent inputs and render target configurations. 77e5c31af7Sopenharmony_ci 78e5c31af7Sopenharmony_ciinterpolate_at_centroid.consistency cases test that values returned by 79e5c31af7Sopenharmony_ciinterpolateAtCentroid are equal to the values of a centroid qualified varying. 80e5c31af7Sopenharmony_ciTests render multiple narrow triangles, assign the same value to a 81e5c31af7Sopenharmony_cicentroid-qualified and non-centroid-qualified varying and then compares the 82e5c31af7Sopenharmony_civalues of centroid-qualified varying and interpolateAtCentroid function return 83e5c31af7Sopenharmony_civalue when given the non-centroid-qualified varying as an input. 84e5c31af7Sopenharmony_ci 85e5c31af7Sopenharmony_ciinterpolate_at_centroid.array_element cases test interpolateAtCentroid function 86e5c31af7Sopenharmony_ciwhen given a varying array element as an input. Tests render multiple narrow 87e5c31af7Sopenharmony_citriangles, and the frament shader verifies that values returned by 88e5c31af7Sopenharmony_ciinterpolateAtCentroid() were interpolated within the primitive area. 89e5c31af7Sopenharmony_ci 90e5c31af7Sopenharmony_ciinterpolate_at_offset.* cases test interpolateAtOffset() function with different 91e5c31af7Sopenharmony_ciinputs and render target configurations. 92e5c31af7Sopenharmony_ci 93e5c31af7Sopenharmony_ciinterpolate_at_offset.no_qualifiers, .centroid_qualifier, and .sample_qualifier 94e5c31af7Sopenharmony_cicases test interpolateAtOffset() function targeting a varying without 95e5c31af7Sopenharmony_ciqualifiers, with centroid qualifier and with per-sample qualifier. 96e5c31af7Sopenharmony_ci.array_element cases test interpolateAtOffset targeting an array element. Tests 97e5c31af7Sopenharmony_cirender a quad and in the fragment shader use interpolateAtOffset to a 98e5c31af7Sopenharmony_ciscreen-space location (in pixels) varying. The fractional part of the returned 99e5c31af7Sopenharmony_civalue should be equal to the interpolation offset. 100e5c31af7Sopenharmony_ci 101e5c31af7Sopenharmony_ciinterpolate_at_offset.at_sample_position cases test that using 102e5c31af7Sopenharmony_ciinterpolateAtOffset to interpolate a value at the sample location returns the 103e5c31af7Sopenharmony_cisame value as a per-sample interpolated varying. 104