Merge remote branch 'origin/master' into nv50-compiler
[mesa.git] / src / mesa / state_tracker / st_cb_fbo.h
index bea6eb89c3ecf0b7782df89757c37bc7efd7af6a..3e9815c1b13cfee4216075caf318438bbfc8401a 100644 (file)
 #ifndef ST_CB_FBO_H
 #define ST_CB_FBO_H
 
+#include "main/compiler.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+
+struct dd_function_table;
+struct pipe_context;
 
 /**
  * Derived renderbuffer class.  Just need to add a pointer to the
@@ -37,8 +46,9 @@
 struct st_renderbuffer
 {
    struct gl_renderbuffer Base;
-   struct pipe_texture *texture;
+   struct pipe_resource *texture;
    struct pipe_surface *surface; /* temporary view into texture */
+   struct pipe_sampler_view *sampler_view;
    enum pipe_format format;  /** preferred format, or PIPE_FORMAT_NONE */
    GLboolean defined;        /**< defined contents? */
 
@@ -53,8 +63,9 @@ struct st_renderbuffer
    int rtt_level, rtt_face, rtt_slice;
 
    /** Render to texture state */
-   struct pipe_texture *texture_save;
+   struct pipe_resource *texture_save;
    struct pipe_surface *surface_save;
+   struct pipe_sampler_view *sampler_view_save;
 };
 
 
@@ -71,5 +82,15 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw);
 extern void
 st_init_fbo_functions(struct dd_function_table *functions);
 
+/* XXX unused ? */
+extern struct pipe_sampler_view *
+st_get_renderbuffer_sampler_view(struct st_renderbuffer *rb,
+                                 struct pipe_context *pipe);
+
+
+extern GLboolean
+st_is_depth_stencil_combined(const struct gl_renderbuffer_attachment *depth,
+                             const struct gl_renderbuffer_attachment *stencil);
+
 
 #endif /* ST_CB_FBO_H */