[Mesa-dev] [PATCH V3 5/7] i965: fs: Add fixup for textureSize on Gen6/7

Eric Anholt eric at anholt.net
Mon Dec 3 13:28:19 PST 2012


Chris Forbes <chrisf at ijw.co.nz> writes:

> V2: Moved up into emit(ir_texture *) to avoid duplication and fix
> ordering for Gen7; Gen6 math quirks moved into previous patches.
>
> Tested on Gen6 only; passes all the cube_map_array piglits.
>
> V3: Fixed weird whitespace
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> index 571489c..b93a9e6 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> @@ -1310,6 +1310,18 @@ fs_visitor::visit(ir_texture *ir)
>     if (ir->shadow_comparitor)
>        inst->shadow_compare = true;
>  
> +   /* fixup #layers for cube map arrays */
> +   if (ir->op == ir_txs) {
> +      glsl_type const *type = ir->sampler->variable_referenced()->type;

I think you want just ir->sampler->type here, right?  If you use
variable_referenced, then if they have an array of cube array samplers,
the yo'll ee type->base_type being GLSL_TYPE_ARRAY not GLSL_TYPE_SAMPLER
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121203/583fdb8f/attachment.pgp>


More information about the mesa-dev mailing list