i965: Expose surface setup internals for use by blits.
authorPaul Berry <stereotype441@gmail.com>
Fri, 27 Apr 2012 01:01:01 +0000 (18:01 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 15 May 2012 22:09:22 +0000 (15:09 -0700)
This patch exposes the functions brw_get_surface_tiling_bits and
gen7_set_surface_tiling, so that they can be re-used when setting up
surface states in gen6_blorp.cpp and gen7_blorp.cpp.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_state.h
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c

index 659cb0a2898ee3e3bf20abd24450fa0a0ee94475..9e3736170c7bca7a53ee3c912f804684c9b7bd23 100644 (file)
@@ -180,6 +180,7 @@ void *brw_state_batch(struct brw_context *brw,
 
 /* brw_wm_surface_state.c */
 void gen4_init_vtable_surface_functions(struct brw_context *brw);
+uint32_t brw_get_surface_tiling_bits(uint32_t tiling);
 void brw_create_constant_surface(struct brw_context *brw,
                                 drm_intel_bo *bo,
                                 int width,
@@ -195,6 +196,7 @@ GLuint translate_tex_format(gl_format mesa_format,
                            GLenum srgb_decode);
 
 /* gen7_wm_surface_state.c */
+void gen7_set_surface_tiling(struct gen7_surface_state *surf, uint32_t tiling);
 void gen7_init_vtable_surface_functions(struct brw_context *brw);
 void gen7_create_constant_surface(struct brw_context *brw,
                                  drm_intel_bo *bo,
index 0bb9414ed588f13c033e71446a2c6a944cb44a81..104d475f3f94ec5249b8ce26bd54f81939ebde69 100644 (file)
@@ -620,7 +620,7 @@ translate_tex_format(gl_format mesa_format,
    }
 }
 
-static uint32_t
+uint32_t
 brw_get_surface_tiling_bits(uint32_t tiling)
 {
    switch (tiling) {
index 8f62c040b6a94fc0aa3f704b93a43f2da231c090..d84e07582a04d78d38275f5edfa173b0508f4b61 100644 (file)
@@ -35,7 +35,7 @@
 #include "brw_defines.h"
 #include "brw_wm.h"
 
-static void
+void
 gen7_set_surface_tiling(struct gen7_surface_state *surf, uint32_t tiling)
 {
    switch (tiling) {