mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
intel/fs: Don't copy-propagate stride=0 sources into ddx/ddy
This can come up if, for instance, the shader does a derivative of a
uniform or flat input. Ideally, NIR would use divergence analysis to
get rid of the derivative in this case but it doesn't right now. This
fixes a crash in F1 2017.
Cc: mesa-stable@lists.freedesktop.org
Reported-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6564>
(cherry picked from commit 8e8701b43a)
This commit is contained in:
parent
3e325d431c
commit
937405eda6
2 changed files with 2 additions and 2 deletions
|
|
@ -2794,7 +2794,7 @@
|
|||
"description": "intel/fs: Don't copy-propagate stride=0 sources into ddx/ddy",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -524,7 +524,7 @@ fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry)
|
|||
*/
|
||||
const unsigned entry_stride = (entry->src.file == FIXED_GRF ? 1 :
|
||||
entry->src.stride);
|
||||
if (instruction_requires_packed_data(inst) && entry_stride > 1)
|
||||
if (instruction_requires_packed_data(inst) && entry_stride != 1)
|
||||
return false;
|
||||
|
||||
/* Bail if the result of composing both strides would exceed the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue