summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-2325-76/+100
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-2325-25/+25
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-2324-24/+24
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* mesa: don't flag _NEW_DEPTH in Begin/EndQuery if driver implements the functionsMarek Olšák2013-04-245-5/+10
| | | | | | | | | | | We don't want to set the flag for Gallium. I think only swrast needs the flag to be set for occlusion queries. v2: fix stats_wm updates in i965 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _NEW_PACKUNPACKMarek Olšák2013-04-241-1/+0
| | | | | | | | | | No driver checks the flag. Nobody uses it. I also removed the FLUSH_VERTICES calls, because PixelStorei has no effect on rendering. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: convert _NEW_RASTERIZER_DISCARD to a driver flagMarek Olšák2013-04-245-8/+12
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa,i965: use NewDriverState to communicate TFB state changes with the driverMarek Olšák2013-04-246-14/+22
| | | | | | | | | | | | | | | | | | | | | | | _NEW_TRANSFORM_FEEDBACK is not used by core Mesa, so it can be removed. Instead, an new private flag is added to i965 to serve the same purpose. If you're new to this: * When creating a context. you can set private dirty flags in gl_context::DriverFlags, eg.: ctx->DriverFlags.NewStateX = BRW_NEW_STATE_X; * When StateX is changed, core Mesa does: ctx->NewDriverState |= ctx->DriverFlags.NewStateX; * When you have to draw, read and clear ctx->NewDriverState. * Pros: not touching NewState, the driver decides the mapping between GL states and hw state groups, unlimited number of flags in core Mesa (still limited number of flags in the driver though) Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Don't save value returned by emit() if it's not used.Matt Turner2013-04-221-11/+11
| | | | | | Probably a copy-n-paste mistake. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix a mistake in the comments for software counters.Kenneth Graunke2013-04-221-2/+2
| | | | | | | The code doesn't set brw->query.obj to NULL, it sets query->bo to NULL. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Apply CMP NULL {Switch} work-around to other Gen7s.Matt Turner2013-04-221-1/+4
| | | | | | | Listed in the restrictions section of CMP, but not on the work-arounds page. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Introduce a globally-available minify() macro.Eric Anholt2013-04-216-36/+21
| | | | | | This matches u_minify()'s behavior, for consistency. Reviewed-by: Brian Paul <[email protected]>
* mesa: Generalize TexStorage allocator between swrast and intel.Eric Anholt2013-04-212-27/+2
| | | | | | | | | | This should be reusable for other non-gallium drivers, so we can make the extension always be available. v2: Add a more detailed comment than the old function had (recommended by Brian). Reviewed-by: Brian Paul <[email protected]> (v1)
* mesa: Add performance debug for meta code.Eric Anholt2013-04-211-3/+25
| | | | | | | | I noticed a fallback in regnum through sysprof, and wanted a nicer way to get information about it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Mention how much data we're trying to subdata in perf debug.Eric Anholt2013-04-211-2/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use quotes on bool driconf options to prevent stdbool.h breakage.Eric Anholt2013-04-194-37/+44
| | | | | | | | | | | | | Since stdbool.h's "true" and "false" are #defines, they got expanded when used as macro arguments, and that expanded value was stored in the XML string, producing XML that driconf would then fail to parse. Currently no drivers included stdbool along with driconf, but I keep accidentally doing so on intel as we move towards using normal C. v2: rebase on master. Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* Revert "i965: Check reg.nr for BRW_ARF_NULL instead of reg.file."Matt Turner2013-04-181-1/+1
| | | | | | | | | This reverts commit ecdda414d361ab4430fd5747c9217687c1f3d63f. Commit was supposed to be a simple typo fix. Clearly needs more investigating. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63688
* i965: Check reg.nr for BRW_ARF_NULL instead of reg.file.Matt Turner2013-04-171-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Implement work-around for CMP with null dest on Haswell.Matt Turner2013-04-171-0/+12
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Fix hypothetical use of uninitialized data in attribute_map[].Paul Berry2013-04-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue identified by Klocwork analysis: 'attribute_map' array elements might be used uninitialized in this function (vec4_visitor::lower_attributes_to_hw_regs). The attribute_map array contains the mapping from shader input attributes to the hardware registers they are stored in. vec4_vs_visitor::setup_attributes() only populates elements of this array which, according to core Mesa, are actually used by the shader. Therefore, when vec4_visitor::lower_attributes_to_hw_regs() accesses the array to lower a register access in the shader, it should in principle only access elements of attribute_map that contain valid data. However, if a bug ever caused the driver back-end to access an input that was not flagged as used by core Mesa, then lower_attributes_to_hw_regs() would access uninitialized memory, which could cause illegal instructions to get generated, resulting in a possible GPU hang. This patch makes the situation more robust by using memset() to pre-initialize the attribute_map array to zero, so that if such a bug ever occurred, lower_attributes_to_hw_regs() would generate a (mostly) harmless access to r0. In addition, it adds assertions to lower_attributes_to_hw_regs() so that if we do have such a bug, we're likely to discover it quickly. Reviewed-by: Jordan Justen <[email protected]>
* mesa: remove #include "mfeatures.h" from numerous source filesBrian Paul2013-04-1714-14/+0
| | | | | | None of the remaining FEATURE_x symbols in mfeatures.h are used anymore. Reviewed-by: Jordan Justen <[email protected]>
* intel: Don't dereference a NULL pointer of calloc failsIan Romanick2013-04-171-0/+4
| | | | | | | | | | The caller of NewTextureObject does the right thing if NULL is returned, so this function should do the right thing too. NOTE: This is a candidate for stable branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Trim trailing whitespace in brw_defines.h.Eric Anholt2013-04-171-144/+144
| | | | | | It was all over the formats section I wanted to edit. Reviewed-by: Kenneth Graunke <[email protected]>
* r200: fix build failure introduced with cbbcb0247e6aa8d7adc274a94206ee02f9c70beaLaurent Carlier2013-04-171-1/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: remove gl_context::_TriangleCapsBrian Paul2013-04-171-3/+4
| | | | | | No longer used anywhere. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove DD_TRI_LIGHT_TWOSIDE flagBrian Paul2013-04-173-7/+16
| | | | | | v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove DD_TRI_UNFILLED flagBrian Paul2013-04-175-11/+31
| | | | | | | Use alternate code in intel, r200, radeon drivers. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove DD_TRI_STIPPLE flagBrian Paul2013-04-171-0/+2
| | | | | | | Make it a local macro for the i915 driver. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove DD_TRI_OFFSET flagBrian Paul2013-04-171-0/+4
| | | | | | | Make it a local macro for the i915 driver. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove DD_POINT_ATTEN flagBrian Paul2013-04-171-1/+3
| | | | | | | For the i915 driver, make it a local macro. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove DD_POINT_SMOOTH flagBrian Paul2013-04-172-2/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove DD_LINE_STIPPLE flagBrian Paul2013-04-171-1/+3
| | | | | | | For the i915 driver, make it a local macro. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove DD_SEPARATE_SPECULAR flagBrian Paul2013-04-173-3/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* intel: Add a null pointer check before dereferencing the pointerAnuj Phogat2013-04-171-0/+9
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Enable the Bay Trail platform.Kenneth Graunke2013-04-163-0/+24
| | | | | | | | This patch adds PCI IDs for Bay Trail (sometimes called Valley View). As far as the 3D driver is concerned, it's very similar to Ivybridge, so the existing code should work just fine. Signed-off-by: Kenneth Graunke <[email protected]>
* build: Get rid of DRIVER_DIRSMatt Turner2013-04-151-22/+0
| | | | | | Tested-by: Emil Velikov <[email protected]> Reviewed-and-Tested-by: Andreas Boll <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Shut up the last release build warning.Eric Anholt2013-04-121-0/+1
| | | | | | | I don't see a sensible value to use in this path, but we shouldn't ever hit this outside of developer new-texture-target enabling. Reviewed-by: Matt Turner <[email protected]>
* i965: Silence one more compile warning.Eric Anholt2013-04-121-0/+1
| | | | | | | | We don't want to store this thing in the class, and we do need the definition to be at the top of the function and held onto until the end here, so there's not much to do besides (void) reference it. Reviewed-by: Matt Turner <[email protected]>
* i965: Fix a warning in the release build.Eric Anholt2013-04-121-2/+1
| | | | | | | This was copy and pasted from can_reswizzle_dst(), and we can just fold it in instead to avoid the warning. Reviewed-by: Matt Turner <[email protected]>
* i965: Fix an unused variable warning in the release build.Eric Anholt2013-04-121-4/+2
| | | | | | | I think this actually clarifies what's going on in the asserts a bit, given how many regions we've got floating around. Reviewed-by: Matt Turner <[email protected]>
* i965: Fix an unused variable warning in the release build.Eric Anholt2013-04-121-1/+0
| | | | | | It's used in an assert, but we have this as a member of the class anyway. Reviewed-by: Matt Turner <[email protected]>
* intel: Return failure properly in the texsubimage blit path.Eric Anholt2013-04-121-1/+1
| | | | | | | | We assert that failure doesn't happen, but it fixes a warning in the release build and it would at least give working behavior for a user by falling back to the normal texsubimage path. Reviewed-by: Matt Turner <[email protected]>
* intel: Fix a warning in the release build.Eric Anholt2013-04-121-2/+1
| | | | | | | This was silly -- checking that we didn't overflow the array by dividing the array size by 2 and then multiplying it back up by 2. Reviewed-by: Matt Turner <[email protected]>
* intel: Fix an unused variable warning in the release build.Eric Anholt2013-04-121-2/+2
| | | | Reviewed-by: Matt Turner <[email protected]>
* intel: Improve diagnostics for emit_linear_blit failure path.Eric Anholt2013-04-121-2/+5
| | | | | | | This fixes unused variable warnings in the release build, and should be more useful if it ever triggers. Reviewed-by: Matt Turner <[email protected]>
* i965: Fix error path for MCS allocation.Eric Anholt2013-04-121-1/+1
| | | | | | | | Asserts don't stop execution in release builds, so we would continue on to use an uninitialized format value. Just take the failure path, which appears to continue up the call stack for a while. Reviewed-by: Matt Turner <[email protected]>
* i830: Move assert-only code into the assert.Eric Anholt2013-04-121-4/+1
| | | | | | | The call has no side effects, and moving it into the assert cleans up a compile warning in the release build. Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Fix some untriggered optimization bugs with uncompressed/sechalf.Eric Anholt2013-04-121-4/+4
| | | | | | | | | We have this support for firsthalf/sechalf instructions, which would be called in the !has_compr4 (aka original gen4) 16-wide case. We currently only support 16-wide for gen5+, so we weren't tripping over this, but it would have been a problem if we ever try to enable it. Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Add basic-block-level dead code elimination.Eric Anholt2013-04-122-0/+161
| | | | | | | | | | | | | | | | | This is a poor substitute for proper global dead code elimination that could replace both our current paths, but it was very easy to write. It particularly helps with Valve's shaders that are translated out of DX assembly, which has been register allocated and thus have a bunch of unrelated uses of the same variable (some of which get copy-propagated from and then left for dead). shader-db results: total instructions in shared programs: 1735753 -> 1731698 (-0.23%) instructions in affected programs: 492620 -> 488565 (-0.82%) v2: Fix comment typo Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Remove incorrect note of writing attr in centroid workaround.Eric Anholt2013-04-121-1/+1
| | | | | | | | This instruction doesn't update its IR destination, it just moves from payload to f0. This caused the dead code elimination pass I'm adding to dead-code-eliminate the first step of interpolation. Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Add a helper function for checking for partial register updates.Eric Anholt2013-04-125-22/+24
| | | | | | | | These checks were all over, and every time I wrote one I had to try to decide again what the cases were for partial updates. v2: Fix inadvertent reladdr check removal. Reviewed-by: Matt Turner <[email protected]>