There were no other cases that set it any more.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
brw_eu_debug.c \
brw_eu_emit.c \
brw_eu_util.c \
- brw_fallback.c \
brw_gs.c \
brw_gs_emit.c \
brw_gs_state.c \
if (brw->state.dirty.brw) {
intel->no_batch_wrap = true;
brw_upload_state(brw);
-
- if (unlikely(brw->intel.Fallback)) {
- intel->no_batch_wrap = false;
- retval = false;
- goto out;
- }
}
if (intel->gen >= 7)
if (intel->always_flush_batch)
intel_batchbuffer_flush(intel);
- out:
brw_state_cache_check_size(brw);
brw_postdraw_set_buffers_need_resolve(brw);
struct gl_transform_feedback_object *tfb_vertcount )
{
const struct gl_client_array **arrays = ctx->Array._DrawArrays;
- bool retval;
if (!_mesa_check_conditional_render(ctx))
return;
}
}
- /* Make a first attempt at drawing:
- */
- retval = brw_try_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
-
- /* Otherwise, we really are out of memory. Pass the drawing
- * command to the software tnl module and which will in turn call
- * swrast to do the drawing.
+ /* Do GL_SELECT and GL_FEEDBACK rendering using swrast, even though it
+ * won't support all the extensions we support.
*/
- if (!retval) {
- _swsetup_Wakeup(ctx);
- _tnl_wakeup(ctx);
+ if (ctx->RenderMode != GL_RENDER) {
+ perf_debug("%s render mode not supported in hardware\n",
+ _mesa_lookup_enum_by_nr(ctx->RenderMode));
+ _swsetup_Wakeup(ctx);
+ _tnl_wakeup(ctx);
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
+ return;
}
+ /* Try drawing with the hardware, but don't do anything else if we can't
+ * manage it. swrast doesn't support our featureset, so we can't fall back
+ * to it.
+ */
+ brw_try_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
}
void brw_draw_init( struct brw_context *brw )
+++ /dev/null
-/**************************************************************************
- *
- * Copyright 2005 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-#include "main/glheader.h"
-#include "main/context.h"
-#include "main/enums.h"
-#include "main/imports.h"
-#include "main/macros.h"
-#include "main/mtypes.h"
-
-#include "swrast_setup/swrast_setup.h"
-#include "swrast/swrast.h"
-#include "tnl/tnl.h"
-#include "brw_context.h"
-
-#define FILE_DEBUG_FLAG DEBUG_PERF
-
-static bool do_check_fallback(struct brw_context *brw)
-{
- struct gl_context *ctx = &brw->intel.ctx;
-
- /* _NEW_RENDERMODE
- */
- if (ctx->RenderMode != GL_RENDER) {
- DBG("FALLBACK: render mode\n");
- return true;
- }
-
- return false;
-}
-
-static void check_fallback(struct brw_context *brw)
-{
- brw->intel.Fallback = do_check_fallback(brw);
-}
-
-const struct brw_tracked_state brw_check_fallback = {
- .dirty = {
- .mesa = _NEW_RENDERMODE | _NEW_STENCIL,
- .brw = 0,
- .cache = 0
- },
- .emit = check_fallback
-};
-
-
-
-
-/**
- * Called by the INTEL_FALLBACK() macro.
- * NOTE: this is a no-op for the i965 driver. The brw->intel.Fallback
- * field is treated as a boolean, not a bitmask. It's only set in a
- * couple of places.
- */
-void intelFallback( struct intel_context *intel, GLuint bit, bool mode )
-{
-}
-
-
-
extern const struct brw_tracked_state brw_blend_constant_color;
extern const struct brw_tracked_state brw_cc_vp;
extern const struct brw_tracked_state brw_cc_unit;
-extern const struct brw_tracked_state brw_check_fallback;
extern const struct brw_tracked_state brw_clip_prog;
extern const struct brw_tracked_state brw_clip_unit;
extern const struct brw_tracked_state brw_vs_pull_constants;
*/
static const struct brw_tracked_state *gen4_atoms[] =
{
- &brw_check_fallback,
-
&brw_wm_input_sizes,
&brw_vs_prog, /* must do before GS prog, state base address. */
&brw_gs_prog, /* must do before state base address */
static const struct brw_tracked_state *gen6_atoms[] =
{
- &brw_check_fallback,
-
&brw_wm_input_sizes,
&brw_vs_prog, /* must do before state base address */
&brw_gs_prog, /* must do before state base address */
const struct brw_tracked_state *gen7_atoms[] =
{
- &brw_check_fallback,
-
&brw_wm_input_sizes,
&brw_vs_prog,
&brw_wm_prog,
if ((state->mesa | state->cache | state->brw) == 0)
return;
- brw->intel.Fallback = false; /* boolean, not bitfield */
-
intel_check_front_buffer_rendering(intel);
if (unlikely(INTEL_DEBUG)) {
const struct brw_tracked_state *atom = brw->atoms[i];
struct brw_state_flags generated;
- if (brw->intel.Fallback)
- break;
-
if (check_state(state, &atom->dirty)) {
atom->emit(brw);
}
for (i = 0; i < brw->num_atoms; i++) {
const struct brw_tracked_state *atom = brw->atoms[i];
- if (brw->intel.Fallback)
- break;
-
if (check_state(state, &atom->dirty)) {
atom->emit(brw);
}
}
}
- if (!brw->intel.Fallback)
- memset(state, 0, sizeof(*state));
+ memset(state, 0, sizeof(*state));
}