[Mesa-dev] [PATCH 1/3] gallium: Add PIPE_COMPUTE_CAP_MAX_CONSTANT_BUFFER_SIZE

Jan Vesely jan.vesely at rutgers.edu
Thu Jul 24 07:05:19 PDT 2014


On Thu, 2014-07-24 at 06:35 -0700, Tom Stellard wrote:
> On Thu, Jul 24, 2014 at 01:09:49PM +0200, Marek Olšák wrote:
> > Isn't this redundant with get_shader_param(PIPE_SHADER_COMPUTE,
> > PIPE_SHADER_CAP_MAX_CONSTS) * 16?
> > 
> 
> This is what clover was using, but I was confused about what the value
> was supposed to represent.  Now, I think I understand (number of 4 x 32-bit
> constants).  I can use this instead.

Is the value for r600 hw misreported then? The manuals for R600/EG/NI
say there are 512 such registers. Yet the driver reports 4096.
See the attached patch.

Jan

> 
> -Tom
> > Marek
> > 
> > On Thu, Jul 24, 2014 at 3:05 AM, Tom Stellard <thomas.stellard at amd.com> wrote:
> > > ---
> > >  src/gallium/docs/source/screen.rst   | 2 ++
> > >  src/gallium/include/pipe/p_defines.h | 3 ++-
> > >  2 files changed, 4 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
> > > index 830a1a5..219c9f9 100644
> > > --- a/src/gallium/docs/source/screen.rst
> > > +++ b/src/gallium/docs/source/screen.rst
> > > @@ -334,6 +334,8 @@ pipe_screen::get_compute_param.
> > >    Value type: ``uint32_t``
> > >  * ``PIPE_COMPUTE_CAP_IMAGES_SUPPORTED``: Whether images are supported
> > >    non-zero means yes, zero means no. Value type: ``uint32_t``
> > > +* ``PIPE_COMPUTE_CAP_MAX_CONSTANT_BUFFER_SIZE``: The maximum size in bytes
> > > +  of a constant buffer.  Value type: ``uint64_t``
> > >
> > >  .. _pipe_bind:
> > >
> > > diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> > > index 43bb1f5..78709b9 100644
> > > --- a/src/gallium/include/pipe/p_defines.h
> > > +++ b/src/gallium/include/pipe/p_defines.h
> > > @@ -651,7 +651,8 @@ enum pipe_compute_cap
> > >     PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE,
> > >     PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY,
> > >     PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS,
> > > -   PIPE_COMPUTE_CAP_IMAGES_SUPPORTED
> > > +   PIPE_COMPUTE_CAP_IMAGES_SUPPORTED,
> > > +   PIPE_COMPUTE_CAP_MAX_CONSTANT_BUFFER_SIZE
> > >  };
> > >
> > >  /**
> > > --
> > > 1.8.1.5
> > >
> > > _______________________________________________
> > > 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

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-r600g-Fix-number-of-reported-constant-regs.patch
Type: text/x-patch
Size: 1589 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140724/365fe1f0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140724/365fe1f0/attachment.sig>


More information about the mesa-dev mailing list