mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
Ensure that color buffers and textures are mapped (bmBufferMap) before
software rasterizer fallbacks. This has two functions, firstly to ensure that the Data pointers point to something and secondly to ensure than any pending fences on those buffers are discharged before allowing the software rasterizer to read/write the data. This needs to be integrated with Brian's validate code.
This commit is contained in:
parent
baf5998d59
commit
a49c3c0fae
1 changed files with 35 additions and 2 deletions
|
|
@ -31,12 +31,14 @@
|
||||||
#include "colormac.h"
|
#include "colormac.h"
|
||||||
|
|
||||||
#include "intel_screen.h"
|
#include "intel_screen.h"
|
||||||
|
|
||||||
#include "intel_span.h"
|
#include "intel_span.h"
|
||||||
|
#include "intel_regions.h"
|
||||||
#include "intel_ioctl.h"
|
#include "intel_ioctl.h"
|
||||||
|
#include "intel_tex.h"
|
||||||
|
|
||||||
#include "swrast/swrast.h"
|
#include "swrast/swrast.h"
|
||||||
|
|
||||||
|
#undef DBG
|
||||||
#define DBG 0
|
#define DBG 0
|
||||||
|
|
||||||
#define LOCAL_VARS \
|
#define LOCAL_VARS \
|
||||||
|
|
@ -205,16 +207,47 @@ do { \
|
||||||
void intelSpanRenderStart( GLcontext *ctx )
|
void intelSpanRenderStart( GLcontext *ctx )
|
||||||
{
|
{
|
||||||
intelContextPtr intel = INTEL_CONTEXT(ctx);
|
intelContextPtr intel = INTEL_CONTEXT(ctx);
|
||||||
|
GLuint i;
|
||||||
|
|
||||||
intelFlush(&intel->ctx);
|
intelFlush(&intel->ctx);
|
||||||
LOCK_HARDWARE(intel);
|
LOCK_HARDWARE(intel);
|
||||||
intelWaitForIdle(intel);
|
intelWaitForIdle(intel);
|
||||||
|
|
||||||
|
/* Just map the framebuffer and all textures. Bufmgr code will
|
||||||
|
* take care of waiting on the necessary fences:
|
||||||
|
*/
|
||||||
|
intel_region_map(intel, intel->front_region);
|
||||||
|
intel_region_map(intel, intel->back_region);
|
||||||
|
intel_region_map(intel, intel->depth_region);
|
||||||
|
|
||||||
|
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
|
||||||
|
if (ctx->Texture.Unit[i]._ReallyEnabled) {
|
||||||
|
struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current;
|
||||||
|
intel_tex_map_images(intel, intel_texture_object(texObj));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void intelSpanRenderFinish( GLcontext *ctx )
|
void intelSpanRenderFinish( GLcontext *ctx )
|
||||||
{
|
{
|
||||||
intelContextPtr intel = INTEL_CONTEXT( ctx );
|
intelContextPtr intel = INTEL_CONTEXT( ctx );
|
||||||
|
GLuint i;
|
||||||
|
|
||||||
_swrast_flush( ctx );
|
_swrast_flush( ctx );
|
||||||
|
|
||||||
|
/* Now unmap the framebuffer:
|
||||||
|
*/
|
||||||
|
intel_region_unmap(intel, intel->front_region);
|
||||||
|
intel_region_unmap(intel, intel->back_region);
|
||||||
|
intel_region_unmap(intel, intel->depth_region);
|
||||||
|
|
||||||
|
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
|
||||||
|
if (ctx->Texture.Unit[i]._ReallyEnabled) {
|
||||||
|
struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current;
|
||||||
|
intel_tex_unmap_images(intel, intel_texture_object(texObj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UNLOCK_HARDWARE( intel );
|
UNLOCK_HARDWARE( intel );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue