aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Replace MESA_VERSION with PACKAGE_VERSION.Matt Turner2013-03-125-5/+5
| | | | | | One fewer place to have to update. Reviewed-by: Eric Anholt <[email protected]>
* mesa,gallium,egl,mapi: One definition of C99 inline/__func__ to rule them all.José Fonseca2013-03-121-51/+5
| | | | | | | | We were in four already... NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* mesa: Use correct functions for enum conversion.Vinson Lee2013-03-111-2/+2
| | | | | | | | Fixes mixing enum types defects reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Fix typo in doxygen hyperlinkChad Versace2013-03-111-1/+1
| | | | | | | | s/brw_state_upload/brw_upload_state/ Found because the link was broken. Signed-off-by: Chad Versace <[email protected]>
* mesa: Reduce memory usage for reg alloc with many graph nodes (part 2).Eric Anholt2013-03-111-4/+8
| | | | | | | | | | | | | After the previous fix that almost removes an allocation of 4*n^2 bytes, we can use a bitset to reduce another allocation from n^2 bytes to n^2/8 bytes. Between the previous commit and this one, the peak heap size for an oglconform ARB_fragment_program max instructions test on i965 goes from 4GB to 255MB. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55825 Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Reduce the memory usage for reg alloc with many graph nodes (part 1)Eric Anholt2013-03-111-1/+13
| | | | | | | | We were allocating an adjacency_list entry for every possible interference that could get created, but that usually doesn't happen. We can save a lot of memory by resizing the array on demand. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Improve CSE performance by expiring some available expressions.Eric Anholt2013-03-111-1/+19
| | | | | | | | | | We're already walking the list, and we can easily know when something has no reason to be in the list any longer, so take a brief extra step to reduce our worst-case runtime (an oglconform test that emits the maximum instructions in a fragment program). I don't actually know what the worst-case runtime was, because it was too long and I got bored. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Improve live variables calculation performance.Eric Anholt2013-03-112-26/+32
| | | | | | | | | | | | We can execute way fewer instructions by doing our boolean manipulation on an "int" of bits at a time, while also reducing our working set size. Reduces compile time of L4D2's slowest shader from 4s to 1.1s (-72.4% +/- 0.2%, n=10) v2: Remove redundant masking (noted by Ken) Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Also do the gen4 SEND dependency workaround against other SENDs.Eric Anholt2013-03-111-9/+15
| | | | | | | | | | | | We were handling the the dependency workaround for the first written reg of a send preceding the one we're fixing up, but didn't consider the other regs. Thus if you had two sampler calls that got allocated to the same set of regs, one might, rarely, ovewrite the other. This was occurring in XBMC's GLSL shaders. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44567 NOTE: This is a candidate for the stable branches. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Switch to using sampler LD messages for uniform pull constants.Eric Anholt2013-03-114-52/+50
| | | | | | | | | When forcing the compiler to always generate pull constants instead of push constants (in order to have an easy to use testcase), improves performance of my old GLSL demo 23.3553% +/- 1.42968% (n=7). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60866 Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix broken rendering in large shaders with UBO loads.Eric Anholt2013-03-111-0/+2
| | | | | | | | | | The lowering process creates a new vgrf on gen7 that should be represented in live interval analysis. As-is, it was getting a conflicting allocation with gl_FragDepth in the dolphin emulator, producing broken rendering. NOTE: This is a candidate for the 9.1 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61317 Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add a comment about about an implementation detail.Eric Anholt2013-03-111-0/+4
| | | | | | | | I was going to fix the code above like the previous commit, but we already had that covered (otherwise all our uniform access would have been broken, unlike just pull constants). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix register allocation for uniform pull constants in 16-wide.Eric Anholt2013-03-111-23/+31
| | | | | | | | | | | | | | | We were allowing a compressed instruction to write a register that contained the last use of a uniform pull constant (either UBO load or push constant spillover), so it would get half its values smashed. Since we need to see the actual instruction to decide this, move the pre-gen6 pixel_x/y logic here, which should improve the performance of register allocation since virtual_grf_interferes() is called more than once per instruction. NOTE: This is a candidate for the stable branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61317 Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Remove some unused debug flags.Eric Anholt2013-03-112-8/+0
| | | | | | | I was looking at the list to see what might be interesting to document for application developers, and it turns out some are completely dead. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: don't allocate a texture if width or height is 0 in CopyTexImageMarek Olšák2013-03-111-10/+12
| | | | | | NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* i965: Link i965_dri.so with C++ linker.Frank Henigman2013-03-081-0/+1
| | | | | | Force C++ linking of i965_dri.so by adding a dummy C++ source file. Reviewed-by: Matt Turner <[email protected]>
* mesa: Allow ETC2/EAC formats with ARB_ES3_compatibility.Matt Turner2013-03-082-2/+2
| | | | | | Fixes piglit's oes_compressed_etc2_texture-miptree tests on Desktop GL. Reported-by: Marek Olšák <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* dri/nouveau: fix crash in nouveau_flushJan de Groot2013-03-071-1/+2
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=61947 Note: this is a candidate for the stable branches
* vbo: fix crash found with shared display listsBrian Paul2013-03-071-1/+1
| | | | | | | | | | | This fixes a crash when a display list is created in one context but executed from a second one. The vbo_save_context::vertex_store memeber will be NULL if we never created a display list with the context. Just check for that before dereferencing the pointer. Fixes http://bugzilla.redhat.com/show_bug.cgi?id=918661 Note: This is a candidate for the stable branches.
* mesa: fix glGetInteger*(GL_SAMPLER_BINDING).Alan Hourihane2013-03-073-2/+14
| | | | | | | | | | | If the sampler object has been deleted on another context, an alternative context may reference the old sampler. So ensure the sampler object still exists. Note: this is a candidate for the stable branch. Signed-off-by: Alan Hourihane <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Unreference sampler object when it's currently bound to texture unit.Alan Hourihane2013-03-061-0/+10
| | | | | | | | | | | This change specifically unbinds a sampler object from the texture unit if it's bound to a unit. The spec calls for default object when deleting sampler objects which are currently bound. Note: this is a candidate for the stable branches Signed-off-by: Alan Hourihane <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: Don't fill buffer with zeroes.Kenneth Graunke2013-03-061-6/+0
| | | | | | | | This was only necessary because our bounds checking was off by one, and thus we read an extra pair of values. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Fix off-by-one in query object result gathering.Kenneth Graunke2013-03-061-2/+2
| | | | | | | | | | | If we've written N pairs of values to the buffer, then last_index = N, but the values are 0 .. N-1. Thus, we need to use <, not <=. This worked anyway because we fill the buffer with zeroes, so we just added an extra (0 - 0) to our results. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel: Improve the matching (more formats!) for TexImage from PBOs.Eric Anholt2013-03-051-25/+3
| | | | | | | Mesa core is the place for encoding what format/type matches a mesa format, so rely on that. Reviewed-by: Chad Versace <[email protected]>
* intel: Improve the test for readpixels blit path format checking.Eric Anholt2013-03-053-37/+6
| | | | | | | | We were allowing things like copying RG1616 to a user's ARGB8888 format, while we were denying anything that wasn't ARGB8888 or RGB565. Reviewed-by: Chad Versace <[email protected]>
* intel: Fold intel_region_copy() into its one caller.Eric Anholt2013-03-053-53/+16
| | | | | | | | | This is similar code to intel_miptree_copy_slice, but the knobs are all set differently. v2: fix whitespace Reviewed-by: Chad Versace <[email protected]>
* intel: Transition intel_region_map() to being a miptree operation.Eric Anholt2013-03-055-91/+55
| | | | | | | | | | I'm trying to move us away from the region structure, and all the callers are currently dereferencing a miptree to get the region. In this change, the map_refcount is dropped. However, the bo->virtual is itself map refcounted, so that's already dealt with. Reviewed-by: Chad Versace <[email protected]>
* intel: Remove num_mapped_regions tracking.Eric Anholt2013-03-052-14/+0
| | | | | | | | The point of tracking the value was removed in February 2012 (65b096aeddd9b45ca038f44cc9adfff86c8c48b2), and this should have been removed at the same time. Reviewed-by: Chad Versace <[email protected]>
* intel: Remove the struct intel_region reuse hash table.Eric Anholt2013-03-054-39/+2
| | | | | | | | | | | | I don't see any reason for it -- it was introduced with the DRI2 invalidate work by krh in 2010 with no explanation. I suspect it was something about wanting the same drm_intel_bo struct underneath multiple openings of the BO within one process, but that's covered by libdrm at this point. As far as the struct region goes, it is not threadsafe, so multiple contexts sharing a region could have mixed up the map_count and assertion failed or worse. Reviewed-by: Chad Versace <[email protected]>
* mesa: Remove the special enum for _mesa_error debug output.Eric Anholt2013-03-052-6/+8
| | | | | | | | Now all the per-message enums from mtypes are gone. Now we can extend unique message IDs into all generators of debug output without having to update mtypes.h for each one. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Remove the enum for the oom-within-debug-output case.Eric Anholt2013-03-052-6/+4
| | | | Reviewed-by: Jordan Justen <[email protected]>
* mesa: Remove now-unused gl_winsys_error and gl_shader_error enums.Eric Anholt2013-03-051-8/+0
| | | | Reviewed-by: Jordan Justen <[email protected]>
* mesa: Report ARB_debug_output for both shader errors and warnings.Eric Anholt2013-03-052-3/+6
| | | | | | | | This ends up reusing the dynamic ID support, so a silly enum gets to go away. We don't assign good IDs to different messages yet, but at least that's tractable now. Reviewed-by: Jordan Justen <[email protected]>
* intel: Add missing perf debug for a stall on mapping a BO.Eric Anholt2013-03-051-0/+2
| | | | | | | | I was testing the ARB_debug_output code and wrote an obvious sample that should have hit this, and got confused that my ARB_debug_output was broken. Reviewed-by: Jordan Justen <[email protected]>
* i965: Make perf_debug() output to GL_ARB_debug_output in a debug context.Eric Anholt2013-03-0516-48/+83
| | | | | | | | I tried to ensure that performance in the non-debug case doesn't change (we still just check one condition up front), and I think the impact is small enough in the debug context case to warrant including all of it. Reviewed-by: Jordan Justen <[email protected]>
* intel: Finish renaming fallback_debug() to perf_debug().Eric Anholt2013-03-055-18/+13
| | | | | | | They're about to change to handle GL_ARB_debug_output, so just make one function. Reviewed-by: Jordan Justen <[email protected]>
* intel: Hook up the WARN_ONCE macro to GL_ARB_debug_output.Eric Anholt2013-03-054-0/+8
| | | | | | | | | | This doesn't provide detailed error type information, but it's important to get these relatively severe but rare error messages out to the developer through whatever mechanism they are using. v2: Rebase on new WARN_ONCE additions. Reviewed-by: Jordan Justen <[email protected]> (v1)
* mesa: Add support for GL_ARB_debug_output with dynamic ID allocation.Eric Anholt2013-03-052-4/+60
| | | | | | | We can emit messages now without always having to use the same ID for each, or having a giant table of all possible errors in mtypes.h. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Merge handling of application-provided and built-in error sources.Eric Anholt2013-03-052-232/+131
| | | | | | | | | I want to have dynamic IDs so that we don't need to add to mtypes.h for every error we might want to add. To do so, I need to get rid of the static arrays and actually support all the crazy filtering of dynamic IDs that we already support for application-provided error sources. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Fix _mesa_problem() on context destroy after application debug outputEric Anholt2013-03-051-0/+6
| | | | | | | | | | This was apparently not noticed because we don't have any testing of application-generated debug output. However, as I'm changing the GL-generated debug output to use the same path as application/middleware-generated debug output, this obviously became an issue. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Move debug type/severity enums to mesa core.Eric Anholt2013-03-052-68/+91
| | | | | | | | | | | These will get reused by new ARB_debug_output messages in drivers/core, instead of having the caller pass GL enums and have us immediately switch-statement those into enums. Add source enums will be handled in the next commit, because the way different sources are handled at the moment is pretty strange. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Replace open-coded _mesa_lookup_enum_by_nr().Eric Anholt2013-03-051-35/+3
| | | | | | | The new one doesn't have the same behavior for GL_NO_ERROR, but we don't produce errors with GL_NO_ERROR as the error type. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Remove extra #define MAXSTRING duplicating MAX_DEBUG_MESSAGE_LENGTH.Eric Anholt2013-03-051-15/+14
| | | | Reviewed-by: Jordan Justen <[email protected]>
* dri/nouveau: NV17_3D class is not available for NV1a chipsetMarcin Slusarz2013-03-051-1/+1
| | | | | | | | Should fix https://bugs.freedesktop.org/show_bug.cgi?id=60510 Note: this is a candidate for the stable branches Acked-by: Francisco Jerez <[email protected]>
* st/mesa: translate ir offset parameters for non-TXF opcodes.Roland Scheidegger2013-03-051-2/+18
| | | | | | | Otherwise the state tracker will crash if the texture instructions have offsets. Reviewed-by: Brian Paul <[email protected]>
* Add missing GL_TEXTURE_CUBE_MAP entry in _mesa_legal_texture_dimensionsAlan Hourihane2013-03-051-0/+1
| | | | | | | | | This was hit on the glTexStorage2D() path. Note: this is a candidate for the stable branches Signed-off-by: Alan Hourihane <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Fix out-of-tree build of 'make check' in src/mesa/main/testsJon TURNEY2013-03-051-4/+4
| | | | | Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Andreas Boll <[email protected]>
* mesa: flush current state when querying GL_EDGE_FLAGBrian Paul2013-03-041-1/+1
| | | | | | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=61395 Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* i965: Fix Crystal Well PCI IDs.Kenneth Graunke2013-03-031-9/+9
| | | | | | | | | The second digit was off by one, which meant we accidentally treated GTn as GT(n-1). This also meant no support for GT1 at all. NOTE: This is a candidate for stable branches. Signed-off-by: Kenneth Graunke <[email protected]>
* st/mesa: add switch case for ir_txf_ms to silence warningBrian Paul2013-03-021-0/+3
| | | | Reviewed-by: Roland Scheidegger <[email protected]>