aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
...
* 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]>
* glsl: Let ir_builder expressions take un-dereferenced variables.Eric Anholt2012-04-131-13/+6
| | | | | | | | | | | Having to explicitly dereference is irritating and bloats the code, when the compiler can detect and do the right thing. v2: Use a little shim class to produce the automatic dereference generation at compile time as opposed to runtime, while also allowing compile-time type checking. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Create an ir_builder helper for hand-generating IR.Eric Anholt2012-04-131-82/+46
| | | | | | | | | | | | | | The C++ constructors with placement new, while functional, are extremely verbose, leading to generation of simple GLSL IR expressions like (a * b + c * d) expanding to many lines of code and using lots of temporary variables. By creating a new ir_builder.h that puts simple generators in our namespace and taking advantage of ralloc_parent(), we can generate much more compact code, at a minor runtime cost. v2: Replace ir_instruction usage with just ir_rvalue. v3: Drop remaining missed as_rvalue() in v2. Reviewed-by: Kenneth Graunke <[email protected]>
* nouveau: rework and simplify nv04/nv05 driver a bitBen Skeggs2012-04-148-300/+215
| | | | | | | | | | | | | | | TEXTURED_TRIANGLE and MULTITEX_TRIANGLE are both a bit special in that if you use any other graph object in the meantime they'll forget their state and spew a lovely METHOD_CNT error at you when you try to draw. The pre-newlib driver has a flush_notify() hook which does this state re-emit, and a number of random workarounds like extra flushes and state dirtying after various operations to solve this issue. I'm taking a slightly different approach to things instead, which has the nice side-effect of removing the divergent code-paths for ttri/mtri, the flush/dirty workarounds and the need for flush_notify. Also gives a few FPS boost in OA, yay.
* nouveau/vieux: switch to libdrm_nouveau-2.0Ben Skeggs2012-04-1446-1890/+1844
|
* st/mesa: add ARB_blend_func_extended support to state tracker.Dave Airlie2012-04-133-5/+12
| | | | | | | | This adds the blend mode mapping, it also uses the var->index in the glsl to tgsi convertor - this is the other half of my using 4 in the GLSL compiler. Signed-off-by: Dave Airlie <[email protected]>
* mesa: add support for ARB_blend_func_extended (v4)Dave Airlie2012-04-138-6/+149
| | | | | | | | | | | | | | | | | | | | Add implementations of the two API functions, Add a new strings to uint mapping for index bindings Add the blending mode validation for SRC1 + SRC_ALPHA_SATURATE Add get for MAX_DUAL_SOURCE_DRAW_BUFFERS v2: Add check in valid_to_render to address case in spec ERRORS. v3: Add index to ir.h so this patch compiles on its own fixup comment v4: fixup Brian's comments The GLSL patch will setup the indices. Signed-off-by: Dave Airlie <[email protected]>
* i965: fix typoDylan Noblesmith2012-04-131-1/+1
| | | | | | | | | | | | | | | | | | Noticed by clang: brw_wm_surface_state.c:330:30: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] [MESA_FORMAT_Z24_S8] = 0, ^ brw_wm_surface_state.c:326:30: note: previous initialization is here [MESA_FORMAT_Z24_S8] = 0, ^ No functionality change, since the array is declared static so it was zero-initialized by default. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: fix truncated value warningDylan Noblesmith2012-04-131-1/+1
| | | | | | | | | | | | Silences a clang warning: format_pack.c:2546:30: warning: implicit conversion from 'int' to 'GLubyte' (aka 'unsigned char') changes value from 65535 to 255 [-Wconstant-conversion] d[i] = d[i] ? 0xffff : 0x0; ~ ^~~~~~ Reviewed-by: Brian Paul <[email protected]>
* mesa: don't cast away constDylan Noblesmith2012-04-131-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* ir_to_mesa: Fix uninitialized member in add_uniform_to_shader.Vinson Lee2012-04-121-1/+1
| | | | | | | | | Fix uninitialized scalar field defect reported by Coverity. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: When the kernel lacks the LLC check, assume it's present on gen >= 6.Eric Anholt2012-04-111-3/+7
| | | | | The param wasn't added until drm-intel-next for 3.4, so we were missing our various LLC fast-paths.
* intel: Drop backwards compat code for not having libdrm with the LLC check.Eric Anholt2012-04-111-4/+0
|
* i965/fs: Avoid generating extra AND instructions on bool logic ops.Eric Anholt2012-04-111-22/+14
| | | | | | | | | | | | | | | | | | | | | | | By making a bool fs_reg only have a defined low bit (matching CMP output), instead of being a full 0 or 1 value, we reduce the ANDs generated in logic chains like: if (v_texcoord.x < 0.0 || v_texcoord.x > texwidth || v_texcoord.y < 0.0 || v_texcoord.y > 1.0) discard; My concern originally when writing this code was that we would end up generating unnecessary ANDs on bool uniforms, so I put the ANDs right at the point of doing the CMPs that otherwise set only the low bit. However, in order to use a bool, we're generating some instruction anyway (e.g. moving it so as to produce a condition code update), and those instructions can often be turned into an AND at that point. It turns out in the shaders I have on hand, none of them regress in instruction count: Total instructions: 262649 -> 262545 39/2148 programs affected (1.8%) 14253 -> 14149 instructions in affected programs (0.7% reduction)
* i965/fs: Try to avoid generating extra MOVs to do saturates.Eric Anholt2012-04-113-12/+54
| | | | | | | | | | | | This change (before the previous two) produced a .23% +/- .11% performance improvement in Unigine Tropics at 1024x768 on IVB. Total instructions: 269270 -> 262649 614/2148 programs affected (28.6%) 179386 -> 172765 instructions in affected programs (3.7% reduction) v2: Move some of the logic of finding the instruction that produced the result of an expression tree to a helper.
* mesa: add _mesa_total_texture_memory() debug functionBrian Paul2012-04-112-0/+62
| | | | | This function can be called in gdb to find out how much memory is used by all texture objects.
* mesa: new _mesa_total_buffer_object_memory() debug functionBrian Paul2012-04-112-0/+32
| | | | | This function can be called in gdb to find out how much memory is used by buffer objects.