mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
intel/brw: Fix implementaiton of |= operator for enum
The current implementation does nothing, since it has no side effects, only a return value. By passing `x` as a reference we can mutate the value before returning. Fixes:df37c7ca74("brw: fix analysis dirtying with pulled constants") CID: 1665293 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37263> (cherry picked from commitf18aca8689)
This commit is contained in:
parent
c6aed295dc
commit
283734b598
2 changed files with 3 additions and 4 deletions
|
|
@ -6264,7 +6264,7 @@
|
|||
"description": "intel/brw: Fix implementaiton of |= operator for enum",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "df37c7ca743f6407cee4cc6cde7a33fdfe8ed3b7",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -83,10 +83,9 @@ operator|(brw_analysis_dependency_class x, brw_analysis_dependency_class y)
|
|||
}
|
||||
|
||||
inline brw_analysis_dependency_class
|
||||
operator|=(brw_analysis_dependency_class x, brw_analysis_dependency_class y)
|
||||
operator|=(brw_analysis_dependency_class &x, brw_analysis_dependency_class y)
|
||||
{
|
||||
return static_cast<brw_analysis_dependency_class>(
|
||||
static_cast<unsigned>(x) | static_cast<unsigned>(y));
|
||||
return x = x | y;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue