mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
Merge branch 'mesa_7_0_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into mesa_7_0_branch
This commit is contained in:
commit
e8ccc7cc49
4 changed files with 41 additions and 37 deletions
|
|
@ -428,10 +428,12 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
|
|||
|
||||
if (pdp->pClipRects) {
|
||||
_mesa_free(pdp->pClipRects);
|
||||
pdp->pClipRects = NULL;
|
||||
}
|
||||
|
||||
if (pdp->pBackClipRects) {
|
||||
_mesa_free(pdp->pBackClipRects);
|
||||
pdp->pBackClipRects = NULL;
|
||||
}
|
||||
|
||||
DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
|
||||
|
|
|
|||
|
|
@ -316,7 +316,8 @@ intelWindowMoved(struct intel_context *intel)
|
|||
flags = intel_fb->vblank_flags & ~VBLANK_FLAG_SECONDARY;
|
||||
}
|
||||
|
||||
if (flags != intel_fb->vblank_flags) {
|
||||
if (flags != intel_fb->vblank_flags && intel_fb->vblank_flags &&
|
||||
!(intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ)) {
|
||||
drmVBlank vbl;
|
||||
int i;
|
||||
|
||||
|
|
@ -327,7 +328,9 @@ intelWindowMoved(struct intel_context *intel)
|
|||
}
|
||||
|
||||
for (i = 0; i < intel_fb->pf_num_pages; i++) {
|
||||
if (!intel_fb->color_rb[i])
|
||||
if (!intel_fb->color_rb[i] ||
|
||||
(intel_fb->vbl_waited - intel_fb->color_rb[i]->vbl_pending) <=
|
||||
(1<<23))
|
||||
continue;
|
||||
|
||||
vbl.request.sequence = intel_fb->color_rb[i]->vbl_pending;
|
||||
|
|
@ -828,7 +831,8 @@ intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target)
|
|||
drm_i915_vblank_swap_t swap;
|
||||
GLboolean ret;
|
||||
|
||||
if ((intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) ||
|
||||
if (!intel_fb->vblank_flags ||
|
||||
(intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) ||
|
||||
intelScreen->current_rotation != 0 ||
|
||||
intelScreen->drmMinor < (intel_fb->pf_active ? 9 : 6))
|
||||
return GL_FALSE;
|
||||
|
|
|
|||
|
|
@ -607,12 +607,23 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
|
|||
if (intel->ctx.DrawBuffer == &intel_fb->Base) {
|
||||
|
||||
if (intel->driDrawable != driDrawPriv) {
|
||||
intel_fb->vblank_flags = (intel->intelScreen->irq_active != 0)
|
||||
? driGetDefaultVBlankFlags(&intel->optionCache)
|
||||
: VBLANK_FLAG_NO_IRQ;
|
||||
(*dri_interface->getUST) (&intel_fb->swap_ust);
|
||||
driDrawableInitVBlank(driDrawPriv, intel_fb->vblank_flags,
|
||||
&intel_fb->vbl_seq);
|
||||
if (driDrawPriv->pdraw->swap_interval == (unsigned)-1) {
|
||||
int i;
|
||||
|
||||
intel_fb->vblank_flags = (intel->intelScreen->irq_active != 0)
|
||||
? driGetDefaultVBlankFlags(&intel->optionCache)
|
||||
: VBLANK_FLAG_NO_IRQ;
|
||||
|
||||
(*dri_interface->getUST) (&intel_fb->swap_ust);
|
||||
driDrawableInitVBlank(driDrawPriv, intel_fb->vblank_flags,
|
||||
&intel_fb->vbl_seq);
|
||||
intel_fb->vbl_waited = intel_fb->vbl_seq;
|
||||
|
||||
for (i = 0; i < (intel->intelScreen->third.handle ? 3 : 2); i++) {
|
||||
if (intel_fb->color_rb[i])
|
||||
intel_fb->color_rb[i]->vbl_pending = intel_fb->vbl_seq;
|
||||
}
|
||||
}
|
||||
intel->driDrawable = driDrawPriv;
|
||||
intelWindowMoved(intel);
|
||||
}
|
||||
|
|
@ -658,37 +669,27 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
|
|||
if (sarea->width != intel->width ||
|
||||
sarea->height != intel->height ||
|
||||
sarea->rotation != intel->current_rotation) {
|
||||
|
||||
void *batchMap = intel->batch->map;
|
||||
|
||||
int numClipRects = intel->numClipRects;
|
||||
|
||||
/*
|
||||
* FIXME: Really only need to do this when drawing to a
|
||||
* common back- or front buffer.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This will drop the outstanding batchbuffer on the floor
|
||||
* This will essentially drop the outstanding batchbuffer on the floor.
|
||||
*/
|
||||
intel->numClipRects = 0;
|
||||
|
||||
if (batchMap != NULL) {
|
||||
driBOUnmap(intel->batch->buffer);
|
||||
intel->batch->map = NULL;
|
||||
}
|
||||
if (intel->Fallback)
|
||||
_swrast_flush(&intel->ctx);
|
||||
|
||||
intel_batchbuffer_reset(intel->batch);
|
||||
INTEL_FIREVERTICES(intel);
|
||||
|
||||
if (batchMap == NULL) {
|
||||
driBOUnmap(intel->batch->buffer);
|
||||
intel->batch->map = NULL;
|
||||
}
|
||||
if (intel->batch->map != intel->batch->ptr)
|
||||
intel_batchbuffer_flush(intel->batch);
|
||||
|
||||
/* lose all primitives */
|
||||
intel->prim.primitive = ~0;
|
||||
intel->prim.start_ptr = 0;
|
||||
intel->prim.flush = 0;
|
||||
|
||||
/* re-emit all state */
|
||||
intel->vtbl.lost_hardware(intel);
|
||||
intel->numClipRects = numClipRects;
|
||||
|
||||
/* force window update */
|
||||
intel->lastStamp = 0;
|
||||
|
|
@ -729,7 +730,9 @@ void LOCK_HARDWARE( struct intel_context *intel )
|
|||
BUFFER_BACK_LEFT);
|
||||
}
|
||||
|
||||
if (intel_rb && (intel_fb->vbl_waited - intel_rb->vbl_pending) > (1<<23)) {
|
||||
if (intel_rb && intel_fb->vblank_flags &&
|
||||
!(intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) &&
|
||||
(intel_fb->vbl_waited - intel_rb->vbl_pending) > (1<<23)) {
|
||||
drmVBlank vbl;
|
||||
|
||||
vbl.request.type = DRM_VBLANK_ABSOLUTE;
|
||||
|
|
|
|||
|
|
@ -104,12 +104,7 @@ static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS exp)
|
|||
|
||||
static void check_os_sse_support( void )
|
||||
{
|
||||
#if defined(__linux__)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
|
||||
_mesa_debug(NULL, "Cannot safely enable SSE on pre-2.4 kernels.\n");
|
||||
_mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
|
||||
#endif
|
||||
#elif defined(__FreeBSD__)
|
||||
#if defined(__FreeBSD__)
|
||||
{
|
||||
int ret, enabled;
|
||||
unsigned int len;
|
||||
|
|
@ -160,7 +155,7 @@ static void check_os_sse_support( void )
|
|||
/* Do nothing on other platforms for now.
|
||||
*/
|
||||
_mesa_debug(NULL, "Not testing OS support for SSE, leaving enabled.\n");
|
||||
#endif /* __linux__ */
|
||||
#endif /* __FreeBSD__ */
|
||||
}
|
||||
|
||||
#endif /* USE_SSE_ASM */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue