Commit Graph

113 Commits

Author SHA1 Message Date
Grigori Goronzy 249a9df7fc gallium: add PIPE_COMPUTE_CAP_SUBGROUP_SIZE
We need this to implement OpenCL's
CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-06-29 13:24:22 +02:00
Marek Olšák b6ebe7eabf tgsi/ureg: don't emit in/out arrays if drivers don't support ranged declarations
Softpipe, llvmpipe, r300g, and radeonsi pass tests. Other drivers need testing.

Freedreno and nv30 are definitely broken. Other drivers seem to be alright.
2015-06-05 19:44:32 +02:00
Marek Olšák 79ffc08ae8 gallium: add PIPE_CAP_DEVICE_RESET_STATUS_QUERY
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-05-12 19:38:31 +02:00
Samuel Pitoiset f137f5c691 gallium: add pipe_screen::get_driver_query_group_info
Driver queries are organized as a single hierarchy where queries are
categorized into groups. Each group has a list of queries and a maximum
number of queries that can be sampled. The list of available groups can
be obtained using pipe_screen::get_driver_query_group_info.

This will be used by GL_AMD_performance monitor.

v2: add group type (CPU/GPU)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@free.fr>
2015-05-06 00:03:35 +03:00
Giuseppe Bilotta 31d4e6fbff gallium: introduce get_device_vendor() entrypoint for pipes
This will be needed by Clover to return the correct information
to CL_DEVICE_VENDOR info queries.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-03-23 13:25:34 +00:00
Marek Olšák 216543ea54 gallium: add FMA and DFMA opcodes (v3)
Needed by ARB_gpu_shader5.

v2: select DMAD for FMA with double precision
v3: add and select DFMA

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-16 12:54:18 +01:00
Ilia Mirkin 924ee3f408 gallium: add shader cap for dldexp/dfracexp support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-02-19 19:32:52 -05:00
Ilia Mirkin 899d779cb7 gallium: add a cap to enable double rounding opcodes
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-02-19 19:32:49 -05:00
Marek Olšák 8b587ee701 gallium: add interface and state tracker support for GL_AMD_pinned_memory
v2: add alignment restrictions to docs, fix indentation in headers

Reviewed-by: Christian König <christian.koenig@amd.com>
2015-02-17 17:31:48 +01:00
Axel Davy eb1c12d20d gallium: Add MULTISAMPLE_Z_RESOLVE cap
Resolving a multisampled depth texture into
a single sampled texture is supported on >= SM4.1
hw. It is possible some previous hw support it.

The ability was tested on radeonsi and nvc0.
Apparently is is also supported for radeon >= r700.

This patch adds the MULTISAMPLE_Z_RESOLVE cap and
add it to the drivers. It is advertised for drivers
for which it is sure the ability is supported.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-02-06 00:07:18 +01:00
Ilia Mirkin 7c211a12aa gallium: add a cap to determine whether the driver supports offset_clamp
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-02-02 20:44:02 -05:00
Roland Scheidegger ade8b26bf5 gallium: add TGSI_SEMANTIC_VERTEXID_NOBASE and TGSI_SEMANTIC_BASEVERTEX
Plus a new PIPE_CAP_VERTEXID_NOBASE query. The idea is that drivers not
supporting vertex ids with base vertex offset applied (so, only support
d3d10-style vertex ids) will get such a d3d10-style vertex id instead -
with the caveat they'll also need to handle the basevertex system value
too (this follows what core mesa already does).
Additionally, this is also useful for other state trackers (for instance
llvmpipe / draw right now implement the d3d10 behavior on purpose, but
with different semantics it can just do both).
Doesn't do anything yet.
And fix up the docs wrt similar values.

v2: incorporate feedback from Brian and others, better names, better docs.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-12-16 04:23:00 +01:00
Mathias Fröhlich 56088131d0 gallium: introduce PIPE_CAP_CLIP_HALFZ.
In preparation of ARB_clip_control. Let the driver decide if
it supports pipe_rasterizer_state::clip_halfz being set to true.

v3:
Initially enable on ilo.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de
2014-10-24 19:21:21 +02:00
Marek Olšák 5f5b83cbba gallium: add PIPE_SHADER_CAP_MAX_OUTPUTS and use it in st/mesa
With 5 shader stages and various combinations of enabled and disabled shaders,
the maximum number of outputs in one shader doesn't have to be equal to
the maximum number of inputs in the following shader.

