Merge commit 'origin/7.8'
[mesa.git] / src / mesa / drivers / dri / r300 / r300_context.c
index ff35cd52753cb139d8d66bf3372456481e6cdf02..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)
@@ -321,6 +324,12 @@ static void r300_init_vtbl(radeonContextPtr radeon)
 
        radeon->vtbl.check_blit = r300_check_blit;
        radeon->vtbl.blit = r300_blit;
+
+       if (radeon->radeonScreen->chip_family >= CHIP_FAMILY_RV515) {
+               radeon->vtbl.is_format_renderable = r500IsFormatRenderable;
+       } else {
+               radeon->vtbl.is_format_renderable = r300IsFormatRenderable;
+       }
 }
 
 static void r300InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
@@ -494,7 +503,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
 
        _mesa_init_driver_functions(&functions);
        r300InitIoctlFuncs(&functions);
-       r300InitStateFuncs(&functions);
+       r300InitStateFuncs(&r300->radeon, &functions);
        r300InitTextureFuncs(&r300->radeon, &functions);
        r300InitShaderFuncs(&functions);
        radeonInitQueryObjFunctions(&functions);