gallium: make handles of set_global_binding 64 bit
[mesa.git] / src / gallium / drivers / nouveau / nvc0 / nvc0_state.c
index 49546e5de68b60afeef83a9ff99f42ef85d09661..5a6af5df8c9e9b1975611605f5c418f32579adcf 100644 (file)
@@ -1354,18 +1354,11 @@ nvc0_set_shader_buffers(struct pipe_context *pipe,
 }
 
 static inline void
-nvc0_set_global_handle(uint32_t *phandle, struct pipe_resource *res)
+nvc0_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;
    }
@@ -1375,7 +1368,7 @@ static void
 nvc0_set_global_bindings(struct pipe_context *pipe,
                          unsigned start, unsigned nr,
                          struct pipe_resource **resources,
-                         uint32_t **handles)
+                         uint64_t **handles)
 {
    struct nvc0_context *nvc0 = nvc0_context(pipe);
    struct pipe_resource **ptr;