radeon: fixup some issue with fbos and sw fallbacks
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_ioctl.h
index b7f07294946d909fa15652294caf7091abab1d2b..18805d4c571ff8ffc022b54a227b41ef580f6353 100644 (file)
@@ -38,9 +38,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "main/simple_list.h"
 #include "radeon_lock.h"
+#include "radeon_bocs_wrapper.h"
 
-
-extern void radeonEmitState( r100ContextPtr rmesa );
 extern void radeonEmitVertexAOS( r100ContextPtr rmesa,
                                 GLuint vertex_size,
                                 struct radeon_bo *bo,
@@ -99,26 +98,26 @@ do {                                                \
 /* Can accomodate several state changes and primitive changes without
  * actually firing the buffer.
  */
+
 #define RADEON_STATECHANGE( rmesa, ATOM )                      \
 do {                                                           \
    RADEON_NEWPRIM( rmesa );                                    \
    rmesa->hw.ATOM.dirty = GL_TRUE;                             \
-   rmesa->hw.is_dirty = GL_TRUE;                               \
+   rmesa->radeon.hw.is_dirty = GL_TRUE;                                \
 } while (0)
 
-#define RADEON_DB_STATE( ATOM )                                \
+#define RADEON_DB_STATE( ATOM )                                \
    memcpy( rmesa->hw.ATOM.lastcmd, rmesa->hw.ATOM.cmd, \
           rmesa->hw.ATOM.cmd_size * 4)
 
-static INLINE int RADEON_DB_STATECHANGE( 
-   r100ContextPtr rmesa,
-   struct radeon_state_atom *atom )
+static INLINE int RADEON_DB_STATECHANGE(r100ContextPtr rmesa,
+                                       struct radeon_state_atom *atom )
 {
    if (memcmp(atom->cmd, atom->lastcmd, atom->cmd_size*4)) {
       GLuint *tmp;
       RADEON_NEWPRIM( rmesa );
       atom->dirty = GL_TRUE;
-      rmesa->hw.is_dirty = GL_TRUE;
+      rmesa->radeon.hw.is_dirty = GL_TRUE;
       tmp = atom->cmd; 
       atom->cmd = atom->lastcmd;
       atom->lastcmd = tmp;
@@ -128,16 +127,6 @@ static INLINE int RADEON_DB_STATECHANGE(
       return 0;
 }
 
-
-/* Fire the buffered vertices no matter what.
- */
-#define RADEON_FIREVERTICES( rmesa )                   \
-do {                                                   \
-   if ( rmesa->store.cmd_used || rmesa->radeon.dma.flush ) {   \
-      radeonFlush( rmesa->radeon.glCtx );                      \
-   }                                                   \
-} while (0)
-
 /* Command lengths.  Note that any time you ensure ELTS_BUFSZ or VBUF_BUFSZ
  * are available, you will also be adding an rmesa->state.max_state_size because
  * r200EmitState is called from within r200EmitVbufPrim and r200FlushElts.