summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add an interface for querying a device reset statusMarek Olšák2015-05-122-0/+17
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* clover: Implement locking of the wait_count, _chain and _status members of ↵Francisco Jerez2015-05-121-0/+8
| | | | | | | event. Tested-by: Tom Stellard <[email protected]> CC: 10.5 <[email protected]>
* clover: Wrap event::_status in a method to prevent unlocked access.Francisco Jerez2015-05-122-7/+12
| | | | | Tested-by: Tom Stellard <[email protected]> CC: 10.5 <[email protected]>
* clover: Refactor event::trigger and ::abort to prevent deadlock and ↵Francisco Jerez2015-05-122-12/+34
| | | | | | | | | | | | reentrancy issues. Refactor ::trigger and ::abort to split out the operations that access concurrently modified data members and require locking from the recursive and possibly re-entrant part of these methods. This will avoid some deadlock situations when locking is implemented. Tested-by: Tom Stellard <[email protected]> CC: 10.5 <[email protected]>
* clover: Fix a bug with multi-threaded events v2Tom Stellard2015-05-112-3/+17
| | | | | | | | | | | | | | | | | | | | It was possible for some events never to get triggered if one thread was creating events and another threads was waiting for them. This patch consolidates soft_event::wait() and hard_event::wait() into event::wait() so that hard_event objects will now wait for all their dependencies to be submitted before flushing the command queue. v2: - Rename variables - Use mutable varibales so we can keep event::wait() const - Open code signalled() call so mutex can be atted to signalled without deadlocking. CC: 10.5 <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* clover: Add a mutex to guard queue::queued_eventsTom Stellard2015-05-112-0/+4
| | | | | | | | | | | | This fixes a potential crash where on a sequence like this: Thread 0: Check if queue is not empty. Thread 1: Remove item from queue, making it empty. Thread 0: Do something assuming queue is not empty. CC: 10.5 <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* egl/swrast: Enable config extension for swrastAxel Davy2015-05-111-0/+1
| | | | | | | | Enables to use dri config for swrast, like vblank_mode. Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* r600: use pipe->hw prim convert from radeonsiDave Airlie2015-05-111-15/+16
| | | | | | | | This avoids future addition to PIPE_PRIM_ from causing regressions on r600g. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* freedreno/ir3/nir: fix build break after f752effaRob Clark2015-05-101-4/+3
| | | | | | | Our lower if/else pass was missed when converting NIR to use linked lists rather than hashsets to track use/def sets. Signed-off-by: Rob Clark <[email protected]>
* nv50/ir: only enable mul saturate on G200+Ilia Mirkin2015-05-091-1/+4
| | | | | | | | | | | | | Commit 44673512a84 enabled support for saturating fmul. However experimentally this does not seem to work on the older chips. Restrict the feature to G200 (NVA0) and later. Reported-by: Pierre Moreau <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90350 Signed-off-by: Ilia Mirkin <[email protected]> Tested-by: Pierre Moreau <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> Cc: [email protected]
* nvc0: reset the instanced elements state when doing blit using 3d engineIlia Mirkin2015-05-091-0/+6
| | | | | | | | | | | | | | Since we update num_vtxelts here, we could otherwise end up with stale instancing information in the upper bits which wouldn't otherwise get reset. (Also we run the risk of the previous draw having set the first element as instanced.) This appears as one of the causes for the test pointed out in fdo#90363 to fail on nvc0. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90363 Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0: keep track of PGRAPH state in nvc0_screenIlia Mirkin2015-05-094-24/+34
| | | | | | | | | | See identical commit for nv50. Destroying the current context and then creating a new one or switching to another existing context would cause the "current" state to not be properly initialized, so we save it off in the screen. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nv50: keep track of PGRAPH state in nv50_screenIlia Mirkin2015-05-094-30/+36
| | | | | | | | | | | | | | Normally this is kept in nv50_context, and on switching the active context, the state is copied from the previous context. However when the last context is destroyed, this is lost, and a new context might later be created. When the currently-active context is destroyed, save its state in the screen, and restore it when setting the current context. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90363 Reported-by: Matteo Bruni <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Tested-by: Matteo Bruni <[email protected]> Cc: [email protected]
* util: Move gallium's linked list to utilJason Ekstrand2015-05-0842-189/+37
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* gallium/double_list: s/INLINE/inline and remove the p_compiler includeJason Ekstrand2015-05-081-7/+6
| | | | | Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* nv50/ir: only propagate saturate up if some actual folding took placeIlia Mirkin2015-05-081-1/+2
| | | | | | | | | | The former logic would copy the saturate up to any mul with an immediate if there was a subsequent mul with a saturate. However we only want to do that if we collapsed 2 muls by multiplying their immediates (or were able to put the immediate in as a post-multiplier). Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nv50/ir: add SHL to the list of U32 opcodesIlia Mirkin2015-05-061-0/+1
| | | | | | | | Having the wrong inferred type prevents a number of optimizations, including constant propagation (since float immediates work differently than integer immediates). Signed-off-by: Ilia Mirkin <[email protected]>
* r600g: Fix Clang return-type build error.Vinson Lee2015-05-061-1/+1
| | | | | | | | | | | | | | Fix Clang return-type error introduced with commit 96f164f6f047833091eb98a73aa80c31dc94f962 "gallium: make pipe_context::begin_query return a boolean". CC r600_query.lo r600_query.c:443:3: error: non-void function 'r600_begin_query' should return a value [-Wreturn-type] return; ^ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* draw: (trivial) fix out-of-bounds vector initializationRoland Scheidegger2015-05-061-1/+1
| | | | | | | | | | | | Was off-by-one. llvm says inserting an element with an index higher than the number of elements yields undefined results. Previously such inserts were ignored but as of llvm revision 235854 the vector gets replaced with undef, causing failures. This fixes piglit gl-3.2-layered-rendering-gl-layer, as mentioned in https://llvm.org/bugs/show_bug.cgi?id=23424. Reviewed-by: Brian Paul <[email protected]> Cc: [email protected]
* ilo: silence a compiler warningChia-I Wu2015-05-061-1/+1
| | | | | | | | Silence ilo_query.c:120:7: warning: 'return' with no value, in function returning non-void since commit 96f164f6.
* nvc0: all queries use an unsigned 64-bits integer by defaultSamuel Pitoiset2015-05-061-5/+7
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* nvc0: make begin_query return false when all MP counters are usedSamuel Pitoiset2015-05-061-5/+8
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* nvc0: define driver-specific query groupsSamuel Pitoiset2015-05-063-0/+76
| | | | | | | | This patch defines "Driver statistics" and "MP counters" groups, but only the latter will be exposed through GL_AMD_performance_monitor. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: make pipe_context::begin_query return a booleanSamuel Pitoiset2015-05-0618-34/+51
| | | | | | | | | GL_AMD_performance_monitor must return an error when a monitoring session cannot be started. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: replace pipe_driver_query_info::max_value by a unionSamuel Pitoiset2015-05-066-27/+36
| | | | | | | | This allows queries to return different numeric types. Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: add new numeric types to pipe_query_resultSamuel Pitoiset2015-05-061-0/+8
| | | | | | | | This will be used by GL_AMD_performance_monitor. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: add new fields to pipe_driver_query_infoSamuel Pitoiset2015-05-065-20/+30
| | | | | | | | | | | | | | According to the spec of GL_AMD_performance_monitor, valid type values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT. This also introduces the new field group_id in order to categorize queries into groups. v2: add PIPE_DRIVER_QUERY_TYPE_BYTES v3: fix incorrect query type for radeon and svga drivers Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: add pipe_screen::get_driver_query_group_infoSamuel Pitoiset2015-05-063-0/+35
| | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* ilo: use ilo_image exclusively in coreChia-I Wu2015-05-024-139/+149
| | | | | Initialize ilo_view_surface and ilo_zs_surface from ilo_image instead of ilo_texture.
* ilo: add ilo_image_can_enable_aux()Chia-I Wu2015-05-029-50/+27
| | | | It replaces ilo_texture_can_enable_hiz().
* ilo: make ilo_image more self-containedChia-I Wu2015-05-022-9/+21
| | | | Add depth0, sample_count, and scanout to ilo_image.
* ilo: add ilo_image_init_for_imported()Chia-I Wu2015-05-023-60/+66
| | | | | It replaces ilo_image_update_for_imported_bo() and enables more error checkings for imported textures.
* ilo: prepare for image init for imported boChia-I Wu2015-05-021-120/+129
| | | | Refactoring in prepraration for ilo_image_init_for_imported().
* ilo: constify ilo_image_paramsChia-I Wu2015-05-021-11/+11
| | | | Make ilo_image_params const in functions that do not modify it.
* ilo: improve readability of ilo_imageChia-I Wu2015-05-026-111/+127
| | | | Improve docs, rename struct fields, and reorder walk types. No real changes.
* ilo: move command builder to coreChia-I Wu2015-05-0223-61/+74
|
* ilo: move ilo_state_3d* to coreChia-I Wu2015-05-029-276/+274
| | | | ilo state structs (struct ilo_xxx_state) are moved as well.
* ilo: add ilo_buffer.h to coreChia-I Wu2015-05-025-90/+138
| | | | Rename the original ilo_buffer to ilo_buffer_resource to avoid name conflict.
* ilo: move BOs from ilo_texture to ilo_imageChia-I Wu2015-05-027-39/+63
| | | | We want to work with ilo_image instead of ilo_texture in core.
* ilo: move ilo_layout.[ch] to core as ilo_image.[ch]Chia-I Wu2015-05-0211-487/+489
| | | | Move files and s/layout/image/.
* ilo: add ilo_format.[ch] to coreChia-I Wu2015-05-028-169/+184
| | | | The original ilo_format.[ch] are removed.
* ilo: add ilo_fence.h to coreChia-I Wu2015-05-025-58/+113
| | | | Implement pipe_fence_handle on top of ilo_fence.
* ilo: add ilo_dev_init() to coreChia-I Wu2015-05-024-146/+195
| | | | Move init_dev() from ilo_screen.c to core.
* ilo: rename ilo_dev_info to ilo_devChia-I Wu2015-05-0225-141/+141
| | | | With intel_winsys being embedded in it, drop the "_info" suffix.
* ilo: move intel_winsys to ilo_dev_infoChia-I Wu2015-05-025-13/+15
| | | | We want to use ilo_dev_info instead of ilo_screen in core.
* ilo: add ilo_dev.h to coreChia-I Wu2015-05-023-38/+73
| | | | Move what are remaining in ilo_common.h (that is, ilo_dev_*) to ilo_dev.h.
* ilo: add ilo_debug.[ch] to coreChia-I Wu2015-05-025-85/+158
| | | | | They consist of the debug helpers that used to live in ilo_common.h and ilo_screen.c.
* ilo: add ilo_core.h to coreChia-I Wu2015-05-023-14/+48
| | | | | ilo_core.h includes the common gallium headers that were included in ilo_common.h.
* ilo: move intel_winsys.h to coreChia-I Wu2015-05-0220-19/+19
| | | | | Add a new subdirectory and start moving files that do not depend on ilo_screen/ilo_context to it.
* st/dri: implement the fence interface for CL eventsMarek Olšák2015-04-303-1/+81
|