v2: return 32 for softpipe and llvmpipe
2014-10-21 21:59:02 +02:00
Tom Stellard 8b7cc90cef gallium: Add PIPE_SHADER_IR_NATIVE to enum pipe_shader_ir
Drivers can return this value for PIPE_COMPUTE_CAP_IR_TARGET
if they want clover to give them native object code.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2014-10-16 19:42:22 -04:00
Brian Paul 8269bfdb83 gallium: add doc note about cube textures and can_create_resource()
Just to be clear, and echo the description for resource_create().

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-09-30 12:08:49 -06:00
Ilia Mirkin c113095acd gallium: add a texture target to sampler view and a CAP to use it
This allows a sampler view to have a different texture target than the
underlying resource. This will be used to implement the type casting
between 2d arrays and cube maps as specified in ARB_texture_view.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-09-12 00:54:55 -04:00
Timothy Arceri 89e6806dea gallium: add cap for MAX_VERTEX_ATTRIB_STRIDE
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-08-27 20:35:59 -10:00
Tobias Klausmann fd5edee700 gallium: Add and handle PIPE_CAP_CONDITIONAL_RENDER_INVERTED
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
2014-08-19 08:54:35 -04:00
Emil Velikov 139751403c gallium: add GLX_MESA_query_renderer caps
Namely vendor/device id, accelerated and UMA, which will be used to describe
the underlying renderer.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-08-15 17:41:34 +01:00
Ilia Mirkin 8ee74ce50f gallium: add opcodes/cap for fine derivative support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
Reviewed-by: Roland Scheidegger <sroland@vmware.com> (v1)
v2: Reuse opcode gaps as suggested by Marek
2014-08-14 20:25:32 -04:00
Marek Olšák c10332bbb8 gallium: remove PIPE_SHADER_CAP_MAX_ADDRS
This limit is fixed in Mesa core and cannot be changed.
It only affects ARB_vertex_program and ARB_fragment_program.

The minimum value for ARB_vertex_program is 1 according to the spec.
The maximum value for ARB_vertex_program is limited to 1 by Mesa core.

The value should be zero for ARB_fragment_program, because it doesn't
support ARL.

Finally, drivers shouldn't mess with these values arbitrarily.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-08-11 21:53:57 +02:00
Marek Olšák 04f2c88f45 gallium: rename shader cap MAX_CONSTS to MAX_CONST_BUFFER_SIZE
This new name isn't so confusing.

I also changed the gallivm limit, because it looked wrong.

Reviewed-by: Brian Paul <brianp@vmware.com>

v2: use sizeof(float[4])
2014-07-28 23:57:08 +02:00
Tom Stellard 1607a8efc1 gallium: Add PIPE_CAP_COMPUTE_IMAGES_SUPPORTED
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2014-07-25 12:49:20 -04:00
Ilia Mirkin 32b71246e7 gallium: rename PIPE_CAP_TGSI_VS_LAYER to also have _VIEWPORT
Now that this cap is used to determine the availability of both, adjust
its name to reflect the new reality.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-07-03 19:39:25 -04:00
Tom Stellard fea996c2aa gallium: Add PIPE_SHADER_CAP_DOUBLES
This is for reporting whether or not double precision floating-point
operations are supported.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2014-07-02 15:31:52 -04:00
Christoph Bumiller bc198f8e63 gallium: add facilities for indirect drawing
v2:
Added comments to util_draw_indirect, clarified and fixed map size.
Removed unlikely().
2014-07-02 00:47:09 +02:00
Christoph Bumiller a27b3582a6 gallium: add PIPE_BIND_COMMAND_ARGS_BUFFER
Intended for use with GL_ARB_draw_indirect's DRAW_INDIRECT_BUFFER
target or for D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS.
2014-07-02 00:47:09 +02:00
Ilia Mirkin 746e5260f6 gallium: add a cap for max vertex streams
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-07-01 11:34:35 -04:00
Bruno Jiménez 8f4d37889c gallium: Add PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2014-06-12 19:08:06 -04:00
Christoph Bumiller 4b586a26c8 gallium: create TGSI_PROPERTY to disable viewport and clipping
Marek v2: add a cap

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-06-02 12:49:03 +02:00
Ilia Mirkin d95df4f4e4 gallium: add a cap for supporting 4-offset TG4 opcodes
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-05-07 20:40:46 -04:00
Tom Stellard 5fe1a0ebad gallium: Add PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY
Bruno Jiménez:
  v2: Updated the docs
  v3: Remove trailing comma

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2014-04-29 15:24:53 -07:00
Ilia Mirkin 88d8d88d8c gallium: add basic support for ARB_sample_shading
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-26 11:52:01 -04:00
Ilia Mirkin 2d2e60bdee gallium/docs: fix PIPE_CAP_ENDIANNESS delimiter, remove trailing spaces
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-19 13:23:32 -04:00
Ilia Mirkin c2f9ad5289 gallium: add a way to query min/max texture gather offsets
Defaults to providing the same offsets as MIN/MAX_TEXEL_OFFSET. For
nvc0, the offset can be -32/31.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-10 20:42:36 -04:00
Dave Airlie be5276ae7d gallium: add support for LODQ opcodes.
This opcode provide support for GL_ARB_texture_query_lod,

