[Mesa-dev] [PATCH v2 3/3] mesa/st: enable ARB_fragment_layer_viewport
Ilia Mirkin
imirkin at alum.mit.edu
Mon Jun 23 12:14:42 PDT 2014
On Mon, Jun 23, 2014 at 12:01 PM, Roland Scheidegger <sroland at vmware.com> wrote:
> Am 23.06.2014 17:18, schrieb Ilia Mirkin:
>> On Mon, Jun 23, 2014 at 11:06 AM, Roland Scheidegger <sroland at vmware.com> wrote:
>>> Am 23.06.2014 16:43, schrieb Ilia Mirkin:
>>>> On Mon, Jun 23, 2014 at 9:51 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>>>>> On Mon, Jun 23, 2014 at 9:39 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>>>>>> If multiple viewports are supported, that implies the presence of a GS
>>>>>> and layered rendering, so we can enable ARB_fragment_layer_viewport as
>>>>>> well.
>>>>>>
>>>>>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>>>>>> ---
>>>>>>
>>>>>> Untested on r600, but nv50/nvc0/llvmpipe seem to pass basic testing.
>>>>>
>>>>> Grr... actually llvmpipe fails for viewport, but works for layer.
>>>>
>>>> But... it draws all black instead of red, which means it's probably
>>>> either my or llvmpipe's understanding of default viewport state that's
>>>> wrong. I assumed that by default viewports were initialized s.t. they
>>>> would "Just Work" without having to be touched. Or... it's not
>>>> clamping the viewport index properly. Will investigate later.
>>> Hmm I'm not sure. This was tested with d3d10 rules which of course
>>> doesn't have the commands to set all viewports at once. But this is
>>> handled by the state tracker.
>>
>> Well, the tests don't set viewports at all. I was under the
>> (potentially incorrect) assumption that the default state was good
>> enough.
> Yes it should be - the viewport should be set somewhere (I'm not exactly
> sure where it gets set) and since in GL the "old" commands just set all
> viewports this should work.
This is the first time I'm looking at llvmpipe in detail, so forgive
the potential stupidity...
It seems like lp_state_fs.c:lp_llvm_viewport isn't clamping the
viewport index. Should it be? [Or is there some non-obvious place
where it's actually being clamped?] It seems like the layer is clamped
explicitly in lp_setup_tri and lp_setup_point.
-ilia
More information about the mesa-dev
mailing list