X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fi965%2Fgen6_blorp.cpp;h=4222fa87d08edf25f86077426ed1a9b73fd8774e;hb=7a7b8a02bed5a113fd0f8e45acc0eafdd7227b55;hp=441d61fb018d7a78211b905c9a338bc2191a4c8e;hpb=1a928816a1b717201f3b3cc998a42731b280e6ba;p=mesa.git diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp index 441d61fb018..4222fa87d08 100644 --- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp +++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp @@ -254,26 +254,6 @@ gen6_blorp_emit_blend_state(struct brw_context *brw, blend->blend1.write_disable_b = params->color_write_disable[2]; blend->blend1.write_disable_a = params->color_write_disable[3]; - /* When blitting from an XRGB source to a ARGB destination, we need to - * interpret the missing channel as 1.0. Blending can do that for us: - * we simply use the RGB values from the fragment shader ("source RGB"), - * but smash the alpha channel to 1. - */ - if (params->src.mt && - _mesa_get_format_bits(params->dst.mt->format, GL_ALPHA_BITS) > 0 && - _mesa_get_format_bits(params->src.mt->format, GL_ALPHA_BITS) == 0) { - blend->blend0.blend_enable = 1; - blend->blend0.ia_blend_enable = 1; - - blend->blend0.blend_func = BRW_BLENDFUNCTION_ADD; - blend->blend0.ia_blend_func = BRW_BLENDFUNCTION_ADD; - - blend->blend0.source_blend_factor = BRW_BLENDFACTOR_SRC_COLOR; - blend->blend0.dest_blend_factor = BRW_BLENDFACTOR_ZERO; - blend->blend0.ia_source_blend_factor = BRW_BLENDFACTOR_ONE; - blend->blend0.ia_dest_blend_factor = BRW_BLENDFACTOR_ZERO; - } - return cc_blend_state_offset; } @@ -401,7 +381,7 @@ gen6_blorp_emit_surface_state(struct brw_context *brw, /* reloc */ surf[1] = (surface->compute_tile_offsets(&tile_x, &tile_y) + - region->bo->offset); + region->bo->offset64); surf[2] = (0 << BRW_SURFACE_LOD_SHIFT | (width - 1) << BRW_SURFACE_WIDTH_SHIFT | @@ -433,7 +413,7 @@ gen6_blorp_emit_surface_state(struct brw_context *brw, drm_intel_bo_emit_reloc(brw->batch.bo, wm_surf_offset + 4, region->bo, - surf[1] - region->bo->offset, + surf[1] - region->bo->offset64, read_domains, write_domain); return wm_surf_offset; @@ -1010,20 +990,9 @@ gen6_blorp_emit_primitive(struct brw_context *brw, OUT_BATCH(0); OUT_BATCH(0); ADVANCE_BATCH(); -} -static void -gen6_emit_hiz_workaround(struct brw_context *brw, enum gen6_hiz_op hiz_op) -{ - /* This fixes a HiZ hang in WebGL Google Maps. A more minimal fix likely - * exists, but this gets the job done. - */ - if (hiz_op == GEN6_HIZ_OP_DEPTH_RESOLVE || - hiz_op == GEN6_HIZ_OP_HIZ_RESOLVE) { - brw->batch.need_workaround_flush = true; - intel_emit_post_sync_nonzero_flush(brw); - intel_emit_depth_stall_flushes(brw); - } + /* Only used on Sandybridge; harmless to set elsewhere. */ + brw->batch.need_workaround_flush = true; } /** @@ -1048,7 +1017,9 @@ gen6_blorp_exec(struct brw_context *brw, uint32_t prog_offset = params->get_wm_prog(brw, &prog_data); - gen6_emit_hiz_workaround(brw, params->hiz_op); + /* Emit workaround flushes when we switch from drawing to blorping. */ + brw->batch.need_workaround_flush = true; + gen6_emit_3dstate_multisample(brw, params->dst.num_samples); gen6_emit_3dstate_sample_mask(brw, params->dst.num_samples > 1 ?