mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 09:20:13 +01:00
i965: Don't bother telling tnl about state updates unless we fall back.
This was sucking up 1% of the CPU on 3DMMES. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
18d4a44bdc
commit
6cf3d1cace
4 changed files with 18 additions and 2 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include "intel_regions.h"
|
||||
#include "intel_tris.h"
|
||||
#include "intel_fbo.h"
|
||||
#include "tnl/tnl.h"
|
||||
#include "tnl/t_context.h"
|
||||
#include "tnl/t_vertex.h"
|
||||
|
||||
|
|
@ -715,6 +716,11 @@ i830_assert_not_dirty( struct intel_context *intel )
|
|||
static void
|
||||
i830_invalidate_state(struct intel_context *intel, GLuint new_state)
|
||||
{
|
||||
struct gl_context *ctx = &intel->ctx;
|
||||
|
||||
_tnl_InvalidateState(ctx, new_state);
|
||||
_tnl_invalidate_vertex_state(ctx, new_state);
|
||||
|
||||
if (new_state & _NEW_LIGHT)
|
||||
i830_update_provoking_vertex(&intel->ctx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "main/macros.h"
|
||||
#include "main/colormac.h"
|
||||
|
||||
#include "tnl/tnl.h"
|
||||
#include "tnl/t_context.h"
|
||||
#include "tnl/t_vertex.h"
|
||||
|
||||
|
|
@ -703,6 +704,15 @@ i915_is_hiz_depth_format(struct intel_context *intel,
|
|||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
i915_invalidate_state(struct intel_context *intel, GLuint new_state)
|
||||
{
|
||||
struct gl_context *ctx = &intel->ctx;
|
||||
|
||||
_tnl_InvalidateState(ctx, new_state);
|
||||
_tnl_invalidate_vertex_state(ctx, new_state);
|
||||
}
|
||||
|
||||
void
|
||||
i915InitVtbl(struct i915_context *i915)
|
||||
{
|
||||
|
|
@ -717,6 +727,7 @@ i915InitVtbl(struct i915_context *i915)
|
|||
i915->intel.vtbl.update_texture_state = i915UpdateTextureState;
|
||||
i915->intel.vtbl.assert_not_dirty = i915_assert_not_dirty;
|
||||
i915->intel.vtbl.finish_batch = intel_finish_vb;
|
||||
i915->intel.vtbl.invalidate_state = i915_invalidate_state;
|
||||
i915->intel.vtbl.render_target_supported = i915_render_target_supported;
|
||||
i915->intel.vtbl.is_hiz_depth_format = i915_is_hiz_depth_format;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -436,6 +436,7 @@ void brw_draw_prims( struct gl_context *ctx,
|
|||
*/
|
||||
if (!retval) {
|
||||
_swsetup_Wakeup(ctx);
|
||||
_tnl_wakeup(ctx);
|
||||
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -506,8 +506,6 @@ intelInvalidateState(struct gl_context * ctx, GLuint new_state)
|
|||
_swrast_InvalidateState(ctx, new_state);
|
||||
_swsetup_InvalidateState(ctx, new_state);
|
||||
_vbo_InvalidateState(ctx, new_state);
|
||||
_tnl_InvalidateState(ctx, new_state);
|
||||
_tnl_invalidate_vertex_state(ctx, new_state);
|
||||
|
||||
intel->NewGLState |= new_state;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue