summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gallium/st + hgl: Build fixes for HaikuAlexander von Gluck IV2015-05-133-0/+5
| | | | | | * No impact risk to any other platforms * Tracing printf needs stdio.h now due to child header change * Add missing #/src include directory for util/macros.h
* i965: Fix PBO cache coherency issue after _mesa_meta_pbo_GetTexSubImage().Francisco Jerez2015-05-132-2/+31
| | | | | | | | | | | | | | This problem can easily be reproduced with a number of ARB_shader_image_load_store piglit tests, which use a buffer object as PBO for a pixel transfer operation and later on bind the same buffer to the pipeline as shader image -- The problem is not exclusive to images though, and is likely to affect other kinds of buffer objects that can be bound to the 3D pipeline, including vertex, index, uniform, atomic counter buffers, etc. CC: 10.5 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/fs: set execution size to 8 with simd8 ddy instructionTapani Pälli2015-05-131-0/+1
| | | | | | | | | | | Commit dd5c825 changed the way how execution size for instructions get set. Previously it was based on destination register width, now it is set explicitly when emitting instructions. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Matt Turner <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90258
* i965/cs: drop explicit initialisers in C++ fileDave Airlie2015-05-131-4/+6
| | | | | | | | gcc 4.4.7 really doesn't like them, and they aren't standard C++, they seem to be a gcc extension. Reviewed-by: Jordan Justen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nouveau: document nouveau_heapIlia Mirkin2015-05-121-0/+20
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: switch mechanism for shader eviction to be a while loopIlia Mirkin2015-05-121-5/+6
| | | | | | | | | | This aligns it to work similarly to nv50. However there's no library code there, so the whole thing can be freed. Here we end up with an allocated node that's not attached to a specific program. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86792 Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* st/mesa: update stencil surface if it comes from textureIlia Mirkin2015-05-121-1/+4
| | | | | | | Now that ARB_texture_stencil8 is supported, this might happen. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: translate st_api robustness flags to gl_context flagsMarek Olšák2015-05-121-0/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/dri: add support for create_context_robustness GLX and EGL extensionsMarek Olšák2015-05-124-9/+43
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: implement GetGraphicsResetStatusMarek Olšák2015-05-124-6/+42
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: add PIPE_CAP_DEVICE_RESET_STATUS_QUERYMarek Olšák2015-05-1215-0/+16
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* 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]>
* nir: Translate memory barrier intrinsics from GLSL IR.Francisco Jerez2015-05-121-0/+4
| | | | | Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Translate image load, store and atomic intrinsics from GLSL IR.Francisco Jerez2015-05-121-11/+115
| | | | | | | v2: Undefine coordinate components not applicable to the target. Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Fix indexing of atomic counter arrays with a constant value.Francisco Jerez2015-05-121-1/+2
| | | | | Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Add memory barrier intrinsic.Francisco Jerez2015-05-121-0/+7
| | | | | Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Define image load, store and atomic intrinsics.Francisco Jerez2015-05-121-0/+27
| | | | | | | v2: Undefine coordinate components not applicable to the target. Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Have component() set the register stride to zero.Francisco Jerez2015-05-121-0/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix offset() for registers with zero stride.Francisco Jerez2015-05-121-2/+3
| | | | | | | stride == 0 implies that the register has one channel per vector component. Reviewed-by: Matt Turner <[email protected]>
* i965: Don't forget the force_sechalf flag in lower_load_payload().Francisco Jerez2015-05-121-0/+1
| | | | | | | Regression from commit 41868bb6824c6106a55c8442006c1e2215abf567. Fixes a bunch of ARB_shader_image_load_store tests. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Document brw_mask_reg().Francisco Jerez2015-05-121-1/+5
| | | | Reviewed-by: Matt Turner <[email protected]>
* nir: fix sampler lowering pass for arraysTapani Pälli2015-05-121-19/+12
| | | | | | | | | | | | | | | | | | This fixes bugs with special cases where we have arrays of structures containing samplers or arrays of samplers. I've verified that patch results in calculating same index value as returned by _mesa_get_sampler_uniform_value for IR. Patch makes following ES3 conformance test pass: ES3-CTS.shaders.struct.uniform.sampler_array_fragment v2: remove unnecessary comment (Topi) simplify changes and the overall code (Jason) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90114
* i965: Use predicate enable bit for conditional rendering w/o stallingNeil Roberts2015-05-129-12/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously whenever a primitive is drawn the driver would call _mesa_check_conditional_render which blocks waiting for the result of the query to determine whether to render. On Gen7+ there is a bit in the 3DPRIMITIVE command which can be used to disable the primitive based on the value of a state bit. This state bit can be set based on whether two registers have different values using the MI_PREDICATE command. We can load these two registers with the pixel count values stored in the query begin and end to implement conditional rendering without stalling. Unfortunately these two source registers were not in the whitelist of available registers in the kernel driver until v3.19. This patch uses the command parser version from intel_screen to detect whether to attempt to set the predicate data registers. The predicate enable bit is currently only used for drawing 3D primitives. For blits, clears, bitmaps, copypixels and drawpixels it still causes a stall. For most of these it would probably just work to call the new brw_check_conditional_render function instead of _mesa_check_conditional_render because they already work in terms of rendering primitives. However it's a bit trickier for blits because it can use the BLT ring or the blorp codepath. I think these operations are less useful for conditional rendering than rendering primitives so it might be best to leave it for a later patch. v2: Use the command parser version to detect whether we can write to the predicate data registers instead of trying to execute a register load command. v3: Simple rebase v4: Changes suggested by Kenneth Graunke: Split the load_64bit_register function out to a separate patch so it can be a shared public function. Avoid calling _mesa_check_conditional_render if we've already determined that there's no query object. Some styling fixes. Reviewed-by: Kenneth Graunke <[email protected]>
* i956: Add a function to load a 64-bit register from a bufferNeil Roberts2015-05-122-14/+46
| | | | | | | | | | | | Adds brw_load_register_mem64 which is similar to brw_load_register_mem except that it queues two GEN7_MI_LOAD_REGISTER_MEM commands in order to load both halves of a 64-bit register. The function is implemented by splitting the 32-bit version into an internal helper function which takes a size. This will later be used to set the 64-bit predicate source registers. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Store the command parser version number in intel_screenNeil Roberts2015-05-122-1/+14
| | | | | | | | | In order to detect whether the predicate source registers can be used in a later patch we will need to know the version number for the command parser. This patch just adds a member to intel_screen and does an ioctl to get the version. Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: make sure to create a "clean" bool when doing i2bIlia Mirkin2015-05-111-1/+1
| | | | | | | | | | | | i2b has to work for all integers, not just 1. INEG would not necessarily result with all bits set, which is something that other operations can rely on by e.g. using AND (or INEG for b2i). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Cc: [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]>
* i965/fs: Add missing initializer in fs_visitor().Matt Turner2015-05-111-1/+1
|
* egl: Remove skeleton implementation of EGL_MESA_screen_surfaceAdam Jackson2015-05-1112-1196/+0
| | | | | | | | No backend wires this up to anything, and the extension spec has been marked obsolete for 4+ years. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* egl/swrast: Enable config extension for swrastAxel Davy2015-05-113-14/+15
| | | | | | | | Enables to use dri config for swrast, like vblank_mode. Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: Implement swrast supportAxel Davy2015-05-113-17/+696
| | | | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]>. Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: Simplify dri2_wl_create_surfaceAxel Davy2015-05-111-25/+13
| | | | | | | | | This function is always used with EGL_WINDOW_BIT. Pixmaps are forbidden for Wayland, and PBuffers are unimplemented. Reviewed-by: Daniel Stone <[email protected]>. Signed-off-by: Axel Davy <[email protected]>
* egl/x11: move dri2_x11_swrast_create_image_khr to egl_dri2_fallback.hAxel Davy2015-05-112-10/+10
| | | | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: Implement DRI_PRIME supportAxel Davy2015-05-112-15/+92
| | | | | | | | | | | | | | | | | | When the server gpu and requested gpu are different: . They likely don't support the same tiling modes . They likely do not have fast access to the same locations Thus we do: . render to a tiled buffer we do not share with the server . Copy the content at every swap to a buffer with no tiling that we share with the server. This is similar to the glx dri3 DRI_PRIME implementation. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: Add support for render-nodesAxel Davy2015-05-112-14/+56
| | | | | | | | | | | | | | It is possible the server advertises a render-node. In that case no authentication is needed, and Gem names are forbidden. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]> v2: do not check for __DRI_IMAGE_DRIVER, but instead do not advertise __DRI_DRI2_LOADER when on a render-node.
* glx/dri3: Add additional check for gpu offloading caseAxel Davy2015-05-111-0/+5
| | | | | | | | | | | | | | | Checks blitImage is implemented. Initially having the __DRIimageExtension extension at version 9 at least meant blitImage was supported. However some implementation do advertise version >= 9 without implementing it. CC: 10.5 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: properly destroy wayland objectsAxel Davy2015-05-112-1/+6
| | | | | | | | | | | the wl_registry and the wl_queue allocated weren't destroyed. CC: 10.5 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* i965/fs: Disable opt_sampler_eot for textureGatherNeil Roberts2015-05-111-0/+10
| | | | | | | | | | | | | The opt_sampler_eot optimisation seems to break when the last instruction is SHADER_OPCODE_TG4. A bunch of Piglit tests end up doing this so it causes a lot of regressions. I can't find any documentation or known workarounds to indicate that this is expected behaviour, but considering that this is probably a pretty unlikely situation in a real use case we might as well disable it in order to avoid the regressions. In total this fixes 451 tests. Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* mesa: use _mesa_has_compute_shaders instead of extension checkTapani Pälli2015-05-111-1/+3
| | | | | | | | | | | This was really the original purpose, for enabling the path for ES3.1 tests without the extension being set. Set also fallthrough comment for Coverity (caught by Matt). v2: .. and test the right way, not wrong one (Ilia Mirkin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* main: glGetIntegeri_v fails for GL_VERTEX_BINDING_STRIDEMarta Lofstedt2015-05-111-0/+1
| | | | | | | | | | The return type for GL_VERTEX_BINDING_STRIDE is missing, this cause glGetIntegeri_v to fail. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Cc: "10.4 10.5" <[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]