summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gallivm: fix gather implementation a bitRoland Scheidegger2017-09-091-10/+48
| | | | | | | | | | | | | | | | | | gather is defined in terms of bilinear filtering, just without the filtering part. However, there's actually some subtle differences required in our implementation, because we use some tricks to simplify coord wrapping for the two coords per direction. For bilinear filtering, we don't care if we end up with an incorrect texel, as long as the filter weight is 0.0 for it. Likewise, the order of the texels doesn't actually matter (as long as they still have the correct filter weight). But for gather, these tricks lead to incorrect results. Fix this for CLAMP_TO_EDGE, and add some comments to the other wrap functions which look broken (the 3 mirror_clamp plus mirror_repeat) (too complex to fix right now, and noone really seems to care...). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: whitespace, formatting fixes in teximage.cBrian Paul2017-09-081-55/+55
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: provide more info in some texture image error messagesBrian Paul2017-09-081-9/+11
| | | | Reviewed-by: Eric Anholt <[email protected]>
* svga: abort shader translation upon indirect indexing of temporariesCharmaine Lee2017-09-081-0/+6
| | | | | | | | | | This patch aborts shader translation upon indirect indexing of temporary register on non-vgpu10 device. This prevents non-supported feature sending to the device. Tested wth MTT-piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* radv: keep track of the disasm string in debug mode onlySamuel Pitoiset2017-09-082-1/+9
| | | | | | | | This will allow to dump the active shaders when a hang is detected. Only the ASM will be dumped for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add shader_variant_create() helper functionSamuel Pitoiset2017-09-081-58/+56
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: drop 'dump' parameters from some shader related functionsSamuel Pitoiset2017-09-083-22/+19
| | | | | | | The device object contains the debug flags. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: move shaders related code to radv_shader.cSamuel Pitoiset2017-09-0811-523/+642
| | | | | | | | Reduce size of radv_pipeline.c and improve code isolation. More code can probably moved but it's a start. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix error code when initializing the push descriptorsSamuel Pitoiset2017-09-081-1/+1
| | | | | | | malloc() failures are unrelated to the device memory. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not update vertex descriptors if the allocation failedSamuel Pitoiset2017-09-081-4/+8
| | | | | | | | A return code error is stored in the command buffer and should be returned to the user via EndCommandBuffer(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_vertex_elements_info data structureSamuel Pitoiset2017-09-083-18/+26
| | | | | | | In my opinion, this improves code readability. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/tests: use ARRAY_SIZE macroEric Engestrom2017-09-083-3/+9
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r300: use ARRAY_SIZE macroEric Engestrom2017-09-081-1/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glx: use ARRAY_SIZE macroEric Engestrom2017-09-081-1/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jon Turney <[email protected]>
* radv: add an assertion when pushing meta descriptor setsSamuel Pitoiset2017-09-081-0/+1
| | | | | | | | Just to make sure we are using the set 0, because it's the only one which is saved/restored when doing meta operations. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* mesa/st: Fix frontbuffer rendering regressionThomas Hellstrom2017-09-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced with commit "mesa/st: Reduce the number of frontbuffer flush calls" where we, after flushing the front buffer marked it as not-rendered-to, the idea being that it should be marked as "rendered-to" again as soon as any rendering was touching the front. Now the latter part never happened, because it was part of a state validation and we never marked that part of the state as dirty. So mark the framebuffer state dirty after a frontbuffer flush. (fdo bugzilla 102496) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102496 Fixes: eceb671002 (mesa/st: Reduce the number of frontbuffer flush calls) Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Bruce Cherniak <[email protected]> Tested-By: Gert Wollny <[email protected]>
* i965: Don't special case the batchbuffer when reference counting.Kenneth Graunke2017-09-081-11/+4
| | | | | | | | | | | | We don't need to special case the batch - when we add the batch to the validation list, we can simply increase the refcount to 2, and when we make a new batch, we'll drop it back down to 1 (when unreferencing all buffers in the validation list). The final reference is still held by brw->batch.bo, as it was before. This removes the special case from a bunch of loops. Reviewed-by: Chris Wilson <[email protected]>
* ac: remove bitcast_to_float()Connor Abbott2017-09-081-16/+2
| | | | | | ac_to_float() does a superset of what it does. Signed-off-by: Dave Airlie <[email protected]>
* ac: move ac_to_integer() and ac_to_float() to ac_llvm_build.cConnor Abbott2017-09-083-162/+172
| | | | | | We'll need to use ac_to_integer() for other stuff in ac_llvm_build.c. Reviewed-by: Dave Airlie <[email protected]>
* ac: fix ac_get_type_size() for doublesConnor Abbott2017-09-081-0/+1
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: use ac_get_type_size.Dave Airlie2017-09-081-23/+3
| | | | | | Just moved to newly shared code. Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: move the guts of ARB_shader_group_vote emission to acConnor Abbott2017-09-083-21/+39
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: move si_emit_ballot() to acConnor Abbott2017-09-083-32/+35
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: move emit_optimization_barrier() to acConnor Abbott2017-09-083-43/+47
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: move llvm_get_type_size() to acConnor Abbott2017-09-083-34/+35
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: fix flags vs va_flags thinko.Dave Airlie2017-09-081-1/+1
| | | | | Fixes: e8d57802f (radv/gfx9: allocate events from uncached VA space) Signed-off-by: Dave Airlie <[email protected]>
* radv: use simpler indirect packet 3 if possible.Dave Airlie2017-09-071-14/+23
| | | | | | | | This fixes some observed hangs on CIK GPUs. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: allocate events from uncached VA spaceDave Airlie2017-09-073-3/+8
| | | | | | | | | | | | This copies what amdgpu-pro does, and allocates the memory for an event with an uncached mtype. This fixes hangs with: dEQP-VK.api.command_buffers.record_simul_use_primary Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: use amdgpu_bo_va_op_raw.Dave Airlie2017-09-071-7/+24
| | | | | | | | | | This is a precursor to the gfx9 fix to use uncached for the event memory. Move to the interface which allows setting the flags, but wrap it to avoid having to copy it around the place. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* Revert "st/va: add enviromental variable to disable interlace"Leo Liu2017-09-071-4/+0
| | | | | | | | This reverts commit 10dec2de2d9f568675d66d736b48701fa26f7b50. The environment variable is no longer needed with the previous change Reviewed-by: Christian König <[email protected]>
* st/va: move YUV content to deinterlaced buffer when reallocated for encoderLeo Liu2017-09-071-1/+10
| | | | | | | | v2: use deinterlace common function v3: make sure deinterlace only Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: reallocate the buffer if the layout isn't supportedLeo Liu2017-09-071-9/+12
| | | | | | | | So that it makes more clear for buffer reallocation based on buffers layout for both decoder and encoder. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/compositor: make vl_compositor_set_yuv_layer() staticLeo Liu2017-09-072-44/+28
| | | | | | | Since it's no longer being called outside of compositor Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/omx: use vl/compositor helper function for YUV deinterlacingLeo Liu2017-09-071-30/+2
| | | | | | | v2: separate helper function in different patch Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/compositor: make a helper function for YUV deinterlacingLeo Liu2017-09-072-0/+40
| | | | | | | | The similar function is in OMX, and only used by OMX. Now have it moved to vl/compositor for other state tracker to use later. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* ac/surface: add radeon_surf::has_stencil for convenienceMarek Olšák2017-09-0711-14/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/st/tests: Fix regressions with libunwind enabled introduced with 7be6d8fe12Gert Wollny2017-09-071-0/+1
| | | | | | | | Add the according flags to link with libunwind. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102565 Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/st/tests: Fix classic build regressions introduced with 7be6d8fe12Gert Wollny2017-09-071-1/+6
| | | | | | | | Fixes the build in classic only mode, i.e. the new state tracker tests are only build when Gallium is enabled. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/main: Fix GetTransformFeedbacki64 for glTransformFeedbackBufferBaseIago Toral Quiroga2017-09-071-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | The spec has special rules for querying buffer offsets and sizes when BindBufferBase is used, described in the OpenGL 4.6 spec, section 6.8 Buffer Object State: "To query the starting offset or size of the range of a buffer object binding in an indexed array, call GetInteger64i_v with target set to respectively the starting offset or binding size name from table 6.5 for that array. Index must be in the range zero to the number of bind points supported minus one. If the starting offset or size was not specified when the buffer object was bound (e.g. if it was bound with BindBufferBase), or if no buffer object is bound to the target array at index, zero is returned." Transform feedback buffer queries should follow the same rules, since it is the same case for them. There is a CTS test for this. Fixes: KHR-GL45.direct_state_access.xfb_buffers Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* radeonsi: don't read tcs_out_lds_layout.patch_stride from an SGPRMarek Olšák2017-09-071-6/+14
| | | | | | | Same as before, writing TCS outputs to LDS is rare. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't read tcs_out_lds_layout.vertex_size from an SGPRMarek Olšák2017-09-073-6/+20
| | | | | | | TCS outputs are usually not written to LDS, so no stats here. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: don't read LS out vertex stride from an SGPR in monolithic HSMarek Olšák2017-09-072-1/+11
| | | | | | | -44 bytes in a monolithic LS-HS binary. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't read the LS output vertex stride from an SGPR in LSMarek Olšák2017-09-071-4/+21
| | | | | | | | | Now it's able to generate ds_write2_b64 instead of ds_write2_b32. -20 bytes in one shader binary. (having only 1 output) Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't read the number of TCS out vertices from an SGPR in TCSMarek Olšák2017-09-071-2/+15
| | | | | | | -16 bytes in one shader binary. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't always apply the PrimID instancing bug workaround on SIMarek Olšák2017-09-071-1/+1
| | | | | | | | It looks like commit 391673af7ad1565a5f6ac8fc2f8c9fcdd1fe9908 that should have fixed the perf regression didn't really change much if anything. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove 2 callbacks from si_shader_contextMarek Olšák2017-09-073-17/+13
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: disable local BOs on RavenMarek Olšák2017-09-071-1/+2
| | | | | | It hangs with a high degree of reproducibility. Acked-by: Nicolai Hähnle <[email protected]>
* disk_cache: make the thread queue resizable and low priorityMarek Olšák2017-09-071-6/+8
| | | | | Acked-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* loader/dri3: Make sure we invalidate a drawable on size changeThomas Hellstrom2017-09-071-0/+2
| | | | | | | | | If we're seeing a drawable size change, in particular after processing a configure notify event, make sure we invalidate so that the state tracker picks up the new geometry. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader/dri3: Process event after each fence waitThomas Hellstrom2017-09-071-7/+10
| | | | | | | | | | This tries to mimic dri2 behaviour where events are typically processed while waiting for X replies. Since, during steady-state dri3 rendering, we seldom wait for xcb replies, and haven't enabled any automatic event processing, instead check for events after a fence wait. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>