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

Rob Clark robdclark at gmail.com
Mon Mar 21 20:23:42 UTC 2016


On Thu, Mar 17, 2016 at 1:07 PM, Brian Paul <brianp at vmware.com> 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.

I'd guess that we probably want to track separate pbo_upload shaders
for float vs int?  But your patch at least doesn't make anything
worse.  If someone points out which piglit tests I should be looking
at, I can fix it up for adreno (since I think we are the only ones
with this constraint)

BR,
-R


> -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