diff options
author | Fabian Bieler <[email protected]> | 2011-03-23 23:26:41 +0100 |
---|---|---|
committer | Henri Verbeet <[email protected]> | 2011-03-27 15:00:07 +0200 |
commit | da5b4764b28a1efd2e9dbf0741247288da36f546 (patch) | |
tree | a6256a444ecccf5197b3bfe21f95d2b28a388447 /src/gallium | |
parent | 78037d95da06b81799e75410154c8141b0a30ec0 (diff) |
r600g: Handle texture fetch instructions with neg or abs on source register
Signed-off-by: Henri Verbeet <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 0fe689e2716..a835e1c0a38 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -1526,10 +1526,12 @@ static int tgsi_tex(struct r600_shader_ctx *ctx) unsigned src_gpr; int r, i; int opcode; - /* Texture fetch instructions can only use gprs as source. */ + /* Texture fetch instructions can only use gprs as source. + * Also they cannot negate the source or take the absolute value */ const boolean src_requires_loading = - inst->Src[0].Register.File != TGSI_FILE_TEMPORARY && - inst->Src[0].Register.File != TGSI_FILE_INPUT; + (inst->Src[0].Register.File != TGSI_FILE_TEMPORARY && + inst->Src[0].Register.File != TGSI_FILE_INPUT) || + ctx->src[0].neg || ctx->src[0].abs; boolean src_loaded = FALSE; src_gpr = ctx->file_offset[inst->Src[0].Register.File] + inst->Src[0].Register.Index; |