Commit Graph

83224 Commits

Author SHA1 Message Date
Ilia Mirkin 8b7607d28a meta/texsubimage: tex_image is always non-null, avoid confusing code
Probably a copy-paste from mesa_meta_pbo_GetTexSubImage where tex_image
may apparently be null.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-11 21:18:05 -04:00
Ilia Mirkin 00d4315d37 st/mesa: return appropriate mesa format for ETC texture formats
Even when the backend driver does not support ETC formats, we handle the
decoding into an uncompressed backing texture. However as far as core
mesa is concerned, it's an ETC texture and we should return the relevant
ETC mesa format. This condition can get hit when using glTexStorage to
create the texture object.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
2016-07-11 21:17:30 -04:00
Ilia Mirkin 8ee3cdde04 mesa: etc2 online compression is unsupported, don't attempt it
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
2016-07-11 21:17:01 -04:00
Ben Skeggs 0d911a720d nvc0: initial support for GP100 GPUs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-07-12 10:56:35 +10:00
Samuel Pitoiset 9bc083284f nvc0: use a define for the driver constant buffer size
This might avoid mistakes if the size is bumped in the future.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-07-11 22:30:41 +02:00
Samuel Pitoiset 31a615677b nvc0: fix the driver cb size when draw parameters are used
The size of the driver constant buffer for each stage should be 2048
and not 512 because it has been increased recently for buffers/images.
While we are at it, do the same change for indirect draws.

This fixes all ARB_shader_draw_parameters tests on GM107.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: 12.0 <mesa-stable@lists.freedesktop.org>
2016-07-11 22:11:27 +02:00
Samuel Pitoiset 19d0450b27 nvc0/ir: fix images indirect access on Fermi
This fixes the following piglits:

arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index
arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index2

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: 12.0 <mesa-stable@lists.freedesktop.org>
2016-07-11 21:01:21 +02:00
Marek Olšák 33c8723980 st/mesa: remove st_dump_program_for_shader_db
replaced by MESA_SHADER_CAPTURE_PATH in core Mesa

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-07-11 19:06:05 +02:00
Marek Olšák d7b6f90684 gallivm: set LLVMNoUnwindAttribute on all intrinsics
RadeonSI stats: Mostly 0% difference, but Valley shows a small improvement:

 Application            Files    SGPRs     VGPRs   SpillSGPR SpillVGPR Code Size    LDS    Max Waves   Waits
 unigine_valley           278    0.00 %   -0.29 %    0.00 %    0.00 %    0.01 %    0.00 %    0.17 %    0.00 %

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2016-07-11 19:06:05 +02:00
Francesco Ansanelli 3c44629142 i965: fix ignored qualifiers warning
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-11 05:50:22 -07:00
Nicolai Hähnle 374aa2bb27 gallium/u_queue: assert that users must wait on fences before destroying them
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2016-07-11 11:04:44 +02:00
Nicolai Hähnle a0a616720a gallium/u_queue: guard fence->signalled checks with fence->mutex
I have seen a hang during application shutdown that could be explained by the
following race condition which this patch fixes:

1. Worker thread enters util_queue_fence_signal, sets fence->signalled = true.
2. Main thread calls util_queue_job_wait, which returns immediately.
3. Main thread deletes the job and fence structures, leaving garbage behind.
4. Worker thread calls pipe_condvar_broadcast, which gets stuck forever because
   it is accessing garbage.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2016-07-11 11:03:59 +02:00
Chad Versace 5c17fb2cd6 anv/dump: Fix post-blit memory barrier
Swap srcAccessMask and dstAccessMask.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-07-09 20:58:33 -07:00
Chad Versace bc33c9b455 anv/dump: Fix vkCmdPipelineBarrier flags
'true' is not valid for VkDependencyFlags.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-07-09 20:58:33 -07:00
Jason Ekstrand ac7eeebce4 anv/dump: Add support for dumping framebuffers
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-07-09 20:58:33 -07:00
Jason Ekstrand fad0b7b0b3 anv/dump: Add a barrier for the source image
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-07-09 20:58:33 -07:00
Jason Ekstrand 6ad183bf89 anv/dump: Refactor the guts into helpers
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-07-09 20:58:33 -07:00
Jason Ekstrand adbed7ae7a anv/dump: Use anv_minify instead of hand-rolling it
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-07-09 20:58:33 -07:00
Jason Ekstrand a26cda5ca5 anv/dump: Take an aspect in dump_image_to_ppm
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-07-09 20:58:33 -07:00
Nicolai Hähnle b479c47a9c radeonsi: fix bad assertion in si_emit_sample_mask
The blitter sets mask == 1, which is fine since it doesn't use smoothing.
Fixes a regression introduced in commit 5bcfbf91.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2016-07-09 19:46:54 +02:00
Matt Turner 6624174c0a glx: Fix for commit 2c86668694.
Ian suggested these changes in his review and I made them, but I pushed
the old version of the patch.
2016-07-08 16:46:17 -07:00
Emil Velikov 83a782cd5e docs: add news item and link release notes for 12.0.0/12.0.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-07-09 00:09:51 +01:00
Emil Velikov 386ceb4c61 docs: add sha256 checksums for 12.0.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit edfc17a19a17e8dae41a703a9cb4b9eb3c255c34)
2016-07-09 00:03:21 +01:00
Emil Velikov c7c0adc7e6 docs: add release notes for 12.0.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 04277f058d00238937e664cf546c43b16cea7b2b)
2016-07-09 00:03:16 +01:00
Emil Velikov 286a71b01f docs: add sha256 checksums for 12.0.0
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 3a146a789c5aa45e0de52bff764c2b371dd253aa)
2016-07-09 00:03:10 +01:00
Emil Velikov 4644908a9f docs: Update 12.0.0 release notes
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 8b06176f310f65628ce136b90a99005278ba5e0d)
2016-07-09 00:03:04 +01:00
Matt Turner 2c86668694 glx: Undo memory allocation checking damage.
This partially reverts commit d41f5396f3.

