nir: Add ability for shaders to use window space coordinates.

This patch adds a shader_info field that tells the driver to use window
space coordinates for a given vertex shader. It also enables this feature
in radeonsi (the only NIR-capable driver that supported it in TGSI),
and makes tgsi_to_nir aware of it.

Signed-Off-By: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Andre Heider <a.heider@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Timur Kristóf
2019-02-05 18:08:24 +01:00
committed by Eric Anholt
parent 2780a99ff8
commit 317f10bf40
3 changed files with 8 additions and 0 deletions

View File

@@ -149,6 +149,9 @@ typedef struct shader_info {
struct {
/* Which inputs are doubles */
uint64_t double_inputs;
/* True if the shader writes position in window space coordinates pre-transform */
bool window_space_position;
} vs;
struct {