Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_common_context.c
index 71ee06d9a79b99a34e2c9bc3a91525a5f92fb568..71f70d724b9458b9af7675b4997c626783ef0af0 100644 (file)
@@ -47,7 +47,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "swrast_setup/swrast_setup.h"
 #include "tnl/tnl.h"
 
-#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R600) /* +r6/r7 */
+#if defined(RADEON_R600)
 #include "r600_context.h"
 #endif
 
@@ -227,11 +227,8 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
        fthrottle_mode = driQueryOptioni(&radeon->optionCache, "fthrottle_mode");
        radeon->iw.irq_seq = -1;
        radeon->irqsEmitted = 0;
-       if (IS_R600_CLASS(radeon->radeonScreen))
-               radeon->do_irqs = 0;
-       else
-               radeon->do_irqs = (fthrottle_mode == DRI_CONF_FTHROTTLE_IRQS &&
-                                  radeon->radeonScreen->irq);
+       radeon->do_irqs = (fthrottle_mode == DRI_CONF_FTHROTTLE_IRQS &&
+                          radeon->radeonScreen->irq);
 
        radeon->do_usleeps = (fthrottle_mode == DRI_CONF_FTHROTTLE_USLEEPS);
 
@@ -265,10 +262,9 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
                else
                        radeon->texture_row_align = 32;
                radeon->texture_rect_row_align = 64;
-               radeon->texture_compressed_row_align = 64;
+               radeon->texture_compressed_row_align = 32;
        }
 
-       make_empty_list(&radeon->query.not_flushed_head);
        radeon_init_dma(radeon);
 
        return GL_TRUE;
@@ -499,19 +495,7 @@ radeon_make_renderbuffer_current(radeonContextPtr radeon,
 static unsigned
 radeon_bits_per_pixel(const struct radeon_renderbuffer *rb)
 {
-   switch (rb->base._ActualFormat) {
-   case GL_RGB5:
-   case GL_DEPTH_COMPONENT16:
-      return 16;
-   case GL_RGB8:
-   case GL_RGBA8:
-   case GL_DEPTH_COMPONENT24:
-   case GL_DEPTH24_STENCIL8_EXT:
-   case GL_STENCIL_INDEX8_EXT:
-      return 32;
-   default:
-      return 0;
-   }
+   return _mesa_get_format_bytes(rb->base.Format) * 8; 
 }
 
 void