Signed-off-by: Dave Airlie <airlied@redhat.com>
[imirkin: rebase, docs update]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-07 01:06:18 -04:00
Marek Olšák 5f61f052b5 gallium: add interface for persistent and coherent buffer mappings
Required for ARB_buffer_storage.
2014-02-25 16:05:41 +01:00
Dave Airlie 2fcbec48d7 gallium: add texture gather support to gallium (v3)
This adds support to gallium for a TG4 instruction,
and two CAPs. The first CAP is required for GL_ARB_texture_gather.

The second CAP is required to expose GL_ARB_gpu_shader5.

However so far we haven't found any hardware that natively
exposes the textureGatherOffsets feature from GL, so just
lower it for now. If hardware appears for this we can add
another CAP to allow TG4 to take 4 offsets.

v2: add component selection src and a cap to say
hw can do it. (st can use to help control
GL_ARB_gpu_shader5/GLSL 4.00). Add docs.

v3: rename to SM5, add docs.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-02-25 13:29:17 +10:00
Grigori Goronzy d34d5fddf8 gallium: add geometry shader output limits
v2: adjust limits for radeonsi and llvmpipe
v3: add documentation

Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-02-09 23:31:38 +01:00
Marek Olšák c32114460d gallium: remove PIPE_USAGE_STATIC
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-02-06 17:37:34 +01:00
Marek Olšák eeb5a4a50e gallium: define the behavior of PIPE_USAGE_* flags properly
STATIC will be removed in the following commit.

v2: changed the definition of IMMUTABLE

Reviewed-by: Brian Paul <brianp@vmware.com>
2014-02-06 17:30:00 +01:00
Marek Olšák 0354b769c2 gallium: remove PIPE_CAP_MAX_COMBINED_SAMPLERS
This can be derived from the shader caps.

All GPUs from ATI/AMD, NVIDIA, and INTEL have separate texture slots
for each shader stage.
2014-02-04 20:19:16 +01:00
Marek Olšák 1a02bb71dd gallium: add support for AMD_vertex_shader_layer 2013-12-03 19:39:13 +01:00
Roland Scheidegger 2983c039df gallium: new shader cap bit for the amount of sampler views
Ever since introducing separate sampler and sampler view max this was really
missing.
Every driver but llvmpipe reports the same number as number of samplers for
now, so nothing should break.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-11-28 04:02:18 +01:00
Ilia Mirkin 12d39b4fa8 gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES
This CAP will determine whether ARB_framebuffer_object can be enabled.
The nv30 driver does not allow mixing swizzled and linear zsbuf/cbuf
textures.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2013-10-26 01:36:07 +02:00
Brian Paul 089ef37eab gallium/docs: clarify definition of PIPE_CAP_USER_CONSTANT_BUFFERS, etc
The cap means _can_ accept user-space constant buffers; it doesn't
mean _only_ accepts user-space constant buffers.

v2: also update the PIPE_CAP_USER_VERTEX_BUFFERS and
PIPE_CAP_USER_INDEX_BUFFERS descriptions as well.  Per Jose.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-07-31 06:53:48 -06:00
Tom Stellard 4e90bc9a12 gallium: Add PIPE_CAP_ENDIANNESS
Cc: mesa-stable@lists.freedesktop.org
[ Francisco Jerez: Fix "PIPE_ENDIAN_SMALL" in the documentation,
  define PIPE_ENDIAN_NATIVE. ]
2013-07-22 22:43:17 +02:00
Zack Rusin 26fe24c479 gallium/docs: adds documentation for multi viewport cap
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-25 09:49:20 -04:00
Marek Olšák 52cb395bb1 gallium: add PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE for GL
v2: fix typo 65535 -> 65536

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-11 23:45:01 +02:00