i965: Upload sampler state pointers on Ivybridge.
Since we currently only support sampling in the fragment shader, we only bother to emit the PS variant. In the future we'll need to emit others. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
a94fe79464
commit
bc08d4ebb8
|
@ -846,6 +846,10 @@
|
|||
/* DW2: GS */
|
||||
/* DW3: PS */
|
||||
|
||||
#define _3DSTATE_SAMPLER_STATE_POINTERS_VS 0x782B /* GEN7+ */
|
||||
#define _3DSTATE_SAMPLER_STATE_POINTERS_GS 0x782E /* GEN7+ */
|
||||
#define _3DSTATE_SAMPLER_STATE_POINTERS_PS 0x782F /* GEN7+ */
|
||||
|
||||
#define CMD_VERTEX_BUFFER 0x7808
|
||||
# define BRW_VB0_INDEX_SHIFT 27
|
||||
# define GEN6_VB0_INDEX_SHIFT 26
|
||||
|
|
|
@ -118,6 +118,7 @@ extern const struct brw_tracked_state gen7_clip_state;
|
|||
extern const struct brw_tracked_state gen7_depth_stencil_state_pointer;
|
||||
extern const struct brw_tracked_state gen7_disable_stages;
|
||||
extern const struct brw_tracked_state gen7_ps_state;
|
||||
extern const struct brw_tracked_state gen7_sampler_state;
|
||||
extern const struct brw_tracked_state gen7_sbe_state;
|
||||
extern const struct brw_tracked_state gen7_sf_clip_viewport;
|
||||
extern const struct brw_tracked_state gen7_sf_clip_viewport_state_pointer;
|
||||
|
|
|
@ -208,7 +208,6 @@ const struct brw_tracked_state *gen7_atoms[] =
|
|||
&brw_wm_binding_table,
|
||||
|
||||
&brw_wm_samplers,
|
||||
&gen6_sampler_state,
|
||||
|
||||
&gen7_disable_stages,
|
||||
&gen7_vs_state,
|
||||
|
|
|
@ -160,6 +160,12 @@ upload_ps_state(struct brw_context *brw)
|
|||
OUT_BATCH(brw->wm.bind_bo_offset);
|
||||
ADVANCE_BATCH();
|
||||
|
||||
/* CACHE_NEW_SAMPLER */
|
||||
BEGIN_BATCH(2);
|
||||
OUT_BATCH(_3DSTATE_SAMPLER_STATE_POINTERS_PS << 16 | (2 - 2));
|
||||
OUT_BATCH(brw->wm.sampler_offset);
|
||||
ADVANCE_BATCH();
|
||||
|
||||
/* CACHE_NEW_WM_PROG */
|
||||
if (brw->wm.prog_data->nr_params == 0) {
|
||||
/* Disable the push constant buffers. */
|
||||
|
|
Loading…
Reference in New Issue