diff options
author | Marek Olšák <[email protected]> | 2014-09-18 21:03:24 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-09-24 14:48:02 +0200 |
commit | 6cfedf8797f0ee3dd7c8cf9f28ee2c2b2d0eb2dc (patch) | |
tree | 4f1449b62d45410cdf2c4d23b30a5ee252cd3146 /src/mesa/state_tracker/st_atom_rasterizer.c | |
parent | 77038cd35ab94f2574925343149943cbef632b2b (diff) |
st/mesa: redefine mapping from VARYING_SLOT_TEXi/PNTC/VARi to TGSI GENERIC[i]
Generic varyings in TGSI were based on the value of VARYING_SLOT_TEX0, so VAR0
was always GENERIC[22] (with tessellation patches). Some drivers might not
be able to cope with that.
This commit defines a proper mapping, so that PNTC is GENERIC[8] and VAR0 is
GENERIC[9].
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom_rasterizer.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index 71b7f1bd9a0..a2285383e7d 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -33,6 +33,7 @@ #include "main/macros.h" #include "st_context.h" #include "st_atom.h" +#include "st_program.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "cso_cache/cso_context.h" @@ -174,7 +175,7 @@ static void update_raster_state( struct st_context *st ) if (!st->needs_texcoord_semantic && fragProg->Base.InputsRead & VARYING_BIT_PNTC) { raster->sprite_coord_enable |= - 1 << (VARYING_SLOT_PNTC - VARYING_SLOT_TEX0); + 1 << st_get_generic_varying_index(st, VARYING_SLOT_PNTC); } raster->point_quad_rasterization = 1; |