Merge branch '7.8'
[mesa.git] / src / gallium / drivers / llvmpipe / lp_texture.h
index 00a20763e43f1c642b80222ef8f7b6c1d6451497..b23f929b1670a7bc95a8dc8f92cb23975f92b81c 100644 (file)
 #include "pipe/p_state.h"
 
 
+#define LP_MAX_TEXTURE_2D_LEVELS 13  /* 4K x 4K for now */
+#define LP_MAX_TEXTURE_3D_LEVELS 10  /* 512 x 512 x 512 for now */
+
+
 struct pipe_context;
 struct pipe_screen;
 struct llvmpipe_context;
-struct llvmpipe_displaytarget;
+
+struct sw_displaytarget;
+
 
 struct llvmpipe_texture
 {
    struct pipe_texture base;
 
-   unsigned long level_offset[PIPE_MAX_TEXTURE_LEVELS];
-   unsigned stride[PIPE_MAX_TEXTURE_LEVELS];
+   unsigned long level_offset[LP_MAX_TEXTURE_2D_LEVELS];
+   unsigned stride[LP_MAX_TEXTURE_2D_LEVELS];
 
    /**
     * Display target, for textures with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET
     * usage.
     */
-   struct llvmpipe_displaytarget *dt;
+   struct sw_displaytarget *dt;
 
    /**
     * Malloc'ed data for regular textures, or a mapping to dt above.
@@ -58,6 +64,7 @@ struct llvmpipe_texture
    unsigned timestamp;
 };
 
+
 struct llvmpipe_transfer
 {
    struct pipe_transfer base;
@@ -73,6 +80,14 @@ llvmpipe_texture(struct pipe_texture *pt)
    return (struct llvmpipe_texture *) pt;
 }
 
+
+static INLINE const struct llvmpipe_texture *
+llvmpipe_texture_const(const struct pipe_texture *pt)
+{
+   return (const struct llvmpipe_texture *) pt;
+}
+
+
 static INLINE struct llvmpipe_transfer *
 llvmpipe_transfer(struct pipe_transfer *pt)
 {
@@ -80,11 +95,8 @@ llvmpipe_transfer(struct pipe_transfer *pt)
 }
 
 
-extern void
-llvmpipe_init_texture_funcs( struct llvmpipe_context *llvmpipe );
-
 extern void
 llvmpipe_init_screen_texture_funcs(struct pipe_screen *screen);
 
 
-#endif /* LP_TEXTURE */
+#endif /* LP_TEXTURE_H */