Merge commit 'origin/7.8'
authorMaciej Cencora <m.cencora@gmail.com>
Sun, 11 Apr 2010 12:12:13 +0000 (14:12 +0200)
committerMaciej Cencora <m.cencora@gmail.com>
Sun, 11 Apr 2010 12:12:13 +0000 (14:12 +0200)
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_render.c
src/mesa/drivers/dri/r300/r300_render.h
src/mesa/drivers/dri/radeon/radeon_chipset.h
src/mesa/drivers/dri/radeon/radeon_screen.c

index cfeb5407e914499b4833bd9573ca7a9275a20a01..4dce454c3a757aab7b511ec2d0a4904a2004b662 100644 (file)
@@ -61,6 +61,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r300_state.h"
 #include "r300_tex.h"
 #include "r300_emit.h"
+#include "r300_render.h"
 #include "r300_swtcl.h"
 #include "radeon_bocs_wrapper.h"
 #include "radeon_buffer_objects.h"
@@ -226,6 +227,8 @@ static void r300_fallback(GLcontext *ctx, GLuint bit, GLboolean mode)
                r300->radeon.Fallback |= bit;
        else
                r300->radeon.Fallback &= ~bit;
+
+       r300SwitchFallback(ctx, R300_FALLBACK_RADEON_COMMON, mode);
 }
 
 static void r300_emit_query_finish(radeonContextPtr radeon)
index 959613148631c80db4f166ab22a5bdff6ea6ac23..bb8f91491f556dddf00e2c64bcf6a9327b44cc88 100644 (file)
@@ -386,6 +386,14 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
                        WARN_ONCE("Fixme: can't handle spliting prim %d\n", prim);
                        return;
                }
+
+               if (rmesa->radeon.radeonScreen->kernel_mm) {
+                       BEGIN_BATCH_NO_AUTOSTATE(2);
+                       OUT_BATCH_REGSEQ(R300_VAP_VF_MAX_VTX_INDX, 1);
+                       OUT_BATCH(rmesa->radeon.tcl.aos[0].count);
+                       END_BATCH();
+               }
+
                r300_emit_scissor(rmesa->radeon.glCtx);
                while (num_verts > 0) {
                        int nr;
@@ -400,8 +408,9 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
        COMMIT_BATCH();
 }
 
-static const char *getFallbackString(uint32_t bit)
+static const char *getFallbackString(r300ContextPtr rmesa, uint32_t bit)
 {
+       static char common_fallback_str[32];
        switch (bit) {
                case R300_FALLBACK_VERTEX_PROGRAM :
                        return "vertex program";
@@ -421,6 +430,9 @@ static const char *getFallbackString(uint32_t bit)
                        return "render mode != GL_RENDER";
                case R300_FALLBACK_FRAGMENT_PROGRAM:
                        return "fragment program";
+               case R300_FALLBACK_RADEON_COMMON:
+                       snprintf(common_fallback_str, 32, "radeon common 0x%08x", rmesa->radeon.Fallback);
+                       return common_fallback_str;
                case R300_FALLBACK_AOS_LIMIT:
                        return "aos limit";
                case R300_FALLBACK_INVALID_BUFFERS:
@@ -440,7 +452,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
        if (mode) {
                if ((fallback_warn & bit) == 0) {
                        if (RADEON_DEBUG & RADEON_FALLBACKS)
-                               fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(bit));
+                               fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(rmesa, bit));
                        fallback_warn |= bit;
                }
                rmesa->fallback |= bit;
index ec785474a677603d0b96b1bea6b82b17d02be6b2..581e9fa0ccde12c2564b42ef5bf6138c760d9054 100644 (file)
@@ -41,6 +41,7 @@
 #define R300_FALLBACK_STENCIL_TWOSIDE   (1 << 21)
 #define R300_FALLBACK_RENDER_MODE       (1 << 22)
 #define R300_FALLBACK_FRAGMENT_PROGRAM  (1 << 23)
+#define R300_FALLBACK_RADEON_COMMON     (1 << 29)
 #define R300_FALLBACK_AOS_LIMIT         (1 << 30)
 #define R300_FALLBACK_INVALID_BUFFERS   (1 << 31)
 #define R300_RASTER_FALLBACK_MASK        0xffff0000
index f17a305bce81ff065a57bd0239aa5c7fbbfff964..98732c810c56184eb28a5613abc64f122af081a0 100644 (file)
 #define PCI_CHIP_RV770_9456             0x9456
 #define PCI_CHIP_RV770_945A             0x945A
 #define PCI_CHIP_RV770_945B             0x945B
+#define PCI_CHIP_RV770_945E             0x945E
 #define PCI_CHIP_RV790_9460             0x9460
 #define PCI_CHIP_RV790_9462             0x9462
 #define PCI_CHIP_RV770_946A             0x946A
 #define PCI_CHIP_RV730_9487             0x9487
 #define PCI_CHIP_RV730_9488             0x9488
 #define PCI_CHIP_RV730_9489             0x9489
+#define PCI_CHIP_RV730_948A             0x948A
 #define PCI_CHIP_RV730_948F             0x948F
 #define PCI_CHIP_RV730_9490             0x9490
 #define PCI_CHIP_RV730_9491             0x9491
 #define PCI_CHIP_RV710_9553             0x9553
 #define PCI_CHIP_RV710_9555             0x9555
 #define PCI_CHIP_RV710_9557             0x9557
+#define PCI_CHIP_RV710_955F             0x955F
 
 #define PCI_CHIP_RV740_94A0             0x94A0
 #define PCI_CHIP_RV740_94A1             0x94A1
index 6415ec1239c708f6768c34d8c94c73d9cebdbc68..4d7255f47e78c58c65fda685e29edc560c4e8382 100644 (file)
@@ -846,6 +846,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
    case PCI_CHIP_RV770_9456:
    case PCI_CHIP_RV770_945A:
    case PCI_CHIP_RV770_945B:
+   case PCI_CHIP_RV770_945E:
    case PCI_CHIP_RV790_9460:
    case PCI_CHIP_RV790_9462:
    case PCI_CHIP_RV770_946A:
@@ -860,6 +861,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
    case PCI_CHIP_RV730_9487:
    case PCI_CHIP_RV730_9488:
    case PCI_CHIP_RV730_9489:
+   case PCI_CHIP_RV730_948A:
    case PCI_CHIP_RV730_948F:
    case PCI_CHIP_RV730_9490:
    case PCI_CHIP_RV730_9491:
@@ -881,6 +883,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
    case PCI_CHIP_RV710_9553:
    case PCI_CHIP_RV710_9555:
    case PCI_CHIP_RV710_9557:
+   case PCI_CHIP_RV710_955F:
       screen->chip_family = CHIP_FAMILY_RV710;
       screen->chip_flags = RADEON_CHIPSET_TCL;
       break;