Skip to content
Snippets Groups Projects
Commit 88fea85f authored by Ben Widawsky's avatar Ben Widawsky
Browse files

i965/vec4/gen8: Handle the MUL dest hazard exception

Fix one of the few cases where we can't reliable touch the destination hazard
bits. I am explicitly doing this patch individually so it is easy to backport. I
was tempted to do this patch before the previous patch which reorganized the
code, but I believe even doing that first, this is still easy to backport.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84212


Signed-off-by: Ben Widawsky's avatarBen Widawsky <ben@bwidawsk.net>
Reviewed-by: default avatarMatt Turner <mattst88@gmail.com>
parent 156f565f
No related branches found
No related tags found
No related merge requests found
...@@ -841,9 +841,25 @@ vec4_visitor::move_push_constants_to_pull_constants() ...@@ -841,9 +841,25 @@ vec4_visitor::move_push_constants_to_pull_constants()
} }
/* Conditions for which we want to avoid setting the dependency control bits */ /* Conditions for which we want to avoid setting the dependency control bits */
static bool bool
is_dep_ctrl_unsafe(const vec4_instruction *inst) vec4_visitor::is_dep_ctrl_unsafe(const vec4_instruction *inst)
{ {
#define IS_DWORD(reg) \
(reg.type == BRW_REGISTER_TYPE_UD || \
reg.type == BRW_REGISTER_TYPE_D)
/* From the destination hazard section of the spec:
* > Instructions other than send, may use this control as long as operations
* > that have different pipeline latencies are not mixed.
*/
if (brw->gen >= 8) {
if (inst->opcode == BRW_OPCODE_MUL &&
IS_DWORD(inst->src[0]) &&
IS_DWORD(inst->src[1]))
return true;
}
#undef IS_DWORD
/* /*
* mlen: * mlen:
* In the presence of send messages, totally interrupt dependency * In the presence of send messages, totally interrupt dependency
......
...@@ -390,6 +390,7 @@ public: ...@@ -390,6 +390,7 @@ public:
bool opt_cse(); bool opt_cse();
bool opt_algebraic(); bool opt_algebraic();
bool opt_register_coalesce(); bool opt_register_coalesce();
bool is_dep_ctrl_unsafe(const vec4_instruction *inst);
void opt_set_dependency_control(); void opt_set_dependency_control();
void opt_schedule_instructions(); void opt_schedule_instructions();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment