summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: require GL_MAX_SAMPLES >= 4 for GL 3.0Dylan Noblesmith2012-04-291-0/+1
| | | | | | | | | As noted in commit be4e46b21a60cfdc826bf89d1078df54966115b1, this was missing before. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Kenneth Graunke <[email protected]>
* autoconf: pass -Wall to automakeDylan Noblesmith2012-04-292-6/+6
| | | | | | | And fix these warning that appear at autoreconf time: "`:='-style assignments are not portable" v2: Fix the recently-converted-to-automake r600.
* i965/fs: Fix FB writes that tried to use the non-existent m16 register.Kenneth Graunke2012-04-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A little analysis shows that the worst-case value for "nr" is 17: - base_mrf = 2 ... 2 - header present (say gen == 5) ... 4 - aa_dest_stencil_reg (stencil test) ... 5 - SIMD16 mode: += 4 * reg_width ... 13 - source_depth_to_render_target ... 15 - dest_depth_reg ... 17 This resulted in us setting base_mrf to 2 and mlen to 15. In other words, we'd try to use m2..m16. But m16 doesn't exist pre-Gen6. Also, the instruction scheduler data structures use arrays of size 16, so this would cause us to access them out of bounds. While the debugger system routine may need m0 and m1, we don't use it today, so the simplest solution is just to move base_mrf back to 1. That way, our worst case message fits in m1..m15, which is legal. An alternative would be to fail on SIMD16 in this case, but that seems a bit unfortunate if there's no real need to reserve m0 and m1. Fixes new piglit test shaders/depth-test-and-write on Ironlake. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48218 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/st: Fix derreference after free.José Fonseca2012-04-251-2/+6
|
* i965/vs: Fix texelFetchOffset()Eric Anholt2012-04-241-3/+23
| | | | | | It appears that when using 'ld' with the offset bits, address bounds checking happens before the offset is applied, so parts of the drawing in piglit texelFetchOffset() with a negative texcoord go black.
* i965/fs: Fix texelFetchOffset()Eric Anholt2012-04-241-6/+21
| | | | | | It appears that when using 'ld' with the offset bits, address bounds checking happens before the offset is applied, so parts of the drawing in piglit texelFetchOffset() with a negative texcoord go black.
* u_vbuf: take advantage of all new vertex fetch capsMarek Olšák2012-04-241-1/+3
|
* st/mesa: always expose ARB_ES2_compatibilityMarek Olšák2012-04-241-3/+1
| | | | u_vbuf translates GL_FIXED too if needed.
* st/mesa: always expose ARB_half_float_vertexMarek Olšák2012-04-241-3/+1
| | | | u_vbuf kicks in and translates it to float if it's unsupported.
* gallium: make user vertex buffers optionalMarek Olšák2012-04-242-0/+29
| | | | | | | | | | | This couldn't be split because it would break bisecting. Summary: * r300g,r600g: stop using u_vbuf * r300g,r600g: also report that the FIXED vertex type is unsupported * u_vbuf: refactor for use in the state tracker * cso: wire up u_vbuf with cso_context * st/mesa: conditionally install u_vbuf
* st/mesa: use cso_set_index_buffer and cso_draw_vboMarek Olšák2012-04-241-7/+9
| | | | Reviewed-by: Brian Paul <[email protected]>
* vbo: call UpdateState directly when notifying a driver about _NEW_ARRAYMarek Olšák2012-04-234-14/+5
| | | | | | | | Core Mesa doesn't need to know about this. This also removes the hack in recalculate_input_bindings. Reviewed-by: Brian Paul <[email protected]>
* vbo: do FLUSH_CURRENT before validating and updating stateMarek Olšák2012-04-231-10/+16
| | | | | | | | | | This fixes an assertion failure since: commit 81afdd20f3f574ce29559d8ad77df5c77652009e vbo: don't check twice whether it's valid to render FLUSH_CURRENT may set _NEW_CURRENT_ATTRIB. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: no-op glCopyPixels if source region is out of boundsBrian Paul2012-04-231-1/+9
| | | | | | | | | If the source region for a glCopyPixels is completely outside the source buffer bounds, no-op the copy. Fixes a failed assertion. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: move gl_array_attrib::NewState to gl_array_object::NewArraysBrian Paul2012-04-206-18/+10
| | | | | | | | The field wasn't actually used before and it's not used now either. But this is a more logical place for it and will hopefully allow doing smarter draw/array validation (per array object) in the future. Reviewed-by: Mathias Fröhlich <[email protected]>
* i965: Convert live interval computation to using live variable analysis.Eric Anholt2012-04-191-39/+26
| | | | | | | | | | | | | | | | | | | | Our previous live interval analysis just said that anything in a loop was live for the whole loop. If you had to spill a reg in a loop, then we would consider the unspilled value live across the loop too, so you never made progress by spilling. Eventually it would consider everything in the loop unspillable and fail out. With the new analysis, things completely deffed and used inside the loop won't be marked live across the loop, so even if you spill/unspill something that used to be live across the loop, you reduce register pressure. But you usually don't even have to spill any more, since our intervals are smaller than before. This fixes assertion failure trying to compile the shader for the "glyphy" text rasterier and piglit glsl-fs-unroll-explosion. Improves Unigine Tropics performance 1.3% +/- 0.2% (n=5), by allowing more shaders to be compiled in 16-wide mode.
* i965: Move the old live interval analysis code next to the new live vars code.Eric Anholt2012-04-192-122/+122
| | | | I'm about to replace the insides of this using the new analysis.
* i965: Add support for live variable analysis using dataflow analysis.Eric Anholt2012-04-193-0/+245
|
* i965: Add basic block generator.Eric Anholt2012-04-195-0/+392
| | | | | | This takes the fs_inst list generated by the visitor, and generates a list of basic blocks with edges between them. This is a building block for data-flow analysis.
* i965/fs: Suppress printing the whole loop in BRW_OPCODE_DO annotation.Eric Anholt2012-04-191-0/+2
|
* Revert "mesa: only update _MaxElement when we actually need it"Marek Olšák2012-04-191-3/+1
| | | | | | | This reverts commit 0de5a21470b3bff9b7c8714e5d960d5ed9d01b9c. I was wrong, we use it in the vbo module too. This fixes a performance regression in Nexuiz.
* mesa: move unrefs of array objects earlier in _mesa_free_context_data()Brian Paul2012-04-191-3/+3
| | | | | | | | | | If a non-default array object was bound at context destruction time we'd try to unreference the array object after it was already deleted in _mesa_free_varray_data(). Now do the unref first. Fixes a regression from commit 86f53e6d6bd07e2bc3ffcadeb9a4418fbae06e0b. Reviewed-by: José Fonseca <[email protected]>
* vbo: remove vbo_context::mat_currvalMarek Olšák2012-04-195-12/+8
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: remove vbo_context::generic_currvalMarek Olšák2012-04-197-12/+16
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: remove vbo_context::legacy_currvalMarek Olšák2012-04-197-16/+14
| | | | | | | | | | | | It's not nice when you have several variables pointing to the same array and you wanna ask your editor "where is this used" and you only get an answer for one of the four currval, legacy_currval, generic_currval, mat_currval, which is quite useless, because you never see the whole picture. Let's get rid of the additional pointers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: remove unused variables in vbo_contextMarek Olšák2012-04-191-4/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: don't check twice whether it's valid to renderMarek Olšák2012-04-191-20/+0
| | | | | | | | It's already done in _mesa_validate_Draw* and it's not needed to do it again unless I am missing something. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: set _NEW_VARYING_VP_INPUTS flag only if fixed-func VP is enabled & validMarek Olšák2012-04-191-1/+10
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: add _NEW_VARYING_VP_INPUTS for gl_context::varying_vp_inputsMarek Olšák2012-04-195-9/+11
| | | | | | | | | This is a frequently-updated state and _NEW_ARRAY already causes revalidation of the vbo module. It's kinda counter-productive to recompute arrays in the vbo module if _NEW_ARRAY is set and then set _NEW_ARRAY again. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa,vbo: properly detect when vertex arrays need to be recalculatedMarek Olšák2012-04-196-45/+25
| | | | | | | | | | | | | | | | | | | This moves the RebindArrays flag into the vbo module, consolidates the code, and adds missing vbo_draw_method calls. Also with this change, the vertex arrays are not needlessly recalculated twice. The issue with the old code was: - If recalculate_input_bindings updates vp_varying_inputs, _NEW_ARRAY is set. - _mesa_update_state is called and the vp_varying_inputs change causes regeneration of the fixed-function shaders, which also sets _NEW_PROGRAM. - The occurence of either _NEW_ARRAY or _NEW_PROGRAM sets the recalculate_inputs flag to TRUE again. - The new code sets the flag to FALSE after the second _mesa_update_state, because there can't possibly be any change which would require recalculating the arrays. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: only update _MaxElement when we actually need itMarek Olšák2012-04-191-1/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* st/mesa: use bitshifting to define state flagsMarek Olšák2012-04-191-6/+6
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* i965: Rename BRW_MAX_SURFACES to BRW_MAX_WM_SURFACES.Kenneth Graunke2012-04-182-4/+4
| | | | | | | | Now that we use separate binding tables for WM, VS, and GS, and have BRW_MAX_VS_SURFACES and BRW_MAX_GS_SURFACES macros, we really shouldn't have an unqualified BRW_MAX_SURFACES macro. It's confusing. Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Fix outdated comments about binding tables.Kenneth Graunke2012-04-181-12/+8
| | | | | | | | | They had a number of issues: - A paragraph states that we use a single binding table, but we don't. - We labelled the WM binding table diagram as SOL/WM. - The WM diagram had an "Only relevant to the WM" comment. Duh. Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Use array object constructor.Mathias Fröhlich2012-04-182-2/+3
| | | | | | | | This change uses the array object factory for gl_array_objects. This prevents crashes when deriving from gl_array_object. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* gallium/u_gen_mipmap: don't release vertex buffer at end of frame / in glFlushMarek Olšák2012-04-181-4/+0
| | | | | There's no reason to do that. The buffer being used for rendering is always mapped as unsynchronized.
* gallium/u_blit: don't release vertex buffer at end of frame / in glFlushMarek Olšák2012-04-181-1/+0
| | | | | There's no reason to do that. The buffer being used for rendering is always mapped as unsynchronized.
* st/mesa: write vertices directly into the buffer for glClear fallbackMarek Olšák2012-04-182-20/+21
|
* st/mesa: use u_upload_mgr to upload vertices for glClear fallbackMarek Olšák2012-04-184-66/+11
|
* st/mesa: write vertices directly into the buffer in glDrawPixelsMarek Olšák2012-04-181-17/+15
|
* st/mesa: use u_upload_mgr to upload vertices for glDrawPixelsMarek Olšák2012-04-181-8/+9
|
* st/mesa: use u_upload_mgr to upload vertices for glDrawTexOESMarek Olšák2012-04-181-13/+13
|
* st/mesa: write vertices directly into the buffer for glBitmapMarek Olšák2012-04-182-30/+32
|
* st/mesa: use u_upload_mgr to upload vertices for glBitmapMarek Olšák2012-04-183-59/+23
| | | | instead of recreating the vertex buffer for each draw_vbo call.
* mesa: add a couple fast-paths to fast_read_rgba_pixels_memcpy()Brian Paul2012-04-171-7/+55
| | | | | | | | | | | | Accelerates a few glReadPixels cases for WebGL. See https://bugs.freedesktop.org/show_bug.cgi?id=48545 v2: Per Jose, use bit twiddling for the swizzle case instead of ubyte arrays (it's about 44% faster). Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: Remove dead _mesa_sizeof_glsl_type().Eric Anholt2012-04-162-63/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add a helper for generating temporary variables in ir_builder.Eric Anholt2012-04-131-31/+11
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add a helper for ir_builder to make dereferences for assignments.Eric Anholt2012-04-131-49/+17
| | | | | | v2: Fix writemask setup for non-vec4 assignments. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Make a little tracking class for emitting IR lists.Eric Anholt2012-04-131-50/+28
| | | | | | | This lets us significantly shorten p->instructions->push_tail(ir), and will be used in a few more places. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add common swizzles to ir_builder.Eric Anholt2012-04-131-48/+18
| | | | | | | | | | Now we can fold a bunch of our expression setup in ff_fragment_shader into single-line, parseable commits. v2: Make it actually work. I wasn't setting num_components in the mask structure, and not setting up a mask structure is way easier. Reviewed-by: Kenneth Graunke <[email protected]>