diff options
author | Karol Herbst <kherbst@redhat.com> | 2020-02-28 15:54:08 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-03-10 22:06:19 +0000 |
commit | e1ffb72a05f9b50ee47767aaadbab3e47896ee14 (patch) | |
tree | d21fbcc831db43d2064cf9d6c171e0ddcd96c62e /src/gallium/drivers/nouveau/nv50/nv50_state.c | |
parent | 0541350e3a3cca58484880df04c0db160180b726 (diff) |
gallium: make handles of set_global_binding 64 bit
needed by CL
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_state.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_state.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c index 6488c71f4ad..f642b6bde90 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c @@ -1237,18 +1237,11 @@ nv50_set_compute_resources(struct pipe_context *pipe, } static inline void -nv50_set_global_handle(uint32_t *phandle, struct pipe_resource *res) +nv50_set_global_handle(uint64_t *phandle, struct pipe_resource *res) { struct nv04_resource *buf = nv04_resource(res); if (buf) { - uint64_t limit = (buf->address + buf->base.width0) - 1; - if (limit < (1ULL << 32)) { - *phandle = (uint32_t)buf->address; - } else { - NOUVEAU_ERR("Cannot map into TGSI_RESOURCE_GLOBAL: " - "resource not contained within 32-bit address space !\n"); - *phandle = 0; - } + *phandle = buf->address; } else { *phandle = 0; } @@ -1258,7 +1251,7 @@ static void nv50_set_global_bindings(struct pipe_context *pipe, unsigned start, unsigned nr, struct pipe_resource **resources, - uint32_t **handles) + uint64_t **handles) { struct nv50_context *nv50 = nv50_context(pipe); struct pipe_resource **ptr; |