Re: [Mesa-dev] [PATCH] r600: fix VERTEX_ATTRIB_STRIDE to be 2048

2018-02-04 Thread Roland Scheidegger
Am 05.02.2018 um 03:04 schrieb Roland Scheidegger:
> Am 04.02.2018 um 20:13 schrieb Dave Airlie:
>> On 2 February 2018 at 18:02, Roland Scheidegger  wrote:
>>> Are you sure of that? You only get 11 stride bits to program, and they
>>> are in bytes. Therefore I can't see how you could program 2048 (unless
>>> the hw would interpet 0 as 2048 but I think stride 0 is valid there?).
>>>
>>
>> Hmm so GL 4.4 defines the minimum for this to be 2048.
>>
>> Could be a bit of a blocker :-)
>>
>> Dave.
>>
> 
> I'm wondering what the blob did?
> I suppose you could always just lie - if the tests only care about the
> query and never actually test it you could get away with it...
> I mean, before GL 4.4, it was not even queryable and was supposed to
> always work no matter the stride, but in reality it would just silently
> fail...
> I was merely pointing out the limit there was probably intentional (so,
> if lying is the answer, I'd suggest a comment at least). (And I didn't
> verify what the hw really does with stride 0.)
> I guess alternatively you could fix it up in the vertex fetch shader
> (so, program stride 1024 in this case and lshift the id-to-fetch by 2 -
> albeit I do not actually understand how the VTX_FETCH_VERTEX_DATA and
> VTX_FETCH_INSTANCE_DATA work, but nevertheless I suppose it should be
> fixable to patch it up somehow).
> 

Forgot to mention, I believe d3d11 also has a limit of 2048 - there is
no direct limit on strides, but there is
D3D11_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES (2048 bytes) which
probably implies strides of 2048 should be working (and whck tests tend
to test such things). So not sure how it's done...

FWIW mesa's version calculation considers near zero numeric limits, only
extensions. I've recently added the min ubo count of 14 (starting with
gl 4.3) but that's about it. It will still happily announce higher
versions if you support for instance just 1 draw buffer (the extension
doesn't require more, gl starting from 3.0 or so would require 8, gles
for some versions 4), or as you noticed smaller max vertex strides.

Roland

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] r600: fix VERTEX_ATTRIB_STRIDE to be 2048

2018-02-04 Thread Roland Scheidegger
Am 04.02.2018 um 20:13 schrieb Dave Airlie:
> On 2 February 2018 at 18:02, Roland Scheidegger  wrote:
>> Are you sure of that? You only get 11 stride bits to program, and they
>> are in bytes. Therefore I can't see how you could program 2048 (unless
>> the hw would interpet 0 as 2048 but I think stride 0 is valid there?).
>>
> 
> Hmm so GL 4.4 defines the minimum for this to be 2048.
> 
> Could be a bit of a blocker :-)
> 
> Dave.
> 

I'm wondering what the blob did?
I suppose you could always just lie - if the tests only care about the
query and never actually test it you could get away with it...
I mean, before GL 4.4, it was not even queryable and was supposed to
always work no matter the stride, but in reality it would just silently
fail...
I was merely pointing out the limit there was probably intentional (so,
if lying is the answer, I'd suggest a comment at least). (And I didn't
verify what the hw really does with stride 0.)
I guess alternatively you could fix it up in the vertex fetch shader
(so, program stride 1024 in this case and lshift the id-to-fetch by 2 -
albeit I do not actually understand how the VTX_FETCH_VERTEX_DATA and
VTX_FETCH_INSTANCE_DATA work, but nevertheless I suppose it should be
fixable to patch it up somehow).

Roland
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] r600: fix VERTEX_ATTRIB_STRIDE to be 2048

2018-02-04 Thread Dave Airlie
On 2 February 2018 at 18:02, Roland Scheidegger  wrote:
> Are you sure of that? You only get 11 stride bits to program, and they
> are in bytes. Therefore I can't see how you could program 2048 (unless
> the hw would interpet 0 as 2048 but I think stride 0 is valid there?).
>

Hmm so GL 4.4 defines the minimum for this to be 2048.

Could be a bit of a blocker :-)

Dave.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] r600: fix VERTEX_ATTRIB_STRIDE to be 2048

2018-02-02 Thread Roland Scheidegger
Are you sure of that? You only get 11 stride bits to program, and they
are in bytes. Therefore I can't see how you could program 2048 (unless
the hw would interpet 0 as 2048 but I think stride 0 is valid there?).

Roland


Am 02.02.2018 um 07:23 schrieb Dave Airlie:
> From: Dave Airlie 
> 
> This fixes:
> KHR-GL45.limits.max_vertex_attrib_stride
> looks like a typo from the first commit.
> 
> Signed-off-by: Dave Airlie 
> ---
>  src/gallium/drivers/r600/r600_pipe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/r600/r600_pipe.c 
> b/src/gallium/drivers/r600/r600_pipe.c
> index 6c021e568d..29fadf6200 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -451,7 +451,7 @@ static int r600_get_param(struct pipe_screen* pscreen, 
> enum pipe_cap param)
>   return family >= CHIP_CEDAR ? 4 : 1;
>  
>   case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
> - return 2047;
> + return 2048;
>  
>   /* Texturing. */
>   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
> 

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] r600: fix VERTEX_ATTRIB_STRIDE to be 2048

2018-02-01 Thread Dave Airlie
From: Dave Airlie 

This fixes:
KHR-GL45.limits.max_vertex_attrib_stride
looks like a typo from the first commit.

Signed-off-by: Dave Airlie 
---
 src/gallium/drivers/r600/r600_pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_pipe.c 
b/src/gallium/drivers/r600/r600_pipe.c
index 6c021e568d..29fadf6200 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -451,7 +451,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum 
pipe_cap param)
return family >= CHIP_CEDAR ? 4 : 1;
 
case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
-   return 2047;
+   return 2048;
 
/* Texturing. */
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev