[Mesa-dev] tgsi tex instruction + cube map arrays.

Dave Airlie airlied at gmail.com
Sat Sep 8 00:47:04 PDT 2012


On Sat, Sep 8, 2012 at 8:39 AM, Dave Airlie <airlied at gmail.com> wrote:
> Hi,
>
> so I've been working on ARB_texture_cube_map_array, and it requires
> that sometimes TEX takes an extra src, since for sampler compare
> values there isn't enough space in one src, so we need to add another.
>
> Now I've done a special case in the GLSL->TGSI emitter
> else if (sampler_type->sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE &&
>               sampler_type->sampler_array) {
>       inst = emit(ir, opcode, result_dst, coord, cube_sc);
>    }
>
> However this run into an assert in the later tgsi_ureg.c:validate
> where the nr_src != info->num_src.
>
> So are people okay with always making the TEX opcode take 3 src? or
> should I fix validate to work around the special case?

Just to check the impact, it would also move the sampler to the final src,
the way things currently work, which would mean changing all the drivers.

Dave.


More information about the mesa-dev mailing list