diff options
author | Jonathan Marek <[email protected]> | 2020-02-11 21:11:07 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-28 14:04:20 +0000 |
commit | 7d27a9ffb36909812c249558da2485da44afd89f (patch) | |
tree | e3a20446a4266d8522f6027c9bdf4283aa2e26b3 /src/freedreno/vulkan | |
parent | 0f0662a5515d04f46dac332b69ec324bad16d812 (diff) |
turnip: check the right alignment requirement on shader iova
I had some trouble because I assumed this was right, tested that the
alignment requirement is actually 16.
Signed-off-by: Jonathan Marek <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3979>
Diffstat (limited to 'src/freedreno/vulkan')
-rw-r--r-- | src/freedreno/vulkan/tu_pipeline.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index d1dc5644cc6..4bd59a087d5 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -972,7 +972,11 @@ tu6_emit_shader_object(struct tu_cs *cs, assert(variant->type == stage); const uint64_t binary_iova = binary_bo->iova + binary_offset; - assert((binary_iova & 0x3) == 0); + assert((binary_iova & 0xf) == 0); + /* note: it looks like HW might try to read a few instructions beyond the instrlen size + * of the shader. this could be a potential source of problems at some point + * possibly this doesn't happen if shader iova is aligned enough (to 4k for example) + */ tu_cs_emit_pkt4(cs, reg, 2); tu_cs_emit_qw(cs, binary_iova); |