mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
i965/fs: Create a has_side_effects for fs_inst
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>
This commit is contained in:
parent
28d9e90428
commit
38707e1478
2 changed files with 7 additions and 0 deletions
|
|
@ -531,6 +531,12 @@ fs_inst::can_do_source_mods(struct brw_context *brw)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
fs_inst::has_side_effects() const
|
||||
{
|
||||
return this->eot || backend_instruction::has_side_effects();
|
||||
}
|
||||
|
||||
void
|
||||
fs_reg::init()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ public:
|
|||
bool is_partial_write() const;
|
||||
int regs_read(int arg) const;
|
||||
bool can_do_source_mods(struct brw_context *brw);
|
||||
bool has_side_effects() const;
|
||||
|
||||
bool reads_flag() const;
|
||||
bool writes_flag() const;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue