diff options
author | Kenneth Graunke <[email protected]> | 2016-05-18 11:38:32 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-05-20 14:30:00 -0700 |
commit | 6e5d86c07af920fa52afbe075a04116b9ebb3cc3 (patch) | |
tree | 2411eaeef7535a69548fe88ee9464ea4fbb4c455 /src/compiler/Makefile.sources | |
parent | 12ab7fc6ac1ca785afb1126607bb95ea26473e06 (diff) |
nir: Add a simple nir_lower_wpos_center() pass for Vulkan drivers.
nir_lower_wpos_ytransform() is great for OpenGL, which allows
applications to choose whether their coordinate system's origin is
upper left/lower left, and whether the pixel center should be on
integer/half-integer boundaries.
Vulkan, however, has much simpler requirements: the pixel center
is always half-integer, and the origin is always upper left. No
coordinate transform is needed - we just need to add <0.5, 0.5>.
This means that we can avoid using (and setting up) a uniform.
I thought about adding more options to nir_lower_wpos_ytransform(),
but making a new pass that never even touched uniforms seemed simpler.
v2: Use normal iterator rather than _safe variant (noticed by Matt).
Signed-off-by: Kenneth Graunke <[email protected]>
Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/compiler/Makefile.sources')
-rw-r--r-- | src/compiler/Makefile.sources | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources index 97f9eb4f1f3..b8f2b4950b4 100644 --- a/src/compiler/Makefile.sources +++ b/src/compiler/Makefile.sources @@ -212,6 +212,7 @@ NIR_FILES = \ nir/nir_lower_vars_to_ssa.c \ nir/nir_lower_var_copies.c \ nir/nir_lower_vec_to_movs.c \ + nir/nir_lower_wpos_center.c \ nir/nir_lower_wpos_ytransform.c \ nir/nir_metadata.c \ nir/nir_move_vec_src_uses_to_dest.c \ |