[Mesa-dev] [PATCH] svga: change enum pipe_resource_usage back to unsigned

Brian Paul brianp at vmware.com
Tue May 31 13:29:31 UTC 2016


This parameter is actually a bitmask of PIPE_TRANSFER_x flags.
Change it back to a simple unsigned type.  IIRC, some compilers
complain about masks of enum values.  Also, this make the function
signature match  u_resource_vtbl::transfer_map() again.
---
 src/gallium/drivers/svga/svga_resource_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index d91497c..9ecb975 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -69,7 +69,7 @@ static void *
 svga_buffer_transfer_map(struct pipe_context *pipe,
                          struct pipe_resource *resource,
                          unsigned level,
-                         enum pipe_resource_usage usage,
+                         unsigned usage,
                          const struct pipe_box *box,
                          struct pipe_transfer **ptransfer)
 {
-- 
1.9.1



More information about the mesa-dev mailing list