diff options
author | Marek Olšák <[email protected]> | 2017-02-07 23:45:47 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-30 14:44:33 +0200 |
commit | b39fade67cc545262d54b98c95b686570a6c7ef8 (patch) | |
tree | c4679db2e16c976e403d6fa28028a5e4567aafda /src/gallium/drivers | |
parent | 5271d12a6ed7d1e66c0f713415f58e29f8b45a72 (diff) |
radeonsi/gfx9: pad shader binaries by 128 bytes
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 575dd6c380f..20d6bd732b2 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5872,6 +5872,12 @@ int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader) assert((!prolog && !epilog) || !mainb->rodata_size); assert(!epilog || !epilog->rodata_size); + /* GFX9 can fetch at most 128 bytes past the end of the shader. + * Prevent VM faults. + */ + if (sscreen->b.chip_class >= GFX9) + bo_size += 128; + r600_resource_reference(&shader->bo, NULL); shader->bo = (struct r600_resource*) pipe_buffer_create(&sscreen->b.b, 0, |