From 69b6632085518aaa8778258b42de58d510123578 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Sat, 13 Nov 2021 22:31:26 -0800 Subject: [PATCH] Fix write-after-read in prefix test Thanks to Jeff Bolz for spotting the write-after-read hazard on the sh_flag accesses. This fixes observed failures on Nvidia Turing and Ampere on DX12. --- tests/shader/gen/prefix.dxil | Bin 4860 -> 4876 bytes tests/shader/gen/prefix.hlsl | 2 ++ tests/shader/gen/prefix.msl | 2 ++ tests/shader/gen/prefix.spv | Bin 9796 -> 9828 bytes tests/shader/gen/prefix_atomic.dxil | Bin 4864 -> 4884 bytes tests/shader/gen/prefix_atomic.hlsl | 2 ++ tests/shader/gen/prefix_atomic.msl | 2 ++ tests/shader/gen/prefix_atomic.spv | Bin 9820 -> 9852 bytes tests/shader/gen/prefix_vkmm.spv | Bin 9984 -> 10016 bytes tests/shader/prefix.comp | 2 ++ 10 files changed, 10 insertions(+) diff --git a/tests/shader/gen/prefix.dxil b/tests/shader/gen/prefix.dxil index 34f3d6affd966a3b2998becd3a99eb17fe69ce2b..73f1ba1fa807b2ce21f5bb6500358e7e1bbb8e3a 100644 GIT binary patch delta 1257 zcmY*Ze@qi+82;{hJ+AGwJ&HhE3~8Nhx(eG-m;>FgrC1SBt8N6QWLKmNr`9@{!Rf~J z7nIN$@W7#{xovJ^NSF({6r#zsWuOQIHt;CUDMdV!U@t;GT8?aze%f<%X@J7iqD8A6yf;)=C$o@7ezT%t-WX$^_= z>xL04oDFm&Y{#8jkbs@Wgi1TD`C{vzaG;c!miQ@Y2(+GtH2DH^B|rS25&#c#Q*33F z2%%Sx%w4@#?FFx;DGJK5N(!T_lO;s>NGx@H41s7p*1FO{f5&V>@}R3s5UFh_9GZ{L z4o{BW(_`lEmyPc|;&ORG+43J|@ADOIt-lX{*z#*;C?u*--M+r`R@V+y%V5r{g99R% z-ph@0_yoWwHPUH-U!y3&m(tm|G_H}&Q!-+e`4>*sbMD)l7Y5F>bqq{x6nTwR^)DT8 zzE`_zp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