Skip to content

Commit

Permalink
add QCOM_texture_foveated2
Browse files Browse the repository at this point in the history
  • Loading branch information
jackohound committed Oct 13, 2020
1 parent 9274192 commit f1d12e8
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 1 deletion.
114 changes: 114 additions & 0 deletions extensions/QCOM/QCOM_texture_foveated2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
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.

2 changes: 2 additions & 0 deletions extensions/esext.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,4 +687,6 @@
</li>
<li value=330><a href="extensions/NV/NV_timeline_semaphore.txt">GL_NV_timeline_semaphore</a>
</li>
<li value=331><a href="extensions/QCOM/QCOM_texture_foveated2.txt">GL_QCOM_texture_foveated2</a>
</li>
</ol>
5 changes: 5 additions & 0 deletions extensions/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -4553,6 +4553,11 @@
'flags' : { 'public' },
'url' : 'extensions/QCOM/QCOM_texture_foveated.txt',
},
'GL_QCOM_texture_foveated2' : {
'esnumber' : 331,
'flags' : { 'public' },
'url' : 'extensions/QCOM/QCOM_texture_foveated2.txt',
},
'GL_QCOM_texture_foveated_subsampled_layout' : {
'esnumber' : 306,
'flags' : { 'public' },
Expand Down
8 changes: 7 additions & 1 deletion xml/gl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11620,7 +11620,8 @@ typedef unsigned int GLhandleARB;
</enums>

<enums namespace="GL" start="0x96A0" end="0x96AF" vendor="Qualcomm" comment="contact Jeff Leger">
<unused start="0x96A0" end="0x96A1" vendor="Qualcomm"/>
<enum value="0x96A0" name="GL_TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM" group="TextureParameterName"/>
<unused start="0x96A1" end="0x96A1" vendor="Qualcomm"/>
<enum value="0x96A2" name="GL_FRAMEBUFFER_FETCH_NONCOHERENT_QCOM" group="FramebufferFetchNoncoherent"/>
<enum value="0x96A3" name="GL_VALIDATE_SHADER_BINARY_QCOM"/>
<enum value="0x96A4" name="GL_SHADING_RATE_QCOM" group="GetPName"/>
Expand Down Expand Up @@ -51106,6 +51107,11 @@ typedef unsigned int GLhandleARB;
<command name="glTextureFoveationParametersQCOM"/>
</require>
</extension>
<extension name="GL_QCOM_texture_foveated2" supported="gles2">
<require>
<enum name="GL_TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM"/>
</require>
</extension>
<extension name="GL_QCOM_texture_foveated_subsampled_layout" supported="gles2">
<require>
<enum name="GL_FOVEATION_SUBSAMPLED_LAYOUT_METHOD_BIT_QCOM"/>
Expand Down

0 comments on commit f1d12e8

Please sign in to comment.