summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-04-19 21:40:48 -0700
committerEric Anholt <[email protected]>2011-04-23 13:21:57 -0700
commit1df72402d99145425531297eef6772b88ce5225d (patch)
tree3c01ffc518e210138cd7c0bbd0d7a3726fc4d3f5 /src
parent332822bd3d8c43cc81686148c0857b8df697341e (diff)
i965: Add support for NV_conditional_render.
Since we lack hardware support for it, this is a simple matter of checking _mesa_check_conditional_render at the entrypoints, and suppressing it for the metaops where it doesn't apply. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c4
5 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 2db70c543ea..4dd0c8203dd 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -28,6 +28,7 @@
#include "main/glheader.h"
#include "main/context.h"
+#include "main/condrender.h"
#include "main/state.h"
#include "main/enums.h"
#include "tnl/tnl.h"
@@ -438,6 +439,9 @@ void brw_draw_prims( struct gl_context *ctx,
{
GLboolean retval;
+ if (!_mesa_check_conditional_render(ctx))
+ return;
+
if (!vbo_all_varyings_in_vbos(arrays)) {
if (!index_bounds_valid)
vbo_get_minmax_index(ctx, prim, ib, &min_index, &max_index);
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index 82d29e76712..5a96232107e 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -28,6 +28,7 @@
#include "main/glheader.h"
#include "main/mtypes.h"
+#include "main/condrender.h"
#include "swrast/swrast.h"
#include "drivers/common/meta.h"
@@ -88,6 +89,9 @@ intelClear(struct gl_context *ctx, GLbitfield mask)
struct intel_renderbuffer *irb;
int i;
+ if (!_mesa_check_conditional_render(ctx))
+ return;
+
if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT)) {
intel->front_buffer_dirty = GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 6a818577a55..c24bc99f904 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -190,6 +190,7 @@ static const struct dri_extension brw_extensions[] = {
{ "GL_ATI_envmap_bumpmap", GL_ATI_envmap_bumpmap_functions },
{ "GL_ATI_separate_stencil", GL_ATI_separate_stencil_functions },
{ "GL_ATI_texture_env_combine3", NULL },
+ { "GL_NV_conditional_render", NULL },
{ "GL_NV_texture_env_combine4", NULL },
{ NULL, NULL }
};
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index 43cdd0d2bac..0012f19db1c 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -29,6 +29,7 @@
#include "main/enums.h"
#include "main/image.h"
#include "main/colormac.h"
+#include "main/condrender.h"
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/pbo.h"
@@ -329,6 +330,9 @@ intelBitmap(struct gl_context * ctx,
{
struct intel_context *intel = intel_context(ctx);
+ if (!_mesa_check_conditional_render(ctx))
+ return;
+
if (do_blit_bitmap(ctx, x, y, width, height,
unpack, pixels))
return;
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index a7ca780e944..e83f1bfab94 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
@@ -29,6 +29,7 @@
#include "main/image.h"
#include "main/state.h"
#include "main/mtypes.h"
+#include "main/condrender.h"
#include "drivers/common/meta.h"
#include "intel_context.h"
@@ -204,6 +205,9 @@ intelCopyPixels(struct gl_context * ctx,
{
DBG("%s\n", __FUNCTION__);
+ if (!_mesa_check_conditional_render(ctx))
+ return;
+
if (do_blit_copypixels(ctx, srcx, srcy, width, height, destx, desty, type))
return;