summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r600/r600_context.h
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-08-20 18:55:41 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-08-20 18:55:41 -0400
commitba48e78b1f7cf307d505583f758c65b158f5aae0 (patch)
tree524dae6b2847f1c8874760643dde73c0ad0a2773 /src/mesa/drivers/dri/r600/r600_context.h
parenta47bb56d45af07b8cf1461c4c00620ec0b6aca41 (diff)
r600: convert to using common radeon state atoms
switches more state handling to common code. We need should be more fine grained with the state atoms eventually.
Diffstat (limited to 'src/mesa/drivers/dri/r600/r600_context.h')
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.h44
1 files changed, 25 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h
index 0cf2eb2daa..a9b080baa3 100644
--- a/src/mesa/drivers/dri/r600/r600_context.h
+++ b/src/mesa/drivers/dri/r600/r600_context.h
@@ -55,9 +55,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
struct r600_context;
typedef struct r600_context context_t;
-GLboolean r700SendPSState(context_t *context);
-GLboolean r700SendVSState(context_t *context);
-GLboolean r700SendSQConfig(context_t *context);
+extern GLboolean r700SendPSState(context_t *context);
+extern GLboolean r700SendVSState(context_t *context);
+extern GLboolean r700SendFSState(context_t *context);
#include "main/mm.h"
@@ -112,6 +112,22 @@ enum
RIGHT_SHIFT = 2,
};
+struct r600_hw_state {
+ struct radeon_state_atom sq;
+ struct radeon_state_atom db;
+ struct radeon_state_atom db_target;
+ struct radeon_state_atom sc;
+ struct radeon_state_atom cl;
+ struct radeon_state_atom ucp;
+ struct radeon_state_atom su;
+ struct radeon_state_atom cb;
+ struct radeon_state_atom cb_target;
+ struct radeon_state_atom sx;
+ struct radeon_state_atom vgt;
+ struct radeon_state_atom spi;
+ struct radeon_state_atom vpt;
+};
+
/**
* \brief R600 context structure.
*/
@@ -121,6 +137,8 @@ struct r600_context {
/* ------ */
R700_CHIP_CONTEXT hw;
+ struct r600_hw_state atoms;
+
/* Vertex buffers
*/
GLvector4f dummy_attrib[_TNL_ATTRIB_MAX];
@@ -143,28 +161,14 @@ do { \
rmesa->radeon.dma.flush( rmesa->radeon.glCtx ); \
} while (0)
-#define R600_STATECHANGE(r600, atom) \
+#define R600_STATECHANGE(r600, ATOM) \
do { \
R600_NEWPRIM(r600); \
- (atom) = GL_TRUE; \
+ r600->atoms.ATOM.dirty = GL_TRUE; \
r600->radeon.hw.is_dirty = GL_TRUE; \
} while(0)
-extern GLboolean r700SendSPIState(context_t *context);
-extern GLboolean r700SendVGTState(context_t *context);
-extern GLboolean r700SendSXState(context_t *context);
-extern GLboolean r700SendDBState(context_t *context);
-extern GLboolean r700SendCBState(context_t *context);
-extern GLboolean r700SendSUState(context_t *context);
-extern GLboolean r700SendCLState(context_t *context);
-extern GLboolean r700SendSCState(context_t *context);
-extern GLboolean r700SendViewportState(context_t *context, int id);
-extern GLboolean r700SendRenderTargetState(context_t *context, int id);
extern GLboolean r700SendTextureState(context_t *context);
-extern GLboolean r700SendDepthTargetState(context_t *context);
-extern GLboolean r700SendUCPState(context_t *context);
-extern GLboolean r700SendFSState(context_t *context);
-extern void r700EmitState(GLcontext * ctx);
extern GLboolean r700SyncSurf(context_t *context,
struct radeon_bo *pbo,
@@ -180,6 +184,8 @@ extern void r700SetupVTXConstants(GLcontext * ctx,
unsigned int stride,
unsigned int Count); /* number of vectors in stream */
+extern void r600InitAtoms(context_t *context);
+
#define RADEON_D_CAPTURE 0
#define RADEON_D_PLAYBACK 1
#define RADEON_D_PLAYBACK_RAW 2