[Mesa-dev] [PATCH] glsl_to_tgsi: make sure copied instructions don't lose texture target.

Brian Paul brian.e.paul at gmail.com
Mon Dec 12 09:10:43 PST 2011


On Sat, Dec 10, 2011 at 2:47 PM, Dave Airlie <airlied at gmail.com> wrote:
>>>
>>> The piglit draw-pixel-with-texture was asserting in the glsl->tgsi code,
>>> due to 0 texture target, this makes sure the texture target is copied over
>>> correctly when we copy instructions around.
>>
>> Oh so it looks like this could be "fun" or maybe the other one, so
>> glsl->tgsi is broken for draw pixels where a texturing is enabled.
>>
>> The problem is we ignore the fact that texturing is enabled and we
>> blindly write over the original programs texture info, we also seem to
>> bind our samplers on top of the original states which also seems
>> doomed to failure.
>>
>> I'm not 100% sure how best to solve this, I'll just tool around until
>> I have an answer unless someone comes up with a better one.
>
> Okay I suspect the st_cb_drawpixels.c needs to start looking a lot
> more like the st_cb_bitmap.c, if the draw-pixel-with-texture test is
> correct, which I've no reason to believe it isn't.

To be honest, I'm not too concerned about fixing the case of
glDrawPixels + texture. I can't think of any case where anyone would
want to do that.  As long as we don't crash and we render the original
glDrawPixels image, that's OK for now, IMO.

-Brian


More information about the mesa-dev mailing list