[Mesa-dev] [PATCH v2 1/2] glsl/nir: add pixel_center_integer to shader info
Kenneth Graunke
kenneth at whitecape.org
Fri Feb 16 23:30:40 UTC 2018
On Thursday, February 15, 2018 9:18:51 PM PST Timothy Arceri wrote:
> ---
> src/compiler/glsl/glsl_to_nir.cpp | 5 +++++
> src/compiler/shader_info.h | 2 ++
> 2 files changed, 7 insertions(+)
>
> diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
> index 1a579f41cd..7a9d15015e 100644
> --- a/src/compiler/glsl/glsl_to_nir.cpp
> +++ b/src/compiler/glsl/glsl_to_nir.cpp
> @@ -406,6 +406,11 @@ nir_visitor::visit(ir_variable *ir)
> var->data.pixel_center_integer = ir->data.pixel_center_integer;
> var->data.location_frac = ir->data.location_frac;
>
> + if (var->data.pixel_center_integer) {
> + assert(shader->info.stage == MESA_SHADER_FRAGMENT);
> + shader->info.fs.pixel_center_integer = true;
> + }
> +
> switch (ir->data.depth_layout) {
> case ir_depth_layout_none:
> var->data.depth_layout = nir_depth_layout_none;
> diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
> index 45ef4b5039..11a59ff6ac 100644
> --- a/src/compiler/shader_info.h
> +++ b/src/compiler/shader_info.h
> @@ -164,6 +164,8 @@ typedef struct shader_info {
>
> bool post_depth_coverage;
>
> + bool pixel_center_integer;
> +
> /** gl_FragDepth layout for ARB_conservative_depth. */
> enum gl_frag_depth_layout depth_layout;
> } fs;
>
This looks good, thanks Tim!
Series is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180216/7f829edf/attachment.sig>
More information about the mesa-dev
mailing list