summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa/main: Make get_hash.c values constant.José Fonseca2014-06-031-1/+1
| | | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "10.1 10.2" <[email protected]>
* i965: Add _default_ name changes to test_eu_compact.c.Vinson Lee2014-06-021-5/+5
| | | | | | | | | | | | | | | | | | These were missed in commit e374809819d82f2e3e946fe809c4d46061ddc5b5. Fixes 'make check'. CC test_eu_compact.o test_eu_compact.c: In function ‘gen_f0_0_MOV_GRF_GRF’: test_eu_compact.c:222:4: error: implicit declaration of function ‘brw_set_predicate_control’ [-Werror=implicit-function-declaration] brw_set_predicate_control(p, true); ^ test_eu_compact.c: In function ‘run_tests’: test_eu_compact.c:270:6: error: implicit declaration of function ‘brw_set_access_mode’ [-Werror=implicit-function-declaration] brw_set_access_mode(p, BRW_ALIGN_16); ^ Signed-off-by: Vinson Lee <[email protected]>
* i965/gen8: Print number of instructions directly.Matt Turner2014-06-022-0/+9
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Emit compaction stats without walking the assembly.Matt Turner2014-06-023-19/+12
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move program header printing to end of generate_code().Matt Turner2014-06-024-52/+44
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move annotation info into generate code.Matt Turner2014-06-026-91/+68
| | | | | | Suggested by Ken as a way to cut down lines of code. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Put '_default_' in the name of functions that set default state.Kenneth Graunke2014-06-0213-163/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | Eventually we're going to use functions to set bits on an instruction. Putting 'default' in the name of functions that alter default state will help distinguins them. This patch was generated entirely mechanically, by the following: for file in brw*.{cpp,c,h}; do sed -i \ -e 's/brw_set_mask_control/brw_set_default_mask_control/g' \ -e 's/brw_set_saturate/brw_set_default_saturate/g' \ -e 's/brw_set_access_mode/brw_set_default_access_mode/g' \ -e 's/brw_set_compression_control/brw_set_default_compression_control/g' \ -e 's/brw_set_predicate_control/brw_set_default_predicate_control/g' \ -e 's/brw_set_predicate_inverse/brw_set_default_predicate_inverse/g' \ -e 's/brw_set_flag_reg/brw_set_default_flag_reg/g' \ -e 's/brw_set_acc_write_control/brw_set_default_acc_write_control/g' \ $file; done No manual changes were done after running that command. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Delete brw_set_conditionalmod.Kenneth Graunke2014-06-023-13/+0
| | | | | | | | | This removes the ability to set the default conditional modifier on all future instructions. Nothing uses it, and it's not really a sensible thing to do anyway. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Eliminate brw_set_conditionalmod from the Gen4-5 compilers.Kenneth Graunke2014-06-026-24/+24
| | | | | | | | | With the predication changes eliminated, all this does is set the conditional modifier on a single instruction. Doing that directly is easy, and avoids mucking about with default state. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Don't use brw_set_conditionalmod in the FS and vec4 compilers.Kenneth Graunke2014-06-022-5/+16
| | | | | | | | | | | | | | | | | | | | brw_set_conditionalmod and brw_next_insn work together to set the conditional modifier for the next instruction, then turn it off. The Gen8+ generators don't implement this: we just set it for all future instructions, and whack it for each fs_inst/vec4_instruction. Both approaches work out because we only set conditional_mod on IR instructions like CMP, AND, and so on, which correspond to exactly one assembly instruction. The Gen8 generators would break if we had an IR instruction that generated multiple instructions, and the Gen4-7 EU emit layer would do...something. To safeguard against this, assert that we only generated one instruction if conditional_mod is set, and just set the flag directly on that instruction rather than altering default state. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Stop setting predication from brw_set_conditionalmod.Kenneth Graunke2014-06-024-5/+11
| | | | | | | | | | | | | brw_set_conditionalmod has traditionally been complex: it causes conditionalmod to be set for the next instruction, and then predication to be set on all future instructions after that. We may want to generate a flag condition and not use it immediately, due to instruction scheduling or the like. Even if not, it's easy to set things explicitly, and that's clearer. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Drop unnecessary brw_set_conditionalmod() before brw_CMP().Kenneth Graunke2014-06-021-1/+0
| | | | | | | | | | | brw_CMP already takes a conditional modifier as a parameter, and sets it accordingly. brw_set_conditionalmod() also makes everything after the next instruction predicated, but we don't need that: we always emit an IF instruction after load_clip_distance(), and that's already predicated. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/clip: Use the new brw_last_inst macro instead of temporaries.Kenneth Graunke2014-06-023-27/+23
| | | | | | | | It wasn't too bad before, but the macro is going to be nicer once I start modifying a lot more instructions in this pattern. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Create a "brw_last_inst" convenience macro.Kenneth Graunke2014-06-021-0/+6
| | | | | | | | | | | | | | | | Often times, we want to emit an instruction, then set one field on it, such as predication or a conditional modifier. Normally, we'd have to declare "struct brw_instruction *inst;" and then use "inst = brw_FOO(...)" to emit the instruction, which can hurt readability. The new "brw_last_inst" macro refers to the most recently emitted instruction, so you can just do: brw_ADD(...) brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL; Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Make brw_JMPI set predicate_control based on a parameter.Kenneth Graunke2014-06-023-10/+13
| | | | | | | | | We use both predicated and unconditional JMPI instructions. But in each case, it's clear which we want. It's simpler to just specify it as a parameter, rather than relying on default state. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Remove the dst and src0 parameters from brw_JMPI.Kenneth Graunke2014-06-023-17/+12
| | | | | | | | | In all cases, we set both dst and src0 to brw_ip_reg(). This is no accident: according to the ISA reference, both are required to be the IP register. So, we may as well drop the parameters. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* egl/main: Fix eglMakeCurrent when releasing context from current thread.Beren Minor2014-06-021-2/+6
| | | | | | | | | | | | | | EGL 1.4 Specification says that eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) can be used to release the current thread's ownership on the surfaces and context. MESA's egl implementation was only accepting the parameters when the KHR_surfaceless_context extension is supported. [chadv] Add quote from the EGL 1.4 spec. Cc: "10,1, 10.2" <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radeonsi: enable ARB_sample_shadingMarek Olšák2014-06-023-2/+3
|
* radeonsi: implement SAMPLEMASK fragment shader outputMarek Olšák2014-06-021-3/+15
|
* radeonsi: interpolate varyings at sample when full sample shading is enabledMarek Olšák2014-06-023-12/+15
|
* radeonsi: implement SAMPLEPOS fragment shader inputMarek Olšák2014-06-025-0/+76
| | | | The sample positions are read from a constant buffer.
* radeonsi: implement SAMPLEID fragment shader inputMarek Olšák2014-06-021-1/+17
|
* radeonsi: implement set_min_samplesMarek Olšák2014-06-024-2/+36
| | | | This is how per-sample shading is enabled.
* radeon: add basic register setup for per-sample shadingMarek Olšák2014-06-024-9/+13
| | | | Only for Cayman, SI, CIK.
* radeon: split cayman_emit_msaa_state into 2 functionsMarek Olšák2014-06-024-14/+22
| | | | The other function will be split up from the framebuffer state.
* Revert "glx: load dri driver with RTLD_LOCAL so dlclose never fails to unload"Marek Olšák2014-06-021-5/+5
| | | | | | | | | | | This reverts commit e3cc0d90e14e62a0a787b6c07a6df0f5c84039be. It breaks too many apps and completely breaks my desktop too. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79469 We'll probably need to re-release all stable versions after this is committed. Cc: "10.1 10.2" <[email protected]>
* r600g: use TGSI_PROPERTY to disable viewport and clippingChristoph Bumiller2014-06-029-9/+72
| | | | | | | | | | v2 get rid of magic value, use DEFINES v3 update clip_disable together with vs_position_window_space Big thanks to Marek Olšák! Signed-off-by: David Heidelberger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: create TGSI_PROPERTY to disable viewport and clippingChristoph Bumiller2014-06-0219-1/+49
| | | | | | Marek v2: add a cap Signed-off-by: Marek Olšák <[email protected]>
* r600g: remove assert on draw with count == 0Christoph Bumiller2014-06-021-1/+0
| | | | Signed-off-by: Marek Olšák <[email protected]>
* r600g: HW bug workaround for TGSI_OPCODE_BREAKCChristoph Bumiller2014-06-023-4/+22
| | | | Signed-off-by: Marek Olšák <[email protected]>
* r600g: implement TGSI_OPCODE_BREAKCChristoph Bumiller2014-06-021-1/+24
| | | | Signed-off-by: Marek Olšák <[email protected]>
* r600g: support all channels of TGSI_FILE_ADDRESSChristoph Bumiller2014-06-021-28/+58
| | | | | | | | It's allowed in SM3. v2: fix multi-component tgsi_r600_arl (FLT_TO_INT is trans-only) Signed-off-by: Marek Olšák <[email protected]>
* r600g: check for PIPE_BIND_BLENDABLE in is_format_supportedChristoph Bumiller2014-06-022-0/+18
| | | | | | v2: added !util_format_is_depth_or_stencil(format) Signed-off-by: Marek Olšák <[email protected]>
* r600g: handle PIPE_QUERY_GPU_FINISHEDChristoph Bumiller2014-06-021-0/+9
| | | | Signed-off-by: Marek Olšák <[email protected]>
* i965/fs: Add fs_inst constructor that takes a list of sources.Matt Turner2014-06-012-0/+15
| | | | | | | Also add an emit() function that calls it. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add a function to resize fs_inst's sources array.Matt Turner2014-06-012-0/+11
| | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Clean up fs_inst constructors.Matt Turner2014-06-012-75/+32
| | | | | | | In a fashion suggested by Ken. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Loop from 0 to inst->sources, not 0 to 3.Matt Turner2014-06-0110-28/+28
| | | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Store the number of sources an fs_inst has.Matt Turner2014-06-012-11/+13
| | | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: ralloc fs_inst's fs_reg sources.Matt Turner2014-06-012-1/+9
| | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Disable fs_inst assignment operator.Matt Turner2014-06-011-0/+2
| | | | | | | | | The fs_reg src array is going to turn into a pointer and we'd rather not consider the implications of shallow copying fs_insts. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add and use an fs_inst copy constructor.Matt Turner2014-06-012-0/+6
| | | | | | | Will get more complicated when fs_reg src becomes a pointer. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Skip IR annotations with INTEL_DEBUG=noann.Matt Turner2014-06-013-2/+6
| | | | | | | | | Running shader-db with INTEL_DEBUG=noann reduces the runtime from ~90 to ~80 seconds on my machine. It also reduces the disk space consumed by the .out files from 660 MB (676 on disk) to 343 MB (358 on disk). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Debug the optimization passes by dumping instr to file.Matt Turner2014-06-011-12/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | With INTEL_DEBUG=optimizer, write the output of dump_instructions() to a file each time an optimization pass makes progress. This lets you easily diff successive files to see what an optimization pass did. Example filenames written when running glxgears: fs8-0000-00-start fs8-0000-01-04-opt_copy_propagate fs8-0000-01-06-dead_code_eliminate fs8-0000-01-12-compute_to_mrf fs8-0000-02-06-dead_code_eliminate | | | | | | | `-- optimization pass name | | | | | `-- optimization pass number in the loop | | | `-- optimization loop interation | `-- shader program number Note that with INTEL_DEBUG=optimizer, we disable compact_virtual_grfs, so that we can diff instruction lists across loop interations without the register numbers being changes. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Give dump_instructions() a filename argument.Matt Turner2014-06-015-6/+42
| | | | | | | | This will allow debugging code to dump the IR after an optimization pass makes progress (the next patch). Only let it open and write to a file if the effective user isn't root. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Give dump_instruction() a FILE* argument.Matt Turner2014-06-015-100/+115
| | | | | | | Use function overloading rather than default arguments, since gdb doesn't know about default arguments. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add envvar to debug the optimization passes.Matt Turner2014-06-012-0/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* llvmpipe: (trivial) drop "unswizzled" from some function namesRoland Scheidegger2014-05-312-28/+30
| | | | | | | This made sense when swizzled storage layout was used for rendering to tiles. But nowadays the name just adds confusion (and makes for long lines). Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: fix crash when not all attachments are populated in a fbRoland Scheidegger2014-05-311-3/+9
| | | | | | | | | | | | Framebuffers can have NULL attachments since a while. llvmpipe handled that properly for lp_rast_shade_quads_mask but it seems the change didn't make it to lp_rast_shade_tile. This fixes piglit fbo-drawbuffers-none test (though I need to increase the FB_SIZE from 32 to 256 so the tris cover some tiles fully). https://bugs.freedesktop.org/show_bug.cgi?id=79421 Cc: "10.1 10.2" <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* softpipe: honor the render_condition_enable bit in blits.Roland Scheidegger2014-05-311-0/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>