summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* nv30: hack to avoid errors on unexpected color/zeta combinationsIlia Mirkin2014-06-191-0/+17
| | | | | | | | | | This is just a hack, it should be possible to create a temporary zeta surface and render to that instead. However that's more complicated and this avoids the render being entirely broken and errors being reported by the card. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* nv30: tidy screen caps, add missing onesIlia Mirkin2014-06-191-16/+17
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv30: avoid dangling references to deleted contextsIlia Mirkin2014-06-191-0/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* nv30: plug some memory leaks on screen destroy and shader compileIlia Mirkin2014-06-192-0/+7
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* nv50: organize screen capsIlia Mirkin2014-06-191-67/+57
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: organize screen capsIlia Mirkin2014-06-191-61/+51
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: remove vport_int hack and instead use the usual state validationIlia Mirkin2014-06-193-11/+3
| | | | | | | | Commit ad4dc772 fixed an issue with the viewport not being restored correctly. However it's rather hackish and confusing. Instead just mark the viewport dirty and let the viewport validation take care of it. Signed-off-by: Ilia Mirkin <[email protected]>
* r300g: don't advertize PIPE_FORMAT_B10G10R10X2_UNORM on < r500David Heidelberger2014-06-191-0/+1
| | | | | Signed-off-by: David Heidelberger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* radeonsi: implement ARB_texture_query_lodMarek Olšák2014-06-194-26/+42
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: pass ARB_conservative_depth parameters to the hardwareMarek Olšák2014-06-194-1/+29
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* gallium: implement ARB_texture_query_levelsMarek Olšák2014-06-197-10/+30
| | | | | | | | | The extension is always supported if GLSL 1.30 is supported. Softpipe and llvmpipe support is also added (trivial). Radeon and nouveau support is already done. Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: set sampler_view::last_level correctlyMarek Olšák2014-06-192-6/+12
| | | | | | | | | It was set to pipe_resource::last_level and _MaxLevel was embedded in max_lod, that's why it worked for ordinary texturing. However, min_lod doesn't have any effect on texelFetch and textureQueryLevels, so we must still set last_level correctly. Reviewed-by: Roland Scheidegger <[email protected]>