case 9:
brw->blorp.exec = gen9_blorp_exec;
break;
- case 10:
- brw->blorp.exec = gen10_blorp_exec;
- break;
case 11:
brw->blorp.exec = gen11_blorp_exec;
break;
* surface. Without one, it does nothing.
*/
surf->clear_color =
- intel_miptree_get_clear_color(devinfo, mt, mt->surf.format,
- !is_render_target, (struct brw_bo **)
+ intel_miptree_get_clear_color(mt, (struct brw_bo **)
&surf->clear_color_addr.buffer,
&surf->clear_color_addr.offset);
case 11:
brw->vtbl.emit_raw_pipe_control = gen11_emit_raw_pipe_control;
break;
- case 10:
- brw->vtbl.emit_raw_pipe_control = gen10_emit_raw_pipe_control;
- break;
case 9:
brw->vtbl.emit_raw_pipe_control = gen9_emit_raw_pipe_control;
break;
devinfo->is_g4x ? gen45_emit_raw_pipe_control
: gen4_emit_raw_pipe_control;
break;
+ default:
+ unreachable("Unhandled Gen.");
}
if (devinfo->gen < 6)
if (devinfo->gen >= 11)
gen11_init_atoms(brw);
else if (devinfo->gen >= 10)
- gen10_init_atoms(brw);
+ unreachable("Gen10 support dropped.");
else if (devinfo->gen >= 9)
gen9_init_atoms(brw);
else if (devinfo->gen >= 8)
/* We only really need a clear color if we also have an auxiliary
* surface. Without one, it does nothing.
*/
- clear_color =
- intel_miptree_get_clear_color(devinfo, mt, view.format,
- view.usage & ISL_SURF_USAGE_TEXTURE_BIT,
- &clear_bo, &clear_offset);
+ clear_color = intel_miptree_get_clear_color(mt, &clear_bo, &clear_offset);
}
void *state = brw_state_batch(brw,
#include "brw_multisample_state.h"
/**
- * From Gen10 Workarounds page in h/w specs:
- * WaSampleOffsetIZ:
- * Prior to the 3DSTATE_SAMPLE_PATTERN driver must ensure there are no
- * markers in the pipeline by programming a PIPE_CONTROL with stall.
- */
-static void
-gen10_emit_wa_cs_stall_flush(struct brw_context *brw)
-{
- UNUSED const struct gen_device_info *devinfo = &brw->screen->devinfo;
- assert(devinfo->gen == 10);
- brw_emit_pipe_control_flush(brw,
- PIPE_CONTROL_CS_STALL |
- PIPE_CONTROL_STALL_AT_SCOREBOARD);
-}
-
-/**
- * From Gen10 Workarounds page in h/w specs:
- * WaSampleOffsetIZ:
- * When 3DSTATE_SAMPLE_PATTERN is programmed, driver must then issue an
- * MI_LOAD_REGISTER_IMM command to an offset between 0x7000 and 0x7FFF(SVL)
- * after the command to ensure the state has been delivered prior to any
- * command causing a marker in the pipeline.
- */
-static void
-gen10_emit_wa_lri_to_cache_mode_zero(struct brw_context *brw)
-{
- UNUSED const struct gen_device_info *devinfo = &brw->screen->devinfo;
- assert(devinfo->gen == 10);
-
- /* Write to CACHE_MODE_0 (0x7000) */
- brw_load_register_imm32(brw, GEN7_CACHE_MODE_0, 0);
-
- /* Before changing the value of CACHE_MODE_0 register, GFX pipeline must
- * be idle; i.e., full flush is required.
- */
- brw_emit_pipe_control_flush(brw,
- PIPE_CONTROL_CACHE_FLUSH_BITS |
- PIPE_CONTROL_CACHE_INVALIDATE_BITS);
-}
-
-/**
* 3DSTATE_SAMPLE_PATTERN
*/
void
gen8_emit_3dstate_sample_pattern(struct brw_context *brw)
{
- const struct gen_device_info *devinfo = &brw->screen->devinfo;
-
- if (devinfo->gen == 10)
- gen10_emit_wa_cs_stall_flush(brw);
-
BEGIN_BATCH(9);
OUT_BATCH(_3DSTATE_SAMPLE_PATTERN << 16 | (9 - 2));
/* 1x and 2x MSAA */
OUT_BATCH(brw_multisample_positions_1x_2x);
ADVANCE_BATCH();
-
- if (devinfo->gen == 10)
- gen10_emit_wa_lri_to_cache_mode_zero(brw);
}
}
union isl_color_value
-intel_miptree_get_clear_color(const struct gen_device_info *devinfo,
- const struct intel_mipmap_tree *mt,
- enum isl_format view_format, bool sampling,
+intel_miptree_get_clear_color(const struct intel_mipmap_tree *mt,
struct brw_bo **clear_color_bo,
uint64_t *clear_color_offset)
{
assert(mt->aux_buf);
- if (devinfo->gen == 10 && isl_format_is_srgb(view_format) && sampling) {
- /* The gen10 sampler doesn't gamma-correct the clear color. In this case,
- * we switch to using the inline clear color and do the sRGB color
- * conversion process defined in the OpenGL spec. The red, green, and
- * blue channels take part in gamma correction, while the alpha channel
- * is unchanged.
- */
- union isl_color_value srgb_decoded_value = mt->fast_clear_color;
- for (unsigned i = 0; i < 3; i++) {
- srgb_decoded_value.f32[i] =
- util_format_srgb_to_linear_float(mt->fast_clear_color.f32[i]);
- }
- *clear_color_bo = 0;
- *clear_color_offset = 0;
- return srgb_decoded_value;
- } else {
- *clear_color_bo = mt->aux_buf->clear_color_bo;
- *clear_color_offset = mt->aux_buf->clear_color_offset;
- return mt->fast_clear_color;
- }
+ *clear_color_bo = mt->aux_buf->clear_color_bo;
+ *clear_color_offset = mt->aux_buf->clear_color_offset;
+ return mt->fast_clear_color;
}
static void
/* Get a clear color suitable for filling out an ISL surface state. */
union isl_color_value
-intel_miptree_get_clear_color(const struct gen_device_info *devinfo,
- const struct intel_mipmap_tree *mt,
- enum isl_format view_format, bool sampling,
+intel_miptree_get_clear_color(const struct intel_mipmap_tree *mt,
struct brw_bo **clear_color_bo,
uint64_t *clear_color_offset);