diff options
author | Rob Clark <[email protected]> | 2015-06-08 14:45:47 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-06-21 08:01:05 -0400 |
commit | 43048c7093c367897fbcbb3ca8580e9c122cd6f6 (patch) | |
tree | a92a9c211f41c3876c1451b65b7f4cf3370413d7 /src/gallium/drivers/freedreno | |
parent | 0f008082b184072159e5aedc7fc103efba8740ed (diff) |
freedreno/ir3: only unminify txf coords on a3xx
Seems like a4xx gets this right.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index 5c215a55a36..a9a8df3bc3b 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -109,6 +109,11 @@ struct ir3_compile { */ bool levels_add_one; + /* on a3xx, we need to scale up integer coords for isaml based + * on LoD: + */ + bool unminify_coords; + /* for looking up which system value is which */ unsigned sysval_semantics[8]; @@ -225,10 +230,12 @@ compile_init(struct ir3_compiler *compiler, /* need special handling for "flat" */ ctx->flat_bypass = true; ctx->levels_add_one = false; + ctx->unminify_coords = false; } else { /* no special handling for "flat" */ ctx->flat_bypass = false; ctx->levels_add_one = true; + ctx->unminify_coords = true; } ctx->compiler = compiler; @@ -1592,11 +1599,12 @@ emit_tex(struct ir3_compile *ctx, nir_tex_instr *tex) tex_info(tex, &flags, &coords); /* scale up integer coords for TXF based on the LOD */ - if (opc == OPC_ISAML) { + if (ctx->unminify_coords && (opc == OPC_ISAML)) { assert(has_lod); for (i = 0; i < coords; i++) coord[i] = ir3_SHL_B(b, coord[i], 0, lod, 0); } + /* * lay out the first argument in the proper order: * - actual coordinates first |