QCOM_texture_foveated2

Name

QCOM_texture_foveated2

Name Strings

GL_QCOM_texture_foveated2

Contact

Jeff Leger - jleger 'at' qti.qualcomm.com

Contributors

Sam Holmes
Jonathan Wicks
Arpit Agarwal

Status

Complete

Version

Last Modified Date:  October 12, 2020
Author Revision: 1.0

Number

 OpenGL ES Extension #331

Dependencies

This extension requires QCOM_texture_foveated.

This extension interacts with QCOM_texture_foveated_subsampled_layout.

Overview

This extension adds a new texture parameter that specifies a pixel density
below which rendering can be discarded during foveated rendering.

New Tokens

Accepted as a value for <pname> for the TexParameter{if} and
TexParameter{if}v commands and for the <pname> parameter of
GetTexParameter{if}v:

TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM         0x96A0

Add new rows to Table 8.19 (Texture parameters and their values):

    Name                               | Type | Legal Values
------------------------------------------------------------
TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM | float | Any float between 0.0 and 1.0

Add new rows to Table 21.10 Textures (state per texture object)

Get value | Type | Get Command | Initial Value | Description | Sec
------------------------------------------------------------------
TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM | R[0.0,1.0] | GetTexParameter{if}v | 0.0 | Pixel density threshold for rendering cutoff | 8.19

This parameter defines the cutoff pixel density for a given focal
point at the location (px,py) on a texture layer in NDC as:

cutoff_pixel_density=TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM;
for(int i=0;i<focalPointsPerLayer;++i){
    focal_point_density = 1./max((focalX[i]-px)^2*gainX[i]^2+
                        (focalY[i]-py)^2*gainY[i]^2-foveaArea[i],1.);
    if(focal_point_density >= cutoff_pixel_density)
        shade pixel;
}

The resulting contents of the buffer regions corresponding to the
discarded pixels will be undefined.

New Procedures and Functions

None.

Errors

INVALID_VALUE is generated by TexParameter{if} or TexParamter{if}v
if <pname> is TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM and <param> is a
float less than 0.0 or greater than 1.0.

Issues

(1)  What are the texture contents in discarded regions?

RESOLVED: After a draw operation where the foveation density cutoff
is applied, the contents of the discarded regions of the texture become
undefined. It is the application's responsibility to only sample from
the regions of the texture that are above the cutoff pixel density, as
specified by the provided foveation parameters.

(2)  Are any other buffers impacted other than color buffer?

RESOLVED: Yes. Contents of the depth and stencil buffers will be
undefined for discarded regions.

(3)  What is the impact on primitive/geometric data for discarded regions?

RESOLVED: For the discarded regions, primitive data is also discarded so
the behavior of all shaders in the vertex processing stage is undefined
for these regions (such as UAV writes and transform feedback).

Revision History

  Rev.    Date    Author    Changes
  ----  --------  --------  -----------------------------------------
  1.0   10/12/20  jleger  Initial version.