#include "pipe/p_state.h"
#include "pipe/p_screen.h"
+#include "brw_reg.h"
+#include "brw_structs.h"
struct brw_winsys_screen;
struct brw_screen
{
struct pipe_screen base;
-
+ struct brw_chipset chipset;
struct brw_winsys_screen *sws;
+ boolean no_tiling;
+};
+
- boolean is_i945;
- uint pci_id;
+
+union brw_surface_id {
+ struct {
+ unsigned face:3;
+ unsigned zslice:13;
+ unsigned level:16;
+ } bits;
+ unsigned value;
};
-/**
- * Subclass of pipe_transfer
- */
-struct brw_transfer
+
+struct brw_surface
{
- struct pipe_transfer base;
+ struct pipe_surface base;
+
+ union brw_surface_id id;
+ unsigned cpp;
+ unsigned pitch;
+ unsigned draw_offset;
+ unsigned tiling;
- unsigned offset;
+ struct brw_surface_state ss;
+ struct brw_winsys_buffer *bo;
+ struct brw_surface *next, *prev;
};
+
/*
* Cast wrappers
*/
return (struct brw_screen *) pscreen;
}
-static INLINE struct brw_transfer *
-brw_transfer(struct pipe_transfer *transfer)
+
+static INLINE struct brw_surface *
+brw_surface(struct pipe_surface *surface)
{
- return (struct brw_transfer *)transfer;
+ return (struct brw_surface *)surface;
}
+unsigned
+brw_surface_pitch( const struct pipe_surface *surface );
+
+void brw_screen_tex_surface_init( struct brw_screen *brw_screen );
+
#endif /* BRW_SCREEN_H */