summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: return appropriate mesa format for ETC texture formatsIlia Mirkin2016-07-111-0/+7
| | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: "11.2 12.0" <[email protected]>
* mesa: etc2 online compression is unsupported, don't attempt itIlia Mirkin2016-07-113-0/+27
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: "11.2 12.0" <[email protected]>
* nvc0: initial support for GP100 GPUsBen Skeggs2016-07-125-5/+16
| | | | Signed-off-by: Ben Skeggs <[email protected]>
* nvc0: use a define for the driver constant buffer sizeSamuel Pitoiset2016-07-117-17/+17
| | | | | | | This might avoid mistakes if the size is bumped in the future. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: fix the driver cb size when draw parameters are usedSamuel Pitoiset2016-07-111-2/+2
| | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: 12.0 <[email protected]>
* nvc0/ir: fix images indirect access on FermiSamuel Pitoiset2016-07-111-0/+7
| | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: 12.0 <[email protected]>
* st/mesa: remove st_dump_program_for_shader_dbMarek Olšák2016-07-111-66/+0
| | | | | | replaced by MESA_SHADER_CAPTURE_PATH in core Mesa Reviewed-by: Nicolai Hähnle <[email protected]>
* gallivm: set LLVMNoUnwindAttribute on all intrinsicsMarek Olšák2016-07-111-2/+4
| | | | | | | | | 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 <[email protected]>
* i965: fix ignored qualifiers warningFrancesco Ansanelli2016-07-111-1/+1
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/u_queue: assert that users must wait on fences before destroying themNicolai Hähnle2016-07-111-0/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* gallium/u_queue: guard fence->signalled checks with fence->mutexNicolai Hähnle2016-07-111-3/+0
| | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* anv/dump: Fix post-blit memory barrierChad Versace2016-07-091-2/+2
| | | | | | Swap srcAccessMask and dstAccessMask. Reviewed-by: Jason Ekstrand <[email protected]>
* anv/dump: Fix vkCmdPipelineBarrier flagsChad Versace2016-07-091-1/+1
| | | | | | 'true' is not valid for VkDependencyFlags. Reviewed-by: Jason Ekstrand <[email protected]>
* anv/dump: Add support for dumping framebuffersJason Ekstrand2016-07-093-0/+158
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/dump: Add a barrier for the source imageJason Ekstrand2016-07-091-0/+22
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/dump: Refactor the guts into helpersJason Ekstrand2016-07-091-85/+139
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/dump: Use anv_minify instead of hand-rolling itJason Ekstrand2016-07-091-5/+4
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/dump: Take an aspect in dump_image_to_ppmJason Ekstrand2016-07-092-3/+10
| | | | Reviewed-by: Chad Versace <[email protected]>
* radeonsi: fix bad assertion in si_emit_sample_maskNicolai Hähnle2016-07-091-1/+2
| | | | | | | 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 <[email protected]>
* glx: Fix for commit 2c86668694.Matt Turner2016-07-081-0/+2
| | | | | Ian suggested these changes in his review and I made them, but I pushed the old version of the patch.
* glx: Undo memory allocation checking damage.Matt Turner2016-07-081-5/+1
| | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit d41f5396f3cb619729021390c273f838d92f11fb. 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 <[email protected]>
* glx: Fix indirect multi-texture GL_DOUBLE coordinate arrays.Colin McDonald2016-07-082-30/+50
| | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
* glx: Correct opcode typos in __indirect_glTexCoordPointer.Colin McDonald2016-07-081-5/+14
| | | | | | | | | At the same time, replace opcode numbers with names in __indirect_glVertexAttribPointer. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
* glx: Call __glXInitVertexArrayState() with a usable gc.Colin McDonald2016-07-082-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Acked-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
* radeon/uvd: simplify sending context buffer messageChristian König2016-07-081-4/+1
| | | | | | | Just send it whenever it is allocated. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* radeon/uvd: fix contex buffer destruction in the error pathChristian König2016-07-081-6/+2
| | | | | | | Destroying a not allocated buffer is harmless. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* radeon/uvd: move polaris fw check into radeon_video.c v2Christian König2016-07-082-11/+13
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* radeon/video: fix coding style in radeon_video.c v2Christian König2016-07-081-15/+15
| | | | | | | v2: fix other tabs as well. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* svga: simplify/fix 1D/2D array resource copiesBrian Paul2016-07-081-26/+12
| | | | | | | | | | | 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 <[email protected]>
* mesa: print number of samples in renderbuffer_storage error msgBrian Paul2016-07-081-1/+1
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* svga: remove unused variableBrian Paul2016-07-081-1/+0
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* svga: add dumping for more device commandsBrian Paul2016-07-081-155/+724
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: silence a couple unused variable warningsBrian Paul2016-07-082-1/+3
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: rebind using render target surfaces in hw draw stateCharmaine Lee2016-07-081-6/+6
| | | | | | | | | | | | | | | 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 <[email protected]>
* svga: invalidate gb surface before it is reusedCharmaine Lee2016-07-084-9/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* svga: fix use of provoking vertex controlBrian Paul2016-07-081-1/+4
| | | | | | | | | | | | | 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: <[email protected]>
* vl: add half pixel to v_tex before adding offsetsNayan Deshmukh2016-07-081-0/+2
| | | | | | | | Since pixel center lies at 0.5, add half_pixel to vtex before adding offsets to it. Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* nvc0/ir: remove unused resource info loading helpersSamuel Pitoiset2016-07-082-28/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0/ir: refactor the surfaces info loading logicSamuel Pitoiset2016-07-082-82/+44
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0/ir: move the shift left op inside loadTexHandle()Samuel Pitoiset2016-07-081-8/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* radeonsi: disable multi-threading when shader dumps are enabledNicolai Hähnle2016-07-081-0/+1
| | | | | | | Otherwise, shader dumps can become interleaved and unusable. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use multi-threaded compilation in debug contextsNicolai Hähnle2016-07-081-4/+4
| | | | | | | | 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: set debug callback async flagNicolai Hähnle2016-07-084-5/+8
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add async flag to pipe_debug_callbackNicolai Hähnle2016-07-083-2/+14
| | | | | | | v2: fix typo db -> cb Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: catch a potential state tracker error with non-MSAA FBsNicolai Hähnle2016-07-081-0/+6
| | | | | | At least st/mesa ensures this, so I'd rather not handle deviations in radeonsi. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: explicitly choose center locations for 1xAA on PolarisNicolai Hähnle2016-07-085-18/+48
| | | | | | | | | | | | | Unlike SC, the small primitive filter does not automatically use center locations in 1xAA mode, so this is needed to avoid artifacts caused by the small primitive filter discarding triangles that it shouldn't. As a side effect of how the effective number of samples is now calculated, this patch also avoids submitting the sample locations for line/poly smoothing when they're not really needed. Cc: 12.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: call cayman_emit_msaa_sample_locs only when neededNicolai Hähnle2016-07-081-1/+2
| | | | | | In the case of nr_samples <= 1, that function is (currently) a no-op anyway. Reviewed-by: Marek Olšák <[email protected]>
* mesa: Mark R*32F formats as filterable when an extension is present.Kenneth Graunke2016-07-083-3/+19
| | | | | | | | | | | GL_OES_texture_float_linear marks R32F, RG32F, RGB32F, and RGBA32F as texture filterable. Fixes glGenerateMipmap GL errors when visiting a WebGL demo in Chromium: http://www.iamnop.com/particles Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* i965/blorp: fix indentation levelEric Engestrom2016-07-081-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Fix remaining flush vs invalidate race conditions in ↵Francisco Jerez2016-07-072-0/+27
| | | | | | | | | | | | | | | | | | | | | | | brw_emit_pipe_control_flush. This hardware race condition has caused problems several times already (see "i965: Fix cache pollution race during L3 partitioning set-up.", "i965: Fix brw_render_cache_set_check_flush's PIPE_CONTROLs." and "i965: intel_texture_barrier reimplemented"). The problem is that whenever we attempt to both flush and invalidate multiple caches with a single pipe control command the flush and invalidation happen in reverse order, so the contents flushed from the R/W caches aren't guaranteed to become visible from the invalidated caches after the PIPE_CONTROL command completes execution if some concurrent rendering workload happened to pollute any of the invalidated R/O caches in the short window of time between the invalidation and flush. This makes sure that brw_emit_pipe_control_flush() has the effect expected by most callers of making the contents flushed from any R/W caches visible from the invalidated R/O caches. Cc: "12.0 11.1 11.2" <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>