summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx/nvfx_fragprog.c
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-09-04 02:57:14 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-09-04 02:57:14 +0200
commit71a8544f89d736d481b15da421110ac275d7c24f (patch)
tree11550c78dcc2cf61c36bf1b8c859150b3a02e47a /src/gallium/drivers/nvfx/nvfx_fragprog.c
parent5dd296bcb106bccf6b7fb070d4bc877d9612642d (diff)
nvfx: support all coord conventions in hardware
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_fragprog.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_fragprog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c
index 6eb744e654..79dd22467a 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c
@@ -1052,6 +1052,16 @@ nvfx_fragprog_translate(struct nvfx_context *nvfx,
fpc->fp = fp;
fpc->num_regs = 2;
+ for (unsigned i = 0; i < pfp->info.num_properties; ++i) {
+ if (pfp->info.properties[i].name == TGSI_PROPERTY_FS_COORD_ORIGIN) {
+ if(pfp->info.properties[i].data[0])
+ fp->coord_conventions |= NV34TCL_COORD_CONVENTIONS_ORIGIN_INVERTED;
+ } else if (pfp->info.properties[i].name == TGSI_PROPERTY_FS_COORD_PIXEL_CENTER) {
+ if(pfp->info.properties[i].data[0])
+ fp->coord_conventions |= NV34TCL_COORD_CONVENTIONS_CENTER_INTEGER;
+ }
+ }
+
if (!nvfx_fragprog_prepare(nvfx, fpc))
goto out_err;