diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.c | 11 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index d9e40506afa..6512e80ba2e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1952,7 +1952,7 @@ fetch_texel( struct tgsi_sampler *sampler, #define TEX_MODIFIER_LOD_BIAS 2 #define TEX_MODIFIER_EXPLICIT_LOD 3 #define TEX_MODIFIER_LEVEL_ZERO 4 - +#define TEX_MODIFIER_GATHER 5 /* * Fetch all 3 (for s,t,r coords) texel offsets, put them into int array. @@ -2069,6 +2069,8 @@ exec_tex(struct tgsi_exec_machine *mach, control = tgsi_sampler_lod_explicit; else if (modifier == TEX_MODIFIER_LOD_BIAS) control = tgsi_sampler_lod_bias; + else if (modifier == TEX_MODIFIER_GATHER) + control = tgsi_sampler_gather; } else { for (i = dim; i < Elements(args); i++) @@ -4374,6 +4376,13 @@ exec_instruction( exec_tex(mach, inst, TEX_MODIFIER_PROJECTED, 1); break; + case TGSI_OPCODE_TG4: + /* src[0] = texcoord */ + /* src[1] = component */ + /* src[2] = sampler unit */ + exec_tex(mach, inst, TEX_MODIFIER_GATHER, 2); + break; + case TGSI_OPCODE_UP2H: assert (0); break; diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index 0e59b884897..0f4c966cc11 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -93,7 +93,8 @@ enum tgsi_sampler_control { tgsi_sampler_lod_bias, tgsi_sampler_lod_explicit, tgsi_sampler_lod_zero, - tgsi_sampler_derivs_explicit + tgsi_sampler_derivs_explicit, + tgsi_sampler_gather, }; /** |