summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Add UsesDFdy to struct gl_fragment_program.Paul Berry2012-07-192-0/+3
| | | | | | | | | | | | The i965 back-end needs to compile dFdy() differently for FBOs and window system framebuffers, because Y coordinates are flipped between the two (see commit 82d2596: i965: Compute dFdy() correctly for FBOs). This boolean will allow it to avoid unnecessarily recompiling shaders that don't use dFdy(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* drirc: Add disable_blend_func_extended workaround for Unigine OilRush.Kenneth Graunke2012-07-191-0/+6
| | | | | | | | | | The previous commit implemented the workaround, cited a bug report about OilRush, but actually only enabled the workaround for the demos. Turn it on for OilRush too. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50291 Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Add a driconf option to disable GL_ARB_blend_func_extended.Kenneth Graunke2012-07-194-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unigine Heaven (at least) has a bug where it incorrectly uses the GL_ARB_blend_func_extended extension. Dual source blending allows two color outputs per render target; individual shader outputs can be assigned to be either the first or second blending input by setting the 'index' via one of two methods: - An API call: glBindFragDataLocationIndexed() - The GLSL 'layout' qualifier provided by GL_ARB_explicit_attrib_location Both of these only work on user defined fragment shader outputs; it's an error to use either on built-in outputs like gl_FragData. Unigine uses gl_FragData and gl_FragColor exclusively, and doesn't even attempt to use either method to set index == 1. However, it does set the blending function to SRC1 enums, which requires a fragment shader output with index == 1 or else rendering is undefined. In other words, enabling ARB_blend_func_extended causes Unigine to render incorrectly, resulting in an apparent regression, even though our driver code (as far as I can tell) is perfectly fine. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50291 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove stale commentBrian Paul2012-07-181-1/+0
|
* mesa: use gl_program cast wrappersBrian Paul2012-07-186-49/+37
| | | | | | | In a few cases, remove unneeded casts. And fix a few other const-correctness issues. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add some gl_program cast wrappersBrian Paul2012-07-181-0/+42
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* r600g: setup streamout before calling last r600_need_cs_space before drawingMarek Olšák2012-07-181-6/+6
| | | | | This fixes CS checker errors due to registers not being initialized, because the flush occured after dirty state was emitted but before drawing.
* i965/fs: Make register spill/unspill only do the regs for that instruction.Eric Anholt2012-07-181-33/+33
| | | | | | | | | | | | | | | | | | Previously, if we were spilling the result of a texture call, we would store all 4 regs, then for each use of one of those regs as the source of an instruction, we would unspill all 4 regs even though only one was needed. In both lightsmark and l4d2 with my current graphics config, the shaders that produce spilling do so on split GRFs, so this doesn't help them out. However, in a capture of the l4d2 shaders with a different snapshot and playing the game instead of using a demo, it reduced one shader from 2817 instructions to 2179, due to choosing a now-cheaper texture result to spill instead of piles of texcoords. v2: Fix comment noted by Ken, and fix the if condition associated with it for the current state of what constitutes a partial write of the destination. Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* i965/fs.h: Refactor tests for instructions modifying a register.Eric Anholt2012-07-184-34/+16
| | | | | | | | | | There's one instance of a potential behavior change: propagate_constants may now propagate into a part of a vgrf after a different part of it was overwritten by a send that returns multiple registers. I don't think we ever generate IR that meets that condition, but it's something to note if we bisect behavior change to this. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Replace usage is_tex() with regs_written() checks.Eric Anholt2012-07-181-9/+9
| | | | | | | | | | In these places, we care about any sort of send that hits more than one reg, not just textures. We don't yet have anything else returning more than one reg, so there's no change. v2: Use mlen instead of is_tex() for the is-it-a-send check. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Rename virtual_grf_next to virtual_grf_count.Eric Anholt2012-07-186-22/+21
| | | | | | | "count" is a more useful name, since most of the time we're using it for looping over the variables. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Move a block out of a loop in live variables setup.Eric Anholt2012-07-181-4/+5
| | | | | | This was accidentally copy-and-pasted inside. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/msaa: Disable alpha-to-{coverage, one} when drawbuffer zero is in ↵Anuj Phogat2012-07-181-7/+21
| | | | | | | | | | | | | | | | | | | integer format OpenGL specification 3.3 (page 196), section 4.1.3 says: If drawbuffer zero is not NONE and the buffer it references has an integer format, the SAMPLE_ALPHA_TO_COVERAGE and SAMPLE_ALPHA_TO_ONE operations are skipped." This should work properly even if there are other draw buffers that are not in integer format. This patch makes following piglit tests pass on mesa: int-draw-buffers-alpha-to-coverage int-draw-buffers-alpha-to-one Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Anuj Phogat <[email protected]>
* st/xorg: attach EDID to outputsLucas Stach2012-07-181-1/+36
| | | | | | | | Allows tools like GNOME's monitor configuration to show meaningful names. v2: fix resource leak Signed-off-by: Lucas Stach <[email protected]>
* st/xorg: remove superfluous memsetLucas Stach2012-07-181-2/+0
| | | | | | exaDriverAlloc() uses calloc, which already initialises pExa to zero. Signed-off-by: Lucas Stach <[email protected]>
* st/xorg: reorder exa context creation and use screen param queriesLucas Stach2012-07-181-7/+8
| | | | | | | | | Gives the x-server a more accurate description of the exa hardware capabilities. v2: drop NPOT check Signed-off-by: Lucas Stach <[email protected]>
* softpipe: Take all lods into account when texture sampling.Olivier Galibert2012-07-182-766/+645
| | | | | | | | | | | | This patch churns a lot because it needs to change 4-wide filters into single pixel filters, since each fragment may use a different filter. The only case not entirely supported is the anisotropic filtering. Not sure what we want to do there, since a full quad is required by that filter. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r600g: implement wait-free buffer transfer for DISCARD_RANGEMarek Olšák2012-07-184-16/+50
| | | | | Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* r600g: accelerate buffer copyingMarek Olšák2012-07-181-23/+47
| | | | | | | This will be useful for efficient handling of the DISCARD transfer flags. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* r600g: update R600_MAX_DRAW_CS_DWORDS to take draw-opaque into accountMarek Olšák2012-07-182-4/+2
|
* r600g: move VGT_STRMOUT_DRAW_OPAQUE_OFFSET initialization into invariant stateMarek Olšák2012-07-183-1/+3
|
* r600g: only set the index type if drawing is indexedMarek Olšák2012-07-181-4/+5
|
* r600g: remove debug code for streamoutMarek Olšák2012-07-181-11/+0
|
* r600g: inline r600_context_draw_opaque_countMarek Olšák2012-07-183-32/+21
|
* r600g: fix alphatest without a colorbuffer on evergreenMarek Olšák2012-07-181-1/+4
|
* r600g: fix alphatest without a colorbuffer on r6xx-r7xxMarek Olšák2012-07-181-6/+10
|
* r600g: always derive alphatest state from the first colorbufferMarek Olšák2012-07-184-14/+22
|
* r600g: atomize alphatest stateMarek Olšák2012-07-186-46/+52
|
* r600g: try to fix line stippling with lineloopsMarek Olšák2012-07-181-1/+2
| | | | The piglit test is failing, but visually it looks almost correct.
* r600g: optimize uploading depth texturesMarek Olšák2012-07-181-11/+5
| | | | | | | Make it only copy the portion of a depth texture being uploaded and not the whole 2D layer. There is also a little code cleanup.
* r600g: remove needless wrapper r600_texture_depth_flushMarek Olšák2012-07-183-35/+15
|
* r600g: init_flushed_depth_texture should be able to report errorsMarek Olšák2012-07-184-18/+11
|
* msaa: Generate proper error for operations prohibited on MSAA buffers.Paul Berry2012-07-172-3/+3
| | | | | | | | | | | | | | | | | | | | | From the GL 3.0 spec, section 4.3.3, in the documentation for CopyPixels(): "An INVALID_OPERATION error will be generated if the object bound to READ_FRAMEBUFFER_BINDING is framebuffer complete and the value of SAMPLE_BUFFERS is greater than zero." The same applies to CopyTexImage...() and CopyTexSubImage...() functions, since they are defined in terms of CopyPixels(). Previously we were generating an INVALID_FRAMEBUFFER_OPERATION error in these cases. Fixes piglit tests "EXT_framebuffer_multisample/negative-{copypixels,copyteximage}". Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallivm: silence uninitialized variable warningsBrian Paul2012-07-173-3/+6
|
* r600g: fix lockups with and enable dual source blending on evergreenMarek Olšák2012-07-172-4/+4
| | | | GL_ARB_blend_func_extended is now enabled on all chipsets.
* r600g: remove unused code after conversion of sampler viewsMarek Olšák2012-07-177-249/+5
|
* r600g: convert sampler view emission into atomsMarek Olšák2012-07-176-134/+238
| | | | | Vertex and constant buffers are emitted in the same way. This is mainly a simplification of the code. The cleanup is in another patch.
* r600g: only make constant buffers dirty if there's something to updateMarek Olšák2012-07-171-4/+6
|
* r600g: properly track which textures are depthMarek Olšák2012-07-173-19/+26
| | | | This fixes the issue with have_depth_texture never being set to false.
* r600g: consolidate and optimize sampler states changes for evergreenMarek Olšák2012-07-171-14/+22
| | | | Only set sampler states which changed.
* r600g: don't invalidate texture caches when setting sampler statesMarek Olšák2012-07-171-6/+0
| | | | Changing sampler states doesn't change resource bindings.
* r600g: consolidate code for setting sampler views and fix bugs in the processMarek Olšák2012-07-174-90/+62
| | | | | | | | | | | | | | | Issues fixed: - set_vs_sampler_views for evergreen is now properly implemented. - Added the missing inval_texture_cache call for evergreen. - have_depth_texture was sometimes incorrectly set to false on evergreen even if there were depth textures in other shader stages. To fix this, set it to true once and never set it to false again. It's stupid, but it matches the r600 code. The proper fix is left to another patch. - Optimizaton: The sampler views which aren't changed aren't updated.
* r600g: remove unused flag have_depth_fbMarek Olšák2012-07-174-10/+3
| | | | | | | | | | This is a leftover from: commit fe1fd675565231b49d3ac53d0b4bec39d8bc6781 Author: Marek Olšák <[email protected]> Date: Sun Jul 8 03:10:37 2012 +0200 r600g: don't flush depth textures set as colorbuffers
* r600g: do fine-grained vertex buffer updatesMarek Olšák2012-07-178-63/+87
| | | | | | If only some buffers are changed, the other ones don't have to re-emitted. This uses bitmasks of enabled and dirty buffers just like emit_constant_buffers does.
* r600g: don't call inval_shader_cache in r600_context_flush twiceMarek Olšák2012-07-171-1/+0
| | | | It's already called in r600_constant_buffers_dirty.
* gallium/util: add util_bit_last - finds the last bit set in a wordMarek Olšák2012-07-171-0/+14
|
* r600g: fix all failing depth-stencil tests for evergreenMarek Olšák2012-07-173-10/+22
|
* configure.ac: Further LLVM fixups.Michel Dänzer2012-07-171-3/+3
| | | | | | | | * Also add mcjit in the non-OpenCL case. * Replace hardcoded llvm-config with $LLVM_CONFIG everywhere. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellad <[email protected]>
* glsl: Drop obsolete .gitignore entries.Michel Dänzer2012-07-171-2/+0
| | | | | | | | Helps spotting and removing the obsolete generated files, which otherwise break the build. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* configure.ac: Add libLLVMMCJIT to the LLVM_LDFLAGSTom Stellard2012-07-171-1/+1
| | | | | | | This is neccessary for linking the llvmpipe tests. It appears this dependency was introduced by the "wider native register" changes. Reviewed-by: Jose Fonseca <[email protected]>