From: Marek Olšák <[email protected]>

It's not needed. The hw doesn't fetch ahead over page boundaries.
---
 src/gallium/drivers/radeonsi/si_shader.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index 3ca2aa5..108386e 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4751,26 +4751,20 @@ int si_shader_binary_upload(struct si_screen *sscreen, 
struct si_shader *shader)
                           (!epilog ? mainb->rodata_size : 0);
        unsigned char *ptr;
 
        assert(!prolog || !prolog->rodata_size);
        assert(!previous_stage || !previous_stage->rodata_size);
        assert(!prolog2 || !prolog2->rodata_size);
        assert((!prolog && !previous_stage && !prolog2 && !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,
                                        PIPE_USAGE_IMMUTABLE,
                                        align(bo_size, SI_CPDMA_ALIGNMENT));
        if (!shader->bo)
                return -ENOMEM;
 
        /* Upload. */
        ptr = sscreen->b.ws->buffer_map(shader->bo->buf, NULL,
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to