-
Notifications
You must be signed in to change notification settings - Fork 102
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
base: main
Are you sure you want to change the base?
GL_QCOM_tile_shading #282
Conversation
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. |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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): |
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. |
There was a problem hiding this comment.
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?
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. |
There was a problem hiding this comment.
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?
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. |
There was a problem hiding this comment.
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?
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). |
There was a problem hiding this comment.
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?
This extension addes support for QCOM tile shading functionaltiy in GLSL