That untested commit broke the tex-skipped-unit piglit test and the
arbvparray Mesa demo when run with indirect GLX.

state->array_state is used during initialization, so its assignment cannot be
moved to the end of the function.

The backtrace looked like:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff77c7a5c in __glXGetActiveTextureUnit (state=0x6270e0) at indirect_vertex_array.c:1952
1952           return state->array_state->active_texture_unit;
(gdb) bt
0  0x00007ffff77c7a5c in __glXGetActiveTextureUnit (state=0x6270e0) at indirect_vertex_array.c:1952
1  0x00007ffff77cbf62 in get_client_data (gc=0x626f50, cap=34018, data=0x7fffffffd7a0) at single2.c:159
2  0x00007ffff77cce51 in __indirect_glGetIntegerv (val=34018, i=0x7fffffffd830) at single2.c:498
3  0x00007ffff77c4340 in __glXInitVertexArrayState (gc=0x626f50) at indirect_vertex_array.c:193

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-07-08 14:03:19 -07:00
Colin McDonald b36644bae6 glx: Fix indirect multi-texture GL_DOUBLE coordinate arrays.
There is no draw arrays protocol support for multi-texture coordinate
arrays, so it is implemented by sending batches of immediate mode
commands from emit_element_none in indirect_vertex_array.c.  This sends
the target texture unit (which has been previously setup in the
array_state header field), followed by the texture coordinates.  But for
GL_DOUBLE coordinates the texture unit must be sent *after* the texture
coordinates. This is documented in the glx protocol description, and can
also be seen in the indirect.c immediate mode commands generated from
gl_API.xml. Sending the target texture unit in the wrong place can crash
the remote X server.

To fix this required some more extensive changes to
indirect_vertex_array.c and indirect_vertex_array_priv.h, in order to
remove the texture unit value out of the array_state "header" field, and
send it separately.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
2016-07-08 14:03:16 -07:00
Colin McDonald 5ced100bf5 glx: Correct opcode typos in __indirect_glTexCoordPointer.
At the same time, replace opcode numbers with names in
__indirect_glVertexAttribPointer.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
2016-07-08 14:03:09 -07:00
Colin McDonald d57c85c1bf glx: Call __glXInitVertexArrayState() with a usable gc.
For each indirect context the indirect vertex array state must be initialised
by __glXInitVertexArrayState in indirect_vertex_array.c.  As noted in the
routine header it requires that the glx context has been setup prior to the
call, in order to test the server version and extensions.

Currently __glXInitVertexArrayState is called from indirect_bind_context in
indirect_glx.c, as follows:

   state = gc->client_state_private;
   if (state->array_state == NULL) {
      glGetString(GL_EXTENSIONS);
      glGetString(GL_VERSION);
      __glXInitVertexArrayState(gc);
   }

But, the gc context is not yet usable at this stage, so the server queries
fail, and __glXInitVertexArrayState is called without the server version and
extension information it needs.  This breaks multi-texturing as
glXInitVertexArrayState doesn't get GL_MAX_TEXTURE_UNITS.  It probably also
breaks setup of other arrays: fog, secondary colour, vertex attributes.

To fix this I have moved the call to __glXInitVertexArrayState to the end of
MakeContextCurrent in glxcurrent.c, where the glx context is usable.

Fixes a regression caused by commit 4fbdde889c. Fixes ARB_vertex_program
usage in the arbvparray Mesa demo when run with indirect GLX and also
the tex-skipped-unit piglit test when run with indirect GLX.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
2016-07-08 14:02:56 -07:00
Christian König 64ac4aef27 radeon/uvd: simplify sending context buffer message
Just send it whenever it is allocated.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
2016-07-08 21:03:32 +02:00
Christian König 6b474e06a2 radeon/uvd: fix contex buffer destruction in the error path
Destroying a not allocated buffer is harmless.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
2016-07-08 21:03:32 +02:00
Christian König 36df04dac4 radeon/uvd: move polaris fw check into radeon_video.c v2
It's actually not very clever to claim to support H.264
and then fail to create a decoder.

