Commit Graph

71136 Commits

Author SHA1 Message Date
Iago Toral Quiroga 0b1111d985 glsl: Don't do constant propagation on buffer variables
Since the backing storage for these is shared we cannot ensure that
the value won't change by writes from other threads. Normally SSBO
accesses are not guaranteed to be syncronized with other threads,
except when memoryBarrier is used. So, we might be able to optimize
some SSBO accesses, but for now we always take the safe path and emit
the SSBO access.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga 5360ff30c4 glsl: Do not kill dead assignments to buffer variables or SSBO declarations.
If we kill dead assignments we lose the buffer writes.

Also, we never kill UBO declarations even if they are never referenced
by the shader, they are always considered active. Although the spec
does not seem say this specifically for SSBOs, it is probably implied
since SSBOs are pretty much the same as UBOs, only that you can write
to them.

v2:
- Fix the comment (Jordan)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga 3ad92589f2 glsl: Don't do tree grafting on buffer variables
Otherwise we can lose writes into the buffers backing the variables.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga 173ed05a6d mesa: Implement _mesa_BindBufferRange for target GL_SHADER_STORAGE_BUFFER
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga 8a1d58bd61 mesa: Implement _mesa_BindBufferBase for target GL_SHADER_STORAGE_BUFFER
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga 7b0d0a2bf2 mesa: Implement _mesa_BindBuffersRange for target GL_SHADER_STORAGE_BUFFER
v2:
- Fix error message (Jordan)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga 0aa83f3e90 mesa: Implement _mesa_BindBuffersBase for target GL_SHADER_STORAGE_BUFFER
v2:
- Add space before const (Jordan)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga e72f5ef502 mesa: Implement _mesa_DeleteBuffers for target GL_SHADER_STORAGE_BUFFER
v2:
- Remove the extra spaces (Jordan)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga 98a1a2c730 mesa: Initialize and free shader storage buffers
v2:
- Fix indention, used tabs instead of whitespaces. (Jordan)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Samuel Iglesias Gonsalvez 2747d566f1 glsl: fix error messages in invalid declarations of shader storage blocks
Due to GL_ARB_shader_storage_buffer_object extension, shader storage blocks
have the same limitations as uniform blocks.

This patch fixes the corresponding error messages.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Samuel Iglesias Gonsalvez 9f651dbf79 glsl: buffer variables cannot be defined outside interface blocks
Section 4.3.7 "Buffer Variables", GLSL 4.30 spec:

"Buffer variables may only be declared inside interface blocks
(section 4.3.9 “Interface Blocks”), which are then referred to as
shader storage blocks. It is a compile-time error to declare buffer
variables at global scope (outside a block)."

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Samuel Iglesias Gonsalvez 20b2907db7 glsl: shader buffer variables cannot have initializers
Section 4.3.7 "Buffer Variables" of the GLSL 4.30 spec:

    "Buffer variables cannot have initializers."

v2:
- Rewrite error message (Jordan)

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Samuel Iglesias Gonsalvez fa0a86c057 glsl: enable binding layout qualifier usage for shader storage buffer objects
See GLSL 4.30 spec, section 4.4.5 "Uniform and Shader Storage Block
Layout Qualifiers".

v2:
- Add whitespace in an error message. Delete period '.' at the end of that
error message (Jordan).

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Samuel Iglesias Gonsalvez c717604dc4 mesa: add MaxShaderStorageBlocks to struct gl_program_constants
v2:
- Set MaxShaderStorageBlocks to 8.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga cd50906e03 mesa: Add shader storage buffer support to struct gl_context
This includes the array of bindings, the current buffer bound to the
GL_SHADER_STORAGE_BUFFER target and a set of general limits and default
values for shader storage buffers.

v2:
- Use spec values for the new defined constants (Jordan)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:04 +02:00
Iago Toral Quiroga df89ed1591 glsl: Identify active uniform blocks that are buffer blocks as such.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:03 +02:00
Kristian Høgsberg a78a589efc glsl: link buffer variables and shader storage buffer interface blocks
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:03 +02:00
Kristian Høgsberg 84fc5fece0 glsl: Implement parser support for 'buffer' qualifier
This is used to identify shader storage buffer interface blocks where
buffer variables are declared.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:03 +02:00
Iago Toral Quiroga 6b09598d63 nir: add nir_var_shader_storage
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:03 +02:00
Iago Toral Quiroga 1146696f75 mesa: rename is_in_uniform_block to is_in_buffer_block
Since this now checks if a variable is inside a uniform or a shader
storage block.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:03 +02:00
Kristian Høgsberg 18feaa8f36 glsl: Add ir_var_shader_storage
This will be used to identify buffer variables inside shader storage
buffer objects, which are very similar to uniforms except for a few
differences, most important of which is that they are writable.

Since buffer variables are so similar to uniforms, we will almost always
want them to go through the same paths as uniforms.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:03 +02:00
Samuel Iglesias Gonsalvez 3095ee9b8b mesa: define ARB_shader_storage_buffer_object extension
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-14 07:04:03 +02:00
Timothy Arceri 75df8f0019 glsl: free interface_types
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-07-14 07:48:34 +10:00
Timothy Arceri 431a065861 glsl: replace some more old hash_table uses
The util/hash_table was intended to be a fast hash table
replacement for the program/hash_table see 35fd61bd99 and 72e55bb688.

This change replaces some more uses of the old hash table.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-07-14 07:48:25 +10:00
Emil Velikov 7a50bf6c7f auxiliary/vl: use the correct screen index
Inspired (copied) from Marek's commit for egl/x11
commit 0b56e23e7f3(egl/dri2: use the correct screen index)

