Skip to content

GL_QCOM_tile_shading #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wooyoungqcom
Copy link
Contributor

This extension addes support for QCOM tile shading functionaltiy in GLSL

Comment on lines +59 to +61
In addition, it adds new input layout qualifiers for compute shaders to facilitate
area-based dispatch that proportionally maps compute threads to pixels in a tile
and to determine the optimal split between workgroup sizes and workgroup counts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this sentence hard to parse. What is it that is "to determine the optimal split between workgroup sizes and counts"? Is it the layout qualifiers?

Also, a nit, I'm not sure that "proportionally" here makes this clearer. I think I know what you're intending to say, but I don't think this is clear from the text.


Modify the Fragment Shader Inputs subsection under 4.4.1 Input Layout Qualifiers (p. 76)

Fragment shaders allow the following layout qualifier of in only (not with variable declarations):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Fragment shaders allow the following layout qualifier of in only (not with variable declarations):
Fragment shaders allow the following layout qualifier on in only (not with variable declarations):

Comment on lines +147 to +149
The shading_rate_xQCOM and shading_rate_yQCOM qualifiers are required to be a power of 2.
If any of the shading rate values is greater than the maximum value supported by the
implementation for that dimension, a run-time validation failure will result.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You say what happens if the rate is over the maximum but only that a power of 2 is required. Is it a compile error to specify something else?

Comment on lines +159 to +160
Furthermore, if a program object contains any compute shaders, at least one must contain an input
layout qualifier specifying a fixed workgroup size for the program, or a link-time error will occur.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still true that you have to declare a fixed workgroup size if you're using the shading_rate versions of the qualifiers?

Comment on lines +151 to +153
If present, the qualifiers will override the local_size_x/local_size_y/local_size_z
layout qualifiers and the implementation will compute the workgroup sizes. This implies
that uses of local_size_id_x/local_size_id_y/local_size_id_z layout qualifiers are ignored.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having read through this section I'm still not really sure what the qualifiers are supposed to do or what the rate means. Is it that the workgroup size is the tile size divided by the shading rate?

Comment on lines +237 to +246
The input variable gl_TileOffsetQCOM is filled with the framebuffer
coordinates of the top-left texel of the current tile.

The input variable gl_TileDimensionQCOM represents the tile dimension in pixels (x and y)
as well as the number of layers (z). The gl_TileDimensionQCOM will report the same tile
dimensions for all tiles in a rendering pass, including "edge tiles" that may only be
partially rendered because the tile boundaries extend beyond the edges of the framebuffer
or the Vulkan API "renderArea".

The input variable gl_TileApronSizeQCOM represents the widths of an apron (in X and Y directions).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be appropriate to replace this text with something that just says that they;re defined the same as in fragment shaders?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants