diff options
author | Kenneth Graunke <[email protected]> | 2014-07-26 20:49:32 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-08-02 05:16:41 -0700 |
commit | 3d1a4d1f5b26400878fa99c723759a2c54721de2 (patch) | |
tree | eb27fc1adbe52183e639a86130508886850f4928 /src/mesa/drivers/dri/i965/gen7_blorp.cpp | |
parent | 6b5b78b518c2b55bffec25f794de043a408976e0 (diff) |
i965: Make BLORP use brw_emit_sampler_state().
This simplifies the code, removes use of the old structures, and also
allows us to combine the Gen6 and Gen7+ code.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_blorp.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_blorp.cpp | 59 |
1 files changed, 1 insertions, 58 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp index 0ad570b44f4..1cf55fd4cf5 100644 --- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp +++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp @@ -223,63 +223,6 @@ gen7_blorp_emit_surface_state(struct brw_context *brw, } -/** - * SAMPLER_STATE. See gen7_update_sampler_state(). - */ -static uint32_t -gen7_blorp_emit_sampler_state(struct brw_context *brw, - const brw_blorp_params *params) -{ - uint32_t sampler_offset; - - struct gen7_sampler_state *sampler = (struct gen7_sampler_state *) - brw_state_batch(brw, AUB_TRACE_SAMPLER_STATE, - sizeof(struct gen7_sampler_state), - 32, &sampler_offset); - memset(sampler, 0, sizeof(*sampler)); - - sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR; - sampler->ss0.mip_filter = BRW_MIPFILTER_NONE; - sampler->ss0.mag_filter = BRW_MAPFILTER_LINEAR; - - sampler->ss3.r_wrap_mode = BRW_TEXCOORDMODE_CLAMP; - sampler->ss3.s_wrap_mode = BRW_TEXCOORDMODE_CLAMP; - sampler->ss3.t_wrap_mode = BRW_TEXCOORDMODE_CLAMP; - - // sampler->ss0.min_mag_neq = 1; - - /* Set LOD bias: - */ - sampler->ss0.lod_bias = 0; - - sampler->ss0.lod_preclamp = 1; /* OpenGL mode */ - sampler->ss0.default_color_mode = 0; /* OpenGL/DX10 mode */ - - /* Set BaseMipLevel, MaxLOD, MinLOD: - * - * XXX: I don't think that using firstLevel, lastLevel works, - * because we always setup the surface state as if firstLevel == - * level zero. Probably have to subtract firstLevel from each of - * these: - */ - sampler->ss0.base_level = U_FIXED(0, 1); - - sampler->ss1.max_lod = U_FIXED(0, 8); - sampler->ss1.min_lod = U_FIXED(0, 8); - - sampler->ss3.non_normalized_coord = 1; - - sampler->ss3.address_round |= BRW_ADDRESS_ROUNDING_ENABLE_U_MIN | - BRW_ADDRESS_ROUNDING_ENABLE_V_MIN | - BRW_ADDRESS_ROUNDING_ENABLE_R_MIN; - sampler->ss3.address_round |= BRW_ADDRESS_ROUNDING_ENABLE_U_MAG | - BRW_ADDRESS_ROUNDING_ENABLE_V_MAG | - BRW_ADDRESS_ROUNDING_ENABLE_R_MAG; - - return sampler_offset; -} - - /* 3DSTATE_VS * * Disable vertex shader. @@ -898,7 +841,7 @@ gen7_blorp_exec(struct brw_context *brw, gen6_blorp_emit_binding_table(brw, params, wm_surf_offset_renderbuffer, wm_surf_offset_texture); - sampler_offset = gen7_blorp_emit_sampler_state(brw, params); + sampler_offset = gen6_blorp_emit_sampler_state(brw, params); } gen7_blorp_emit_vs_disable(brw, params); gen7_blorp_emit_hs_disable(brw, params); |