[Mesa-dev] [PATCH 06/12] intel: Make intel_region_map return void *.

Eric Anholt eric at anholt.net
Mon Dec 5 11:42:30 PST 2011


We don't gripe about void * arithmetic for our driver, and this
prevents silly casting when assigning the result of mapping to
non-byte types.
---
 src/mesa/drivers/dri/intel/intel_regions.c |    2 +-
 src/mesa/drivers/dri/intel/intel_regions.h |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index 0b9ffe8..bc83649 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -108,7 +108,7 @@ debug_backtrace(void)
 
 /* XXX: Thread safety?
  */
-GLubyte *
+void *
 intel_region_map(struct intel_context *intel, struct intel_region *region,
                  GLbitfield mode)
 {
diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h
index 06e76ac..8c7e138 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.h
+++ b/src/mesa/drivers/dri/intel/intel_regions.h
@@ -100,9 +100,9 @@ void intel_recreate_static_regions(struct intel_context *intel);
  *
  * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT
  */
-GLubyte *intel_region_map(struct intel_context *intel,
-                          struct intel_region *ib,
-                          GLbitfield mode);
+void *intel_region_map(struct intel_context *intel,
+		       struct intel_region *ib,
+		       GLbitfield mode);
 
 void intel_region_unmap(struct intel_context *intel, struct intel_region *ib);
 
-- 
1.7.7.3



More information about the mesa-dev mailing list