[Mesa-dev] [PATCH 1/2] r600g: texture offsets for non-TXF instructions
Marek Olšák
maraeo at gmail.com
Wed Oct 2 17:29:23 PDT 2013
Not all tests have to be part of all.tests, like the
framebuffer_blit_scaled ones, because they are more strict than the
spec mandates.
However generally, all tests that it makes sense to test regularly
should be listed in all.tests. I only use quick.tests, which is the
only way I use piglit. I don't run tests manually unless I have to
based on a report from quick.tests.
Marek
On Thu, Oct 3, 2013 at 2:08 AM, Roland Scheidegger <sroland at vmware.com> wrote:
> That's news to me that all tests must be part of all.tests. You can
> blame me for that, I thought there were others not being part of
> all.tests, but the README indeed states all new tests must be part of
> it. So maybe the only tests not added there are those I wrote :-).
>
> Roland
>
>
> Am 03.10.2013 01:20, schrieb Marek Olšák:
>> I don't understand. All piglit tests should be listed in all.tests. Is
>> it not the case with fs-textureOffset-2D?
>>
>> Marek
>>
>> On Thu, Oct 3, 2013 at 12:36 AM, Grigori Goronzy <greg at chown.ath.cx> wrote:
>>> On 03.10.2013 00:12, Grigori Goronzy wrote:
>>>>
>>>> All texture instructions can use offsets, not just TXF. Offsets into
>>>> the literals array were wrong, too.
>>>
>>>
>>> BTW, I just noticed it now: this fixes the fs-textureOffset-2D piglit test,
>>> which unfortunately does not appear to be part of any of the test suites.
>>>
>>>
>>>> ---
>>>> src/gallium/drivers/r600/r600_shader.c | 20 ++++++++++----------
>>>> 1 file changed, 10 insertions(+), 10 deletions(-)
>>>>
>>>> diff --git a/src/gallium/drivers/r600/r600_shader.c
>>>> b/src/gallium/drivers/r600/r600_shader.c
>>>> index 80cdcd5..6289d97 100644
>>>> --- a/src/gallium/drivers/r600/r600_shader.c
>>>> +++ b/src/gallium/drivers/r600/r600_shader.c
>>>> @@ -3779,16 +3779,16 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
>>>> }
>>>> }
>>>>
>>>> - if (inst->Instruction.Opcode == TGSI_OPCODE_TXF) {
>>>> - /* get offset values */
>>>> - if (inst->Texture.NumOffsets) {
>>>> - assert(inst->Texture.NumOffsets == 1);
>>>> -
>>>> - offset_x = ctx->literals[inst->TexOffsets[0].Index
>>>> + inst->TexOffsets[0].SwizzleX] << 1;
>>>> - offset_y = ctx->literals[inst->TexOffsets[0].Index
>>>> + inst->TexOffsets[0].SwizzleY] << 1;
>>>> - offset_z = ctx->literals[inst->TexOffsets[0].Index
>>>> + inst->TexOffsets[0].SwizzleZ] << 1;
>>>> - }
>>>> - } else if (inst->Instruction.Opcode == TGSI_OPCODE_TXD) {
>>>> + /* get offset values */
>>>> + if (inst->Texture.NumOffsets) {
>>>> + assert(inst->Texture.NumOffsets == 1);
>>>> +
>>>> + offset_x = ctx->literals[4 * inst->TexOffsets[0].Index +
>>>> inst->TexOffsets[0].SwizzleX] << 1;
>>>> + offset_y = ctx->literals[4 * inst->TexOffsets[0].Index +
>>>> inst->TexOffsets[0].SwizzleY] << 1;
>>>> + offset_z = ctx->literals[4 * inst->TexOffsets[0].Index +
>>>> inst->TexOffsets[0].SwizzleZ] << 1;
>>>> + }
>>>> +
>>>> + if (inst->Instruction.Opcode == TGSI_OPCODE_TXD) {
>>>> /* TGSI moves the sampler to src reg 3 for TXD */
>>>> sampler_src_reg = 3;
>>>>
>>>>
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list