v2: Fix copy/pasta errors.

Cc: 10.6 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-07-13 20:43:11 +01:00
Emil Velikov 10a7b579fd radeon: remove dri_mirror state
Most of the data stored(duplicated) was unused, and for the one that is
follow the approach set by other drivers.
This eliminates the use of legacy (dri1) types.

Cc: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-07-13 20:15:27 +01:00
Emil Velikov 82b9b2e523 i915: remove unused driFd variable
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-07-13 20:14:53 +01:00
Emil Velikov a025e539e4 i965: bump libdrm requirement to 2.4.61 and drop in-tree workaround
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2015-07-13 20:14:31 +01:00
Emil Velikov c505064b2c bugzilla_mesa.sh: sort the bugs list by number
v2: Use change sed/sort based on Ilia's suggestion.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-13 20:02:09 +01:00
Emil Velikov 9027d53b2a radeonsi: directly include radeon/* headers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-13 20:01:16 +01:00
Emil Velikov dd50ccf0f4 auxiliary/vl: use loader_open_device() over open()
The former handles O_CLOEXEC (and the lack of it) appropriately.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-07-13 19:57:59 +01:00
Emil Velikov cc32d25454 pipe-loader: use loader_open_device() rather than open()
The former handles O_CLOEXEC (and the lack of it) appropriately.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-07-13 19:57:54 +01:00
Emil Velikov 132031b110 pipe-loader: remove pipe_loader_sw_probe_xlib
It was only useful for st/egl, although I've never got to merging the
pipe-loader and inline-helpers before it was removed. There are no users
for it ATM.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-07-13 19:57:38 +01:00
Emil Velikov c73d30dfe9 automake: remove empty GALLIUM_PIPE_LOADER_LIBS
Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-07-13 19:57:34 +01:00
Emil Velikov abc20120e4 automake: pipe-loader: remove the 'client' pipe-loader
Was only around as opencl's pipe-loader wanted to link against xcb in
some cases.

Cc: Rob Clark <robclark@freedesktop.org>
Cc: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-07-13 19:57:06 +01:00
Emil Velikov 0959d7312d pipe-loader: remove pipe_loader_drm_probe_fd() x_auth argument
No longer used by anyone, as of last commit.

Cc: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-07-13 19:56:54 +01:00
Emil Velikov a27ec5dc46 pipe-loader: simplify pipe_loader_drm_probe
Do not iterate and (attempt to) open the render device, if we're over
the requested number of devices.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-07-13 19:56:39 +01:00
Emil Velikov 69a1b9959e pipe-loader: drop support for non-render node devices
Render nodes have been around for quite some time. Removing support via
the master/primary node allows us to clean up the conditional
compilation and simplify the build greatly.

For example currently we the pipe-loader, which explicitly links against
xcb and friends (for X auth) if found at compile-time. That
would cause problems as one will be forced to use X/xcb, even if it's a
headless system that is used for opencl.

v2: Clarify the linking topic in the commit message.

Cc: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-07-13 19:52:48 +01:00
Dave Airlie de5c2b6f2b radeonsi: direct emit intrinsic for DFRAC.
Michel reported this still failed, and this fixed it

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-13 09:21:43 +01:00
Dave Airlie 4cbf0a0ccf radeonsi: ARB_gpu_shader_fp64 + ARB_vertex_attrib_64bit support.
This adds the translation from TGSI to AMDGPU llvm backend, for the
64-bit opcodes. The backend pretty much handles everything for us
fine. There is one patch required for SI DFRAC support, that I know
off.

[airlied: fixed missing comma, updated relnotes]

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-12 22:40:51 +01:00
Guillaume Desmottes 8108de4774 loader: don't leak udev_enumerate
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90073
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-11 20:49:25 +01:00
Guillaume Desmottes f7008ebcdc dri3_open: don't leak the reply
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90073
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-11 20:48:53 +01:00
Rhys Kidd 5d219908ce doxygen: Remove doxygen_sqlite3.db with 'make clean'
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-11 20:48:25 +01:00
Rhys Kidd 6cc29cf5e2 doxygen: Add doxygen_sqlite3.db to .gitignore
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-11 20:48:06 +01:00
Emil Velikov 846c60fc7d docs: add news item and link release notes for mesa 10.6.2
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-11 20:36:44 +01:00
Emil Velikov 6dfce109c2 docs: Add sha256 checksums for the 10.6.2 release
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 89cbd91b17989ec7eb1cb93ac427a84dca56cd79)
2015-07-11 20:35:06 +01:00
Emil Velikov 66d3543845 Add release notes for the 10.6.2 release
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 9643cce94c8a1938e3342fb83d025a1e5c2aa79b)
2015-07-11 20:35:04 +01:00
Dave Airlie ad2c3905d3 tgsi: add DFMA to the opcode infer functions.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-11 08:05:56 +01:00
Dave Airlie e70d051560 r600g: move sampler/ubo index registers before temp reg
temp_reg needs to be last, as we increment things
away from it, otherwise on cayman some tests were overwriting
the index regs.

Fixes 2 piglit with ARB_gpu_shader5 forced on cayman.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-11 16:31:02 +10:00
Dave Airlie c397bd1407 r600g: fix sampler/ubo indexing on cayman
Cayman needs a different method to upload the CF IDX0/1

This fixes 31 piglits when ARB_gpu_shader5 is forced on
with cayman.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-11 16:30:39 +10:00