i965: fix scissor state on sandybridge

Fix incorrect scissor rect struct and missed scissor state pointer
setting for sandybridge.
(cherry picked from commit 4b6b0bf24a)
This commit is contained in:
Zhenyu Wang 2010-09-28 15:35:22 +08:00 committed by Ian Romanick
parent 40dc275431
commit f736d85a5a
4 changed files with 8 additions and 5 deletions

View file

@ -102,6 +102,7 @@ extern const struct brw_tracked_state gen6_depth_stencil_state;
extern const struct brw_tracked_state gen6_gs_state;
extern const struct brw_tracked_state gen6_sampler_state;
extern const struct brw_tracked_state gen6_scissor_state;
extern const struct brw_tracked_state gen6_scissor_state_pointers;
extern const struct brw_tracked_state gen6_sf_state;
extern const struct brw_tracked_state gen6_sf_vp;
extern const struct brw_tracked_state gen6_urb;

View file

@ -145,6 +145,7 @@ const struct brw_tracked_state *gen6_atoms[] =
&gen6_wm_state,
&gen6_scissor_state,
&gen6_scissor_state_pointers,
&brw_state_base_address,

View file

@ -909,10 +909,12 @@ struct brw_sf_unit_state
};
struct gen6_scissor_state
struct gen6_scissor_rect
{
GLuint ymin, xmin;
GLuint ymax, xmax;
GLuint xmin:16;
GLuint ymin:16;
GLuint xmax:16;
GLuint ymax:16;
};
struct brw_gs_unit_state

View file

@ -35,7 +35,7 @@ prepare_scissor_state(struct brw_context *brw)
{
GLcontext *ctx = &brw->intel.ctx;
const GLboolean render_to_fbo = (ctx->DrawBuffer->Name != 0);
struct gen6_scissor_state scissor;
struct gen6_scissor_rect scissor;
/* _NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT */
@ -84,7 +84,6 @@ static void upload_scissor_state_pointers(struct brw_context *brw)
OUT_RELOC(brw->sf.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
ADVANCE_BATCH();
intel_batchbuffer_emit_mi_flush(intel->batch);
}