[Mesa-dev] [PATCH 3/4] st/mesa: emit sampler view decls in PBO upload shader

Nicolai Hähnle nhaehnle at gmail.com
Mon Mar 21 16:03:17 UTC 2016


On 17.03.2016 12:07, Brian Paul wrote:
> On 03/17/2016 10:47 AM, Nicolai Hähnle wrote:
>> On 16.03.2016 19:43, Brian Paul wrote:
>>> The return type is float, which is what was implicitly used before,
>>> AFAICT.
>>
>> Isn't this technically incorrect when the uploaded texture is integer?
>
> That was my suspicion, regardless of my patch.  I'm not too familiar
> with this PBO upload code so I'm open to suggestions about how to fix
> things.  Or I'm OK deferring on this patch until someone figures it out.

FYI, I noticed some deqp test failures related to integer texture 
uploads on radeonsi, but I haven't had the chance to look into them yet.

Nicolai

> -Brian
>
>
>>
>> To be honest, it's not really clear to me what the return type is
>> supposed to mean. I don't think any of the hardware drivers uses it.
>>
>> Cheers,
>> Nicolai
>>
>>> ---
>>>   src/mesa/state_tracker/st_cb_texture.c | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>>
>>> diff --git a/src/mesa/state_tracker/st_cb_texture.c
>>> b/src/mesa/state_tracker/st_cb_texture.c
>>> index bffa4d0..6ee55c6 100644
>>> --- a/src/mesa/state_tracker/st_cb_texture.c
>>> +++ b/src/mesa/state_tracker/st_cb_texture.c
>>> @@ -1228,6 +1228,12 @@ create_pbo_upload_fs(struct st_context *st)
>>>
>>>      out     = ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 0);
>>>      sampler = ureg_DECL_sampler(ureg, 0);
>>> +   ureg_DECL_sampler_view(ureg, 0, TGSI_TEXTURE_BUFFER,
>>> +                          TGSI_RETURN_TYPE_FLOAT,
>>> +                          TGSI_RETURN_TYPE_FLOAT,
>>> +                          TGSI_RETURN_TYPE_FLOAT,
>>> +                          TGSI_RETURN_TYPE_FLOAT);
>>> +
>>>      if (screen->get_param(screen,
>>> PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL)) {
>>>         pos = ureg_DECL_system_value(ureg, TGSI_SEMANTIC_POSITION, 0);
>>>      } else {
>>>
>


More information about the mesa-dev mailing list