summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* i965/fs: Statically allocate the reg_sets at context initialization.Eric Anholt2012-10-173-49/+61
| | | | | | | Now that we've replaced all the variable settings other than reg_width, it's easy to hang on to this (the expensive part of setting up the allocator). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Allocate registers in the unused parts of the gen7 MRF hack range.Eric Anholt2012-10-172-1/+63
| | | | | | This should also reduce register pressure on gen7+, like the previous commit. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Reduce the interference between payload regs and virtual GRFs.Eric Anholt2012-10-172-19/+152
| | | | | | | | | | | | | Improves performance of the Lightsmark penumbra shadows scene by 15.7% +/- 1.0% (n=15), by eliminating register spilling. (tested by smashing the list of scenes to have all other scenes have 0 duration -- includes additional rendering of scene description text that normally doesn't appear in that scene) v2: Allow allocation of all but g0/g1 of the payload. v3: Pull count_to_loop_end() out to a helper function. Reviewed-by: Kenneth Graunke <[email protected]> (v2, recommended v3)
* i965/fs: Expose the payload registers to the register allocator.Eric Anholt2012-10-171-7/+39
| | | | | | For now, nothing else can get allocated over them, but that will change. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Remove extra allocation for classes[].Eric Anholt2012-10-171-1/+1
| | | | | | | This was to slot in the magic aligned pairs class, but it got moved to a descriptive name later. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Make the register allocation class_sizes[] choice static.Eric Anholt2012-10-172-60/+42
| | | | | | | | Based on split_virtual_grfs(), we choose the same set every time, so set it in stone. This will help us avoid regenerating the somewhat expensive class/register set setup every compile. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Improve live interval calculation.Eric Anholt2012-10-174-96/+388
| | | | | | | | | | This is derived from the FS visitor code for the same, but tracks each channel separately (otherwise, some typical fill-a-channel-at-a-time patterns would produce excessive live intervals across loops and cause spilling). Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48375 (crash -> failure, can turn into pass by forcing unrolling still)
* i965/vs: Fix the mlen of scratch read/write messages.Eric Anholt2012-10-171-2/+2
| | | | | | | | These messages always have m0 = g0 and m1 = offset, and write has m2 = data. Avoids regression in opt_compute_to_mrf() with a change to scratch writes to set up the data as an MRF write in the IR. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make the cfg reusable from the VS.Eric Anholt2012-10-175-16/+16
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Share the predicate field between FS and VS.Eric Anholt2012-10-1713-33/+32
| | | | | | | Note that BRW_PREDICATE_NONE is 0 and BRW_PREDICATE_NORMAL is 1, so that's a lot like the true/false we had in the FS before. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Rename fs_cfg types to not mention fs.Eric Anholt2012-10-178-65/+65
| | | | | | | | fs_bblock_link -> bblock_link fs_bblock -> bblock_t (to avoid conflicting with all the fs_bblock *bblock) fs_cfg -> cfg_t (to avoid conflicting with all the fs_cfg *cfg) Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move brw_fs_cfg.* to brw_cfg.*.Eric Anholt2012-10-177-6/+6
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make the FS and VS share a few visitor/instruction fields.Eric Anholt2012-10-175-24/+30
| | | | | | This will let us reuse brw_fs_cfg.cpp from brw_vec4_*. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Trim the swizzle of the scratch write temporary.Eric Anholt2012-10-171-1/+16
| | | | | | | | | This fixes confusion by the upcoming live variable analysis which saw e.g. use of temp.w when only temp.xyz were initialized in the basic block, and concluded that temp.w must have come from outside of the block (even though it was never initialized anywhere). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Do the temporary allocation in emit_scratch_write().Eric Anholt2012-10-173-21/+12
| | | | | | Both callers were doing basically the same thing, just written differently. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Simplify emit_scratch_write() prototype.Eric Anholt2012-10-173-8/+6
| | | | | | | Both callers used (effectively) inst->dst as the argument, so just reference it. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Add a little bit of IR-level debug ability.Eric Anholt2012-10-174-5/+96
| | | | | | | This is super basic, but it let me visualize a problem I had with opt_compute_to_mrf(). Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: silence MSVC signed/unsigned comparison warningBrian Paul2012-10-171-1/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: silence MSVC double/unsigned assignment warningBrian Paul2012-10-171-1/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* wmesa: remove old, unused span codeBrian Paul2012-10-171-474/+0
|
* mesa/tests: Add ES1.1 dispatch table sanity testIan Romanick2012-10-161-0/+207
| | | | | | | | | This test actually depends on FEATURE_ES1 because _mesa_create_exec_table_es1 doesn't exist without it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa/tests: Compile ES2 test regardless of FEATURE_ES2 settingIan Romanick2012-10-161-4/+0
| | | | | | | | | The relevant ES2 code is always in Mesa. Always building the tests ensures that things aren't accidentally broken when people don't build with --enable-es2. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove FEATURE_ES1 tests in enable.c codeBrian Paul2012-10-161-6/+0
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove FEATURE_ES test in _mesa_get_compressed_formats()Brian Paul2012-10-161-2/+0
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove FEATURE_ES test in _mesa_is_compressed_format()Brian Paul2012-10-161-2/+0
| | | | | | The code already has a runtime ES1 test. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove FEATURE_GL test from updated_drawbuffers()Brian Paul2012-10-161-2/+0
| | | | | | There's already a runtime test for full OpenGL. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove #if _HAVE_FULL_GL checksBrian Paul2012-10-1618-133/+1
| | | | | | This is basically more of the "remove FEATURE_x" clean-up. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove ASSERT_NO_FEATURE macroBrian Paul2012-10-162-4/+1
| | | | | | Was only used in one place. Reviewed-by: Ian Romanick <[email protected]>
* i965: Fix rendering to small mipmaps of depth/stencil buffers using a temp mt.Eric Anholt2012-10-164-121/+172
| | | | | | | Fixes 51 piglit tests (fbo-clear-formats, and most of the remaining failures in depthstencil). Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Share the draw x/y offset masking code between main/blorp and all gens.Eric Anholt2012-10-166-108/+89
| | | | | | | | | | This code is twisty, and the comment before most of the blocks was actually giving me the opposite impression from its intention: We want to apply as much of our offset as possible through coarse tile-aligned adjustment, since we can do so independently per buffer, and apply the minimum we can through fine-grained drawing offset x/y, since it has to agree between all buffers. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make a helper function for the renderbuffer temporary mt workaround.Eric Anholt2012-10-163-22/+30
| | | | | | | We now have a case of wanting to do that on gen6+ as well, so make this logic usable elsewhere. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Warn on a couple of workarounds in blending.Eric Anholt2012-10-161-2/+15
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Add a macro for printing a debug warning once.Eric Anholt2012-10-161-0/+11
| | | | | | | | | | | | There are a number of places where some obscure piece of the code is not currently worth fixing, and we have some workaround behavior available. It's nicer for users to do some lame workaround than to just assert, but without asserts we never knew when the workaround was at fault. This should give us a nice compromise: Execute the workaround, but mention that the obscure workaround was hit. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix segfault when using INTEL_DEBUG=perf with non-GLSL.Kenneth Graunke2012-10-161-1/+1
| | | | | | | | | | | | | | | Now that ARB programs and fixed function are routed through the new backend, shader might be NULL. Don't do INTEL_DEBUG=perf support in that case, since it relies on shader->compiled_once. Since INTEL_DEBUG=perf wasn't previously supported, this maintains the status quo. It might be nice to support it someday, however. This could be moved to brw_shader_program instead of brw_shader, but it appears even prog can be NULL in that case. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Don't flatten IF statements by default.Kenneth Graunke2012-10-161-0/+1
| | | | | | | | | | | | | MaxIfDepth of 0 means "flatten all the time", not "never flatten". This is only desirable on hardware that can't support control flow; software rasterization and most hardware drivers want this. This alters behavior for swrast as well as i915. Tested on i915. NOTE: This is a candidate for stable release branches. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Remove PROGRAM_WRITE_ONLY register type.Kenneth Graunke2012-10-164-7/+0
| | | | | | | More dead code. I'm not sure what it was for. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove dead _mesa_num_parameters_of_type() function.Kenneth Graunke2012-10-162-23/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove dead _mesa_add_attribute() function.Kenneth Graunke2012-10-162-34/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove remnants of PROGRAM_VARYING.Kenneth Graunke2012-10-165-14/+3
| | | | | | | | The previous patch removed the producer of things in this file. Since there aren't any, we can remove it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove dead _mesa_add_varying() function.Kenneth Graunke2012-10-162-26/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove dead program_parameter::Flags field.Kenneth Graunke2012-10-164-19/+12
| | | | | | | All flags are now gone, so we can stop storing and passing this around. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: Remove the PROG_PARAM_BIT_CYL_WRAP flag. [v2]Kenneth Graunke2012-10-162-21/+4
| | | | | | | | | Nobody ever set the flag, which makes this dead code. v2: Leave the ureg_DECL_fs_input_cyl function in place, even though it's unused, since VMWare uses it for their internal projects. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove GLSL-related PROG_PARAM_BIT flags.Kenneth Graunke2012-10-162-12/+0
| | | | | | | | GLSL doesn't use the program code anymore. Accordingly, there were no consumers of these flags, so there's no need to define them. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove support for named parameters.Kenneth Graunke2012-10-1611-42/+3
| | | | | | | | | | | These were only part of NV_fragment_program, so we can kill them. The fact that PROGRAM_NAMED_PARAM appears in r200_vertprog.c is rather comedic, but also demonstrates that people just spam the various types of parameters everywhere because they're confusing. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* driconf: Remove force enable for NV_vertex_program.Kenneth Graunke2012-10-166-32/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove yet more remnants of NV_fragment_program.Kenneth Graunke2012-10-166-16/+8
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove some miscellaneous NV program stuff from arbprogram.c.Kenneth Graunke2012-10-161-25/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Simplify _mesa_BindProgram() by removing NV program remnants.Kenneth Graunke2012-10-161-34/+9
| | | | | | | | Without NV programs, there's no need for the compatible_program_targets function. A simple (non-)equality check will do. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove get and enable bits for NV_fragment_program.Kenneth Graunke2012-10-163-33/+2
| | | | | | | | | Also remove a leftover remnant from NV_vertex_program. v2: Update for Imre's get changes. Reviewed-by: Brian Paul <[email protected]> [v1] Reviewed-by: Eric Anholt <[email protected]> [v1]
* mesa: Remove prog_print support for NV programs.Kenneth Graunke2012-10-162-56/+5
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>