summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_ir_fs.h
Commit message (Collapse)AuthorAgeFilesLines
* i965/fs: Remove the width field from fs_regJason Ekstrand2015-06-301-14/+1
| | | | | | | | | | | | | As of now, the width field is no longer used for anything. The width field "seemed like a good idea at the time" but is actually entirely redundant with the instruction's execution size. Initially, it gave us the ability to easily set the instructions execution size based entirely on register widths. With the builder, we can easiliy set the sizes explicitly and the width field doesn't have as much purpose. At this point, it's just redundant information that can get out of sync so it really needs to go. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Acked-by: Francisco Jerez <currojerez@riseup.net>
* i965/fs: Remove fs_inst constructors that don't take an explicit exec_sizeJason Ekstrand2015-06-301-8/+1
| | | | | Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Acked-by: Francisco Jerez <currojerez@riseup.net>
* i965/fs: Move offset(fs_reg, unsigned) to brw_fs.hJason Ekstrand2015-06-301-21/+0
| | | | | | | | Shortly, offset() will depend on the builder so we need it moved to some place where it has access to that. Reviewed-by: Iago Toral Quiroga <itoral@igali.com> Acked-by: Francisco Jerez <currojerez@riseup.net>
* i965/fs: Drop fs_inst::force_uncompressed.Francisco Jerez2015-06-091-1/+0
| | | | | | This is now unused. Saves a whole bit of memory per instruction. Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Define consistent interface to enable instruction result saturation.Francisco Jerez2015-06-091-0/+11
| | | | | | v2: Use set_ prefix. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Define consistent interface to enable instruction conditional modifiers.Francisco Jerez2015-06-091-0/+11
| | | | | | v2: Use set_ prefix. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Define consistent interface to predicate an instruction.Francisco Jerez2015-06-091-0/+22
| | | | | | v2: Use set_ prefix. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/fs: Add set_sechalf() method.Matt Turner2015-05-181-0/+10
| | | | | | Used in the next commit. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* i965/fs: Have component() set the register stride to zero.Francisco Jerez2015-05-121-0/+1
| | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/fs: Fix offset() for registers with zero stride.Francisco Jerez2015-05-121-2/+3
| | | | | | | stride == 0 implies that the register has one channel per vector component. Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965/fs_inst: Get rid of the effective_width fieldJason Ekstrand2015-05-061-8/+0
| | | | | | | | The effective_width field was an ill-concieved hack to get around issues in the LOAD_PAYLOAD instruction. Now that the LOAD_PAYLOAD instruction is far more sane, this field can die. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/fs_inst: Add an is_copy_payload helperJason Ekstrand2015-05-061-0/+1
| | | | | | | | | | This commit adds a new is_copy_payload helper to fs_inst that takes the place of the similarly named functions in cse and register coalesce. The two is_copy_payload functions in CSE and register coalesce were subtly different and potentially subtly broken. The new version unifies the two and should be more correct. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/fs: Make half(fs_reg, unsigned) handle register files more explicitlyJason Ekstrand2015-05-061-5/+16
| | | | | | | | | Previously, we had a special case for uniforms and immediates and then a bunch of asserts for various other pessimal things. This commit changes it so that it explicitly does something on each register file. Some of them are disallowed and others are treated properly. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/fs: Fix passing an immediate to half().Francisco Jerez2015-05-061-2/+2
| | | | | | | Immediates are generally uniform, they yield the same value to both halves of any instruction. Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Perform basic optimizations on the BROADCAST opcode.Francisco Jerez2015-05-041-0/+7
| | | | | | v2: Style fixes. Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Add a devinfo field to backend_visitor and use it for gen checksJason Ekstrand2015-04-221-1/+1
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965/fs: Create a has_side_effects for fs_instBen Widawsky2015-04-141-0/+1
| | | | | | | | | | | | | | | | | | | When an instruction has a side effect, it impacts the available options when reordering an instruction. As the EOT flag is an implied write to the render target in the FS, it can be considered a side effect. This patch shouldn't actually have any impact on the current code since the EOT flag implies that the opcode is already one with side effects, FS_OPCODE_FB_WRITE. The next patch however will introduce an optimization whereby the EOT flag can occur with an opcode SHADER_OPCODE_TEX, and as that instruction will perform the same implied write to the render target, it cannot be reordered. v2: Remove extra whitespace (Matt) Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965/fs: Fix stack allocation of fs_inst and stop stealing src array ↵Francisco Jerez2015-02-101-3/+5
| | | | | | | | | | provided on construction. Using 'ralloc*(this, ...)' is wrong if the object has automatic storage or was allocated through any other means. Use normal dynamic memory instead. Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Move up fs_inst::flag_subreg to backend_instruction.Francisco Jerez2015-02-101-5/+0
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Move up fs_inst::regs_written to backend_instruction.Francisco Jerez2015-02-101-1/+0
| | | | | | It will also be useful in the VEC4 back-end. Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965/fs: Remove dependency of fs_inst on the visitor class.Francisco Jerez2015-02-101-2/+1
| | | | | | The fs_visitor argument of fs_inst::regs_read() wasn't used at all. Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Move IR object definitions to separate header files.Francisco Jerez2015-02-101-0/+255
One should be able to manipulate i965 IR without pulling the whole FS/VEC4 visitor classes -- Optimization passes and other transformations would ideally be visitor-agnostic. Among other issues this avoids a circular dependency between the header file where such visitor-agnostic code will be defined and the main FS/VEC4 header where both IR (layer below) and visitor (layer above) happen to be defined. Reviewed-by: Matt Turner <mattst88@gmail.com>