v2: prefix FW macro with UVD_.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
2016-07-08 21:03:31 +02:00
Christian König 5290bf43c8 radeon/video: fix coding style in radeon_video.c v2
v2: fix other tabs as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
2016-07-08 21:03:31 +02:00
Brian Paul 74163475b0 svga: simplify/fix 1D/2D array resource copies
Fixes the one of the piglit arb_copy_image-targets tests for 1D arrays.
Previously, we were applying the 1D array z/face adjustment twice.

Also simplify the copy_region_vgpu10() function.  It never has to copy
multiple array layers/slices.  The Mesa code for glCopyImageSubData does
the loop over slices/faces.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-07-08 12:53:21 -06:00
Brian Paul 0e23f370c9 mesa: print number of samples in renderbuffer_storage error msg
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-07-08 12:53:21 -06:00
Brian Paul fb26317604 svga: remove unused variable
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-07-08 12:53:21 -06:00
Brian Paul 689293ad52 svga: add dumping for more device commands
Signed-off-by: Brian Paul <brianp@vmware.com>
2016-07-08 12:53:21 -06:00
Brian Paul 599c333d07 svga: silence a couple unused variable warnings
Signed-off-by: Brian Paul <brianp@vmware.com>
2016-07-08 12:53:20 -06:00
Charmaine Lee c3c7ff014b svga: rebind using render target surfaces in hw draw state
Currently when we rebind framebuffer resources at the beginning of
the command buffer, we use the color buffer surfaces saved in the context
hw clear state. But the surfaces could be different from the actual
emitted render target surfaces if any of the color buffer surfaces
is also used for shader resource, in that case, we create
a backed surface for the collided render target surface. So to rebind
the framebuffer resources correctly, use the render target surfaces saved
in the context hw draw state.

Tested with Heaven, Lightsmark2008, MTT piglit, glretrace, conform.

Reviewed-by: Brian Paul <brianp@vmware.com>
2016-07-08 12:53:20 -06:00
Charmaine Lee da98cee067 svga: invalidate gb surface before it is reused
With this patch, a guest-backed surface will be invalidated
using the SVGA_3D_CMD_INVALIDATE_GB_SURFACE command before
the surface is reused. This fixes the updating dirty image error
from the device when a surface is reused.

v2: Instead of invalidating the surface when it is reused,
    send the invalidate command before the surface is put into
    the recycle pool.

v3: (1) surface invalidate is a noop operation in Linux winsys, since
        surface invalidation is not needed for DMA path.
    (2) Instead of invalidating the surface content in
        svga_screen_surface_destroy() when a surface is to be destroyed,
        it is done in svga_screen_cache_flush() when the surface is
        no longer referenced in a command buffer and is ready to
        be moved to the unused list. At this point, the surface will
        be moved to the invalidate list. When the surface invalidation
        is submitted, the surface will be moved to the unused list.

Tested with piglit, glretrace.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2016-07-08 12:53:20 -06:00
Brian Paul ca531aeeb1 svga: fix use of provoking vertex control
If the SVGA3D_DEVCAP_DX_PROVOKING_VERTEX query returns false, never
define rasterizer state objects with provokingVertexLast set.  Despite
what the device reports, it may interpret the provokingVertexLast flag
anyway.  This fixes an issue when using capability clamping.

Tested with piglit provoking-vertex and glsl-fs-flat-color tests.

VMware bug 1550143.

Reviewed-by: <charmainel@vmware.com>
2016-07-08 12:53:20 -06:00
Nayan Deshmukh af18a04755 vl: add half pixel to v_tex before adding offsets
Since pixel center lies at 0.5, add half_pixel to vtex
before adding offsets to it.

Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2016-07-08 20:51:12 +02:00
Samuel Pitoiset a0bf1768c7 nvc0/ir: remove unused resource info loading helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-07-08 19:12:23 +02:00
Samuel Pitoiset ed3a284382 nvc0/ir: refactor the surfaces info loading logic
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-07-08 19:12:21 +02:00
Samuel Pitoiset 9cdbe80745 nvc0/ir: move the shift left op inside loadTexHandle()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-07-08 19:12:06 +02:00
Nicolai Hähnle 04d93ea619 radeonsi: disable multi-threading when shader dumps are enabled
Otherwise, shader dumps can become interleaved and unusable.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-08 10:59:36 +02:00
Nicolai Hähnle 7ffc832ab8 radeonsi: use multi-threaded compilation in debug contexts
We only have to stay single-threaded when debug output must be synchronous.
This yields better parallelism in shader-db runs for me.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-08 10:59:32 +02:00
Nicolai Hähnle 084ca0d8e5 st/mesa: set debug callback async flag
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-08 10:59:29 +02:00
Nicolai Hähnle 2909e292fc gallium: add async flag to pipe_debug_callback
v2: fix typo db -> cb

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-08 10:58:52 +02:00