aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i915: Fix gen2 texblend setupVille Syrjälä2014-06-231-1/+1
| | | | | | | | | | | | | | | | | Fix an off by one in the texture unit walk during texblend setup on gen2. This caused the last enabled texunit to be skipped resulting in totally messed up texturing. This is a regression introduced here: commit 1ad443ecdd694dd9bf3c4a5050d749fb80db6fa2 Author: Eric Anholt <[email protected]> Date: Wed Apr 23 15:35:27 2014 -0700 i915: Redo texture unit walking on i830. Reviewed-by: Ian Romanick <[email protected]> Cc: "10.2" <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]>
* mesa: Make Geom.UsesEndPrimitive a bool instead of a GLbooleanIago Toral Quiroga2014-06-232-3/+3
|
* targets/r600/xvmc: convert to static/shared pipe-driversEmil Velikov2014-06-226-73/+11
| | | | | | | | | | | The r600 equivalent of previous commit. v2: Correctly include the radeon winsys/radeon_common. Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com>
* targets/xvmc-nouveau: convert to static/shared pipe-driversEmil Velikov2014-06-228-70/+99
| | | | | | | | | | | | | Similar to vdpau targets, we're going to convert the individual target libraries into a single one. The library can be built with the relevant pipe-drivers statically linked in, or loaded as shared modules. Currently we default to static. Cc: Ilia Mirkin <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com>
* targets/radeonsi/vdpau: convert to static/shared pipe-driversEmil Velikov2014-06-227-79/+15
| | | | | | | | | | | | | | Similar to previous commits, this allows us to minimise some of the duplication by compacting all vdpau targets into a single library. v2: Include the radeon winsys only when there is a user for it. v3: Correcly include the winsys. Now with extra brown bag :\ Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com>
* targets/r600/vdpau: convert to static/shared pipe-driversEmil Velikov2014-06-225-56/+20
| | | | | | | | | | | | | | Similar to previous commit, this allows us to minimise some of the duplication by compacting all vdpau targets into a single library. v2: Include the radeon winsys only when there is a user for it. v3: Correcly include the winsys. Now with extra brown bag :\ Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com>
* targets/vdpau-nouveau: convert to static/shared pipe-driversEmil Velikov2014-06-2218-72/+164
| | | | | | | | | | | | | | | | | | | | | | Create a single library (for the vdpau api) thus reducing the overall size of mesa. Current commit converts vdpau-nouveau, with upcomming commits handling the rest. The library can be built with the relevant pipe-drivers statically linked in, or loaded as shared modules. Currently we default to static. Add SPLIT_TARGETS to guard the other VL targets. Note: symlink handling is rather ugly and will need an update to work with BSD and other non-linux platforms. v2: Split the conversion into per-target basis. Cc: Maarten Lankhorst <[email protected]> Cc: Ilia Mirkin <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com>
* Partially revert "glsl: Add builtin define for ARB_fragment_layer_viewport"Chris Forbes2014-06-221-0/+6
| | | | | This partially reverts commit cc18b1ec2161c846109e921d7821dfeef7a06f3a, which dropped some unrelated code due to a fumbled rebase.
* freedreno: use util_copy_framebuffer_state()Rob Clark2014-06-221-12/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: WFI fixes/cleanupRob Clark2014-06-225-48/+41
| | | | | | | | | | | | | | | Blob driver seems to need WFI in some cases after CP_EVENT_WRITE, implying that this is asynchronous and should reset needs_wfi. Also, CP_INVALIDATE_STATE seems to need WFI. But CP_LOAD_STATE does not. The blob driver also puts WFIs before writing GRAS_CL_VPORT registers. The latter may be a work-around, as these registers should be banked/ context registers. I haven't yet found a lockup that this averts, but I expect viewport to change infrequently so out of paranoia I will keep these for now. Signed-off-by: Rob Clark <[email protected]>
* glsl: Add gl_Layer and gl_ViewportIndex builtins to fragment shaderChris Forbes2014-06-221-0/+5
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add builtin define for ARB_fragment_layer_viewportChris Forbes2014-06-221-6/+3
| | | | | | | | The spec doesn't actually mention adding this, but this is the usual pattern so I'm assuming it's a spec bug. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add extension plumbing for ARB_fragment_layer_viewportChris Forbes2014-06-223-0/+4
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add extension plumbing for ARB_fragment_layer_viewportChris Forbes2014-06-222-0/+2
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Add (empty) api section for ARB_fragment_layer_viewportChris Forbes2014-06-221-1/+7
| | | | | | | This extension is purely GLSL -- there are no new GL API elements. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Save meta stencil blit programs in the context.Kenneth Graunke2014-06-212-8/+13
| | | | | | | | | | | | | | | | | | | | | | | When the last context in a share group is destroyed, the hash table containing all of the shader programs (ctx->Shared->ShaderObjects) is destroyed, throwing away all of the shader programs. Using a static variable to store program IDs ends up holding on to them after this, so we think we still have a compiled program, when it actually got destroyed. _mesa_UseProgram then hits GL errors, since no program by that ID exists. Instead, store the program IDs in the context, so we know to recompile if our context gets destroyed and the application creates another one. Fixes es3conform tests when run without -minfmt (where it creates separate contexts for testing each visual). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77865 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "10.2" <[email protected]>
* scons: avoid building any piece of i915Emil Velikov2014-06-213-35/+0
| | | | | | | Leftover from commit c21fca8bf24. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* gallivm: Fix build after LLVM commit 211259Aaron Watry2014-06-201-1/+3
| | | | | Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* glx: Don't crash on swap event for a Window (non-GLXWindow)Daniel Manjarres2014-06-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to GLX 1.3 there was the glxMakeCurrent() function that took a single drawable handle. The Drawable could be either a bare XID for a Window or an XID for a glxpixmap. GLX 1.3 added glxMakeContextCurrent that takes 2 handles: one for reading, one for writing. Nowadays the old glxMakeCurrent call is implemented as a call to glxMakeContextCurrent with the single handle duplicated. Because of this it is allowed to use a plain-old Window ID as an argument to glxMakeContextCurrent, although nobody really documents this sort of thing. The manpage for the NEW call specifies the arguments as GLXPixmaps, but the actual code accepts Window XIDs too, and handles them correctly. Similarly, the glxSelectEvents function can also take a bare Window XID. The "piglit" tests all use GLXWindows and/or GLXPixmaps. You never tested swap events with a bare Window XID. That is what my app was doing. The swap_events code worked with Window XIDs in mesa 7.x.y. The new code added in versions 8, 9, and 10 assumes that all buffer swap events have a GLXPixmap associated with them. Because of the historical quirks above, this is not true. Swap events for bare Window XIDs do NOT have a glxpixmap resulting in a segfault. Any app that uses the old school glxMakeCurrent call with a Window XID while trying to use swap_events will crash when the libs try to lookup the nonexistent GLXPixmap associated with the incoming swap event. I believe that the people who wrote the spec overlooked this, because the "sbc" field comes from the OML_sync extension that is defined in terms of glxpixmaps only. v2 (idr): Formatting changes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54372 Reviewed-by: Ian Romanick <[email protected]> Acked-by: Jesse Barnes <[email protected]> Cc: "10.1 10.2" <[email protected]>
* r600g/compute: Use gallium util functions for double listsBruno Jiménez2014-06-202-111/+46
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Map only against intermediate buffersBruno Jiménez2014-06-201-6/+4
| | | | | | | | | | | | With this we can assure that mapped buffers will never change its position when relocating the pool. This patch should finally solve the mapping bug. v2: Use the new is_item_in_pool util function, as suggested by Tom Stellard Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Implement compute_memory_demote_itemBruno Jiménez2014-06-202-0/+54
| | | | | | | | | | This function will be used when we want to map an item that it's already in the pool. v2: Use temporary variables to avoid so many castings in functions, as suggested by Tom Stellard Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Avoid problems when promoting items mapped for readingBruno Jiménez2014-06-201-4/+8
| | | | | | | | | | | Acording to the OpenCL spec, it is possible to have a buffer mapped for reading and at read from it using commands or buffers. With this we can keep the mapping (that exists against the temporary item) and read with a kernel (from the item we have just added to the pool) without problems. Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Only move to the pool the buffers marked for promotingBruno Jiménez2014-06-202-60/+91
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: divide the item list in twoBruno Jiménez2014-06-202-51/+49
| | | | | | | Now we will have a list with the items that are in the pool (item_list) and the items that are outside it (unallocated_list) Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Add statuses to the compute_memory_itemsBruno Jiménez2014-06-202-1/+18
| | | | | | | | | | These statuses will help track whether the items are mapped or if they should be promoted to or demoted from the pool v2: Use the new is_item_in_pool util function, as suggested by Tom Stellard Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Add an util function to know if an item is in the poolBruno Jiménez2014-06-201-0/+5
| | | | | | | Every item that has been placed in the pool must have start_in_dw different from -1. Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Add an intermediate resource for OpenCL buffersBruno Jiménez2014-06-203-6/+41
| | | | | | | | | | | | | | | | | | | This patch changes completely the way buffers are added to the compute_memory_pool. Before this, whenever we were going to map a buffer or write to or read from it, it would get placed into the pool. Now, every unallocated buffer has its own r600_resource until it is allocated in the pool. NOTE: This patch also increase the GPU memory usage at the moment of putting every buffer in it's place. More or less, the memory usage is ~2x(sum of every buffer size) v2: Cleanup v3: Use temporary variables to avoid so many castings in functions, as suggested by Tom Stellard Reviewed-by: Tom Stellard <[email protected]>
* mesa: Copy Geom.UsesEndPrimitive when cloning a geometry program.Iago Toral Quiroga2014-06-201-0/+1
| | | | | Reviewed-by: Ian Romanick <[email protected]> Cc: "10.1 10.2" <[email protected]>
* mesa: Init Geom.UsesEndPrimitive in shader programs.Iago Toral Quiroga2014-06-201-0/+1
| | | | Reviewed-by: Ian Romanick <[email protected]>
* glsl: Optimize (v.x + v.y) + (v.z + v.w) into dot(v, 1.0).Matt Turner2014-06-191-0/+46
| | | | Cuts five instructions out of SynMark's Gl32VSInstancing benchmark.
* glsl: Pass in options to do_algebraic().Matt Turner2014-06-194-6/+12
| | | | | | Will be used in the next commit. Reviewed-by: Eric Anholt <[email protected]>
* glsl: Rebalance expression trees that are reduction operations.Matt Turner2014-06-194-0/+303
| | | | | | | | | | The intention of this pass was to give us better instruction scheduling opportunities, but it unexpectedly reduced some instruction counts as well: total instructions in shared programs: 1666639 -> 1666073 (-0.03%) instructions in affected programs: 54612 -> 54046 (-1.04%) (and trades 4 SIMD16 programs in SS3)
* automake: include the libdeps in the correct orderEmil Velikov2014-06-194-8/+8
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80254 Signed-off-by: Emil Velikov <[email protected]>
* clover: Calculate the serialized size of a module efficiently.Francisco Jerez2014-06-193-4/+34
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Optimize module serialization for vectors of fundamental types.Francisco Jerez2014-06-191-1/+22
| | | | Tested-by: Tom Stellard <[email protected]>
* gallivm: set mcpu when initializing llvm execution engineRoland Scheidegger2014-06-191-2/+20
| | | | | | | | | | | | | | | Previously llvm detected cpu features automatically when the execution engine was created (based on host cpu). This is no longer the case, which meant llvm was then not able to emit some of the intrinsics we used as we didn't specify any sse attributes (only on avx supporting systems this was not a problem since despite at least some llvm versions enabling it anyway we always set this manually). So, instead of trying to figure out which MAttrs to set just set MCPU. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=77493. Reviewed-by: Jose Fonseca <[email protected]> Tested-by: Vinson Lee <[email protected]>
* clover: Don't use llvm's global contextTom Stellard2014-06-191-6/+9
| | | | | | | | | | An LLVMContext should only be accessed by a single and using the global context was causing crashes in multi-threaded environments. Now we use a separate context for each compile. Reviewed-by: Francisco Jerez <[email protected]> CC: "10.1 10.2" <[email protected]>
* clover: Prevent Clang from printing number of errors and warnings to stderr.Tom Stellard2014-06-191-0/+5
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=78581 CC: "10.1 10.2" <[email protected]>
* radeon/llvm: Adapt to AMDGPU.rsq intrinsic change in LLVM 3.5Michel Dänzer2014-06-191-0/+4
| | | | | Reviewed-by: Tom Stellard <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* configure: add HAVE_GALLIUM_STATIC_TARGETSEmil Velikov2014-06-191-0/+4
| | | | | | | | | | | Will be used to control the linking mode of pipe-drivers in gallium targets. Keep this hardcoded to static, as the pipe-drivers bare an unstable interface which we do not want to expose to the normal user. Signed-off-by: Emil Velikov <[email protected]>
* targets: use GALLIUM_PIPE_LOADER_WINSYS_LIB_DEPSEmil Velikov2014-06-194-54/+9
| | | | | | Drop ~50 lines of buildsystem mayhem. Signed-off-by: Emil Velikov <[email protected]>
* automake: introduce helper variableEmil Velikov2014-06-191-0/+16
| | | | | | | | | | | - gallium_pipe_loader_winsys_libs Will be used in upcomming commits to reduce duplication in the build. v2: Drop the megadriver/static_target variables. Signed-off-by: Emil Velikov <[email protected]>
* target-helpers: add dd_configuration(), dd_driver_name()Emil Velikov2014-06-192-0/+82
| | | | | | | | | | | Add a couple of helpers to be used by the dri targets when built with static pipe-drivers. Both functions provide functionality required by the dri state-tracker. With this patch ilo, nouveau and r300 gain support for throttle dri configuration. Signed-off-by: Emil Velikov <[email protected]>
* target-helpers: add dd_create_screen() helperEmil Velikov2014-06-192-0/+208
| | | | | | | | | | | Will be used by gallium targets that statically link the pipe-drivers in the final library. Provides identical functionality to device_descriptor.create_screan. v2: - Don't sw_screen_wrap the i915/svga screen. Signed-off-by: Emil Velikov <[email protected]>
* target-helpers: add a note about debug wrappersEmil Velikov2014-06-191-0/+4
| | | | | | | If memory serves me right, at least one debug wrapper does not return the base screen on failure. Signed-off-by: Emil Velikov <[email protected]>
* targets/pipe-loader: add driver specific drm_configurationEmil Velikov2014-06-195-5/+120
| | | | Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: add pipe_loader_ops::configuration()Emil Velikov2014-06-195-0/+53
| | | | | | | | | Required for the dri state-tracker. Will be used to retrieve driver specific configuration parameters: - share_fd (dmabuf) capability - throttle Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: note that we leak pipe_loader_drm_device->base->driver_nameEmil Velikov2014-06-191-0/+1
| | | | | | The string is malloc'd (strdup) in loader_get_driver_for_fd(). Signed-off-by: Emil Velikov <[email protected]>
* automake: stop building i915-sw and drop explicit linking to softpipeEmil Velikov2014-06-194-22/+4
| | | | | | | Unused and possibly broken. Will be completely removed in upcomming commits. Signed-off-by: Emil Velikov <[email protected]>