Compare commits
21 Commits
mesa-19.0.
...
arc-mesa-1
Author | SHA1 | Date | |
---|---|---|---|
|
2e7833ad91 | ||
|
0a2e4b02ca | ||
|
c7fc61d15b | ||
|
1b093b567f | ||
|
d73e48b63f | ||
|
ba24ca67f6 | ||
|
110500cc8a | ||
|
0b9f6ebfbb | ||
|
69ebf4569a | ||
|
385b736238 | ||
|
4cf1a40f9a | ||
|
81e053b757 | ||
|
f30fb27665 | ||
|
1039285288 | ||
|
59812ac38d | ||
|
c19ce6e5e2 | ||
|
eba57c29b0 | ||
|
e304007d87 | ||
|
b4419fdba5 | ||
|
7ac15d9e42 | ||
|
6b48451110 |
@@ -13,12 +13,12 @@
|
||||
|
||||
is_stable_nomination()
|
||||
{
|
||||
git show --summary "$1" | grep -q -i -o "CC:.*mesa-stable"
|
||||
git show --pretty=medium --summary "$1" | grep -q -i -o "CC:.*mesa-stable"
|
||||
}
|
||||
|
||||
is_typod_nomination()
|
||||
{
|
||||
git show --summary "$1" | grep -q -i -o "CC:.*mesa-dev"
|
||||
git show --pretty=medium --summary "$1" | grep -q -i -o "CC:.*mesa-dev"
|
||||
}
|
||||
|
||||
fixes=
|
||||
|
@@ -2365,7 +2365,7 @@ si_llvm_init_export_args(struct radv_shader_context *ctx,
|
||||
if (is_16bit) {
|
||||
for (unsigned chan = 0; chan < 4; chan++)
|
||||
values[chan] = LLVMBuildZExt(ctx->ac.builder,
|
||||
values[chan],
|
||||
ac_to_integer(&ctx->ac, values[chan]),
|
||||
ctx->ac.i32, "");
|
||||
}
|
||||
break;
|
||||
@@ -2376,7 +2376,7 @@ si_llvm_init_export_args(struct radv_shader_context *ctx,
|
||||
if (is_16bit) {
|
||||
for (unsigned chan = 0; chan < 4; chan++)
|
||||
values[chan] = LLVMBuildSExt(ctx->ac.builder,
|
||||
values[chan],
|
||||
ac_to_integer(&ctx->ac, values[chan]),
|
||||
ctx->ac.i32, "");
|
||||
}
|
||||
break;
|
||||
@@ -2429,12 +2429,8 @@ si_llvm_init_export_args(struct radv_shader_context *ctx,
|
||||
} else
|
||||
memcpy(&args->out[0], values, sizeof(values[0]) * 4);
|
||||
|
||||
for (unsigned i = 0; i < 4; ++i) {
|
||||
if (!(args->enabled_channels & (1 << i)))
|
||||
continue;
|
||||
|
||||
for (unsigned i = 0; i < 4; ++i)
|
||||
args->out[i] = ac_to_float(&ctx->ac, args->out[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -524,6 +524,14 @@ radv_pipeline_compute_spi_color_formats(struct radv_pipeline *pipeline,
|
||||
col_format |= cf << (4 * i);
|
||||
}
|
||||
|
||||
if (!col_format && blend->need_src_alpha & (1 << 0)) {
|
||||
/* When a subpass doesn't have any color attachments, write the
|
||||
* alpha channel of MRT0 when alpha coverage is enabled because
|
||||
* the depth attachment needs it.
|
||||
*/
|
||||
col_format |= V_028714_SPI_SHADER_32_ABGR;
|
||||
}
|
||||
|
||||
/* If the i-th target format is set, all previous target formats must
|
||||
* be non-zero to avoid hangs.
|
||||
*/
|
||||
@@ -689,6 +697,7 @@ radv_pipeline_init_blend_state(struct radv_pipeline *pipeline,
|
||||
|
||||
if (vkms && vkms->alphaToCoverageEnable) {
|
||||
blend.db_alpha_to_mask |= S_028B70_ALPHA_TO_MASK_ENABLE(1);
|
||||
blend.need_src_alpha |= 0x1;
|
||||
}
|
||||
|
||||
blend.cb_target_mask = 0;
|
||||
@@ -3192,11 +3201,11 @@ radv_compute_db_shader_control(const struct radv_device *device,
|
||||
bool disable_rbplus = device->physical_device->has_rbplus &&
|
||||
!device->physical_device->rbplus_allowed;
|
||||
|
||||
/* Do not enable the gl_SampleMask fragment shader output if MSAA is
|
||||
* disabled.
|
||||
/* It shouldn't be needed to export gl_SampleMask when MSAA is disabled
|
||||
* but this appears to break Project Cars (DXVK). See
|
||||
* https://bugs.freedesktop.org/show_bug.cgi?id=109401
|
||||
*/
|
||||
bool mask_export_enable = ms->num_samples > 1 &&
|
||||
ps->info.info.ps.writes_sample_mask;
|
||||
bool mask_export_enable = ps->info.info.ps.writes_sample_mask;
|
||||
|
||||
return S_02880C_Z_EXPORT_ENABLE(ps->info.info.ps.writes_z) |
|
||||
S_02880C_STENCIL_TEST_VAL_EXPORT_ENABLE(ps->info.info.ps.writes_stencil) |
|
||||
|
@@ -665,6 +665,7 @@ static int radv_amdgpu_create_bo_list(struct radv_amdgpu_winsys *ws,
|
||||
assert(num < ws->num_buffers);
|
||||
handles[num].bo_handle = bo->bo_handle;
|
||||
handles[num].bo_priority = bo->priority;
|
||||
num++;
|
||||
}
|
||||
|
||||
r = amdgpu_bo_list_create_raw(ws->dev, ws->num_buffers,
|
||||
|
@@ -121,7 +121,7 @@ vir_emit_thrsw(struct v3d_compile *c)
|
||||
*/
|
||||
c->last_thrsw = vir_NOP(c);
|
||||
c->last_thrsw->qpu.sig.thrsw = true;
|
||||
c->last_thrsw_at_top_level = (c->execute.file == QFILE_NULL);
|
||||
c->last_thrsw_at_top_level = !c->in_control_flow;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
@@ -1158,7 +1158,9 @@ emit_frag_end(struct v3d_compile *c)
|
||||
|
||||
inst->src[vir_get_implicit_uniform_src(inst)] =
|
||||
vir_uniform_ui(c, tlb_specifier | 0xffffff00);
|
||||
c->writes_z = true;
|
||||
} else if (c->s->info.fs.uses_discard ||
|
||||
!c->s->info.fs.early_fragment_tests ||
|
||||
c->fs_key->sample_alpha_to_coverage ||
|
||||
!has_any_tlb_color_write) {
|
||||
/* Emit passthrough Z if it needed to be delayed until shader
|
||||
@@ -1188,6 +1190,7 @@ emit_frag_end(struct v3d_compile *c)
|
||||
|
||||
inst->src[vir_get_implicit_uniform_src(inst)] =
|
||||
vir_uniform_ui(c, tlb_specifier | 0xffffff00);
|
||||
c->writes_z = true;
|
||||
}
|
||||
|
||||
/* XXX: Performance improvement: Merge Z write and color writes TLB
|
||||
@@ -2103,10 +2106,10 @@ ntq_emit_nonuniform_if(struct v3d_compile *c, nir_if *if_stmt)
|
||||
else
|
||||
else_block = vir_new_block(c);
|
||||
|
||||
bool was_top_level = false;
|
||||
bool was_uniform_control_flow = false;
|
||||
if (c->execute.file == QFILE_NULL) {
|
||||
c->execute = vir_MOV(c, vir_uniform_ui(c, 0));
|
||||
was_top_level = true;
|
||||
was_uniform_control_flow = true;
|
||||
}
|
||||
|
||||
/* Set up the flags for the IF condition (taking the THEN branch). */
|
||||
@@ -2122,7 +2125,7 @@ ntq_emit_nonuniform_if(struct v3d_compile *c, nir_if *if_stmt)
|
||||
/* Update the flags+cond to mean "Taking the ELSE branch (!cond) and
|
||||
* was previously active (execute Z) for updating the exec flags.
|
||||
*/
|
||||
if (was_top_level) {
|
||||
if (was_uniform_control_flow) {
|
||||
cond = v3d_qpu_cond_invert(cond);
|
||||
} else {
|
||||
struct qinst *inst = vir_MOV_dest(c, vir_reg(QFILE_NULL, 0),
|
||||
@@ -2176,7 +2179,7 @@ ntq_emit_nonuniform_if(struct v3d_compile *c, nir_if *if_stmt)
|
||||
vir_link_blocks(c->cur_block, after_block);
|
||||
|
||||
vir_set_emit_block(c, after_block);
|
||||
if (was_top_level)
|
||||
if (was_uniform_control_flow)
|
||||
c->execute = c->undef;
|
||||
else
|
||||
ntq_activate_execute_for_block(c);
|
||||
@@ -2185,12 +2188,15 @@ ntq_emit_nonuniform_if(struct v3d_compile *c, nir_if *if_stmt)
|
||||
static void
|
||||
ntq_emit_if(struct v3d_compile *c, nir_if *nif)
|
||||
{
|
||||
bool was_in_control_flow = c->in_control_flow;
|
||||
c->in_control_flow = true;
|
||||
if (c->execute.file == QFILE_NULL &&
|
||||
nir_src_is_dynamically_uniform(nif->condition)) {
|
||||
ntq_emit_uniform_if(c, nif);
|
||||
} else {
|
||||
ntq_emit_nonuniform_if(c, nif);
|
||||
}
|
||||
c->in_control_flow = was_in_control_flow;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2267,10 +2273,13 @@ static void ntq_emit_cf_list(struct v3d_compile *c, struct exec_list *list);
|
||||
static void
|
||||
ntq_emit_loop(struct v3d_compile *c, nir_loop *loop)
|
||||
{
|
||||
bool was_top_level = false;
|
||||
bool was_in_control_flow = c->in_control_flow;
|
||||
c->in_control_flow = true;
|
||||
|
||||
bool was_uniform_control_flow = false;
|
||||
if (c->execute.file == QFILE_NULL) {
|
||||
c->execute = vir_MOV(c, vir_uniform_ui(c, 0));
|
||||
was_top_level = true;
|
||||
was_uniform_control_flow = true;
|
||||
}
|
||||
|
||||
struct qblock *save_loop_cont_block = c->loop_cont_block;
|
||||
@@ -2307,7 +2316,7 @@ ntq_emit_loop(struct v3d_compile *c, nir_loop *loop)
|
||||
vir_link_blocks(c->cur_block, c->loop_break_block);
|
||||
|
||||
vir_set_emit_block(c, c->loop_break_block);
|
||||
if (was_top_level)
|
||||
if (was_uniform_control_flow)
|
||||
c->execute = c->undef;
|
||||
else
|
||||
ntq_activate_execute_for_block(c);
|
||||
@@ -2316,6 +2325,8 @@ ntq_emit_loop(struct v3d_compile *c, nir_loop *loop)
|
||||
c->loop_cont_block = save_loop_cont_block;
|
||||
|
||||
c->loops++;
|
||||
|
||||
c->in_control_flow = was_in_control_flow;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -519,6 +519,7 @@ struct v3d_compile {
|
||||
uint32_t centroid_flags[BITSET_WORDS(V3D_MAX_FS_INPUTS)];
|
||||
|
||||
bool uses_center_w;
|
||||
bool writes_z;
|
||||
|
||||
struct v3d_ubo_range *ubo_ranges;
|
||||
bool *ubo_range_used;
|
||||
@@ -531,6 +532,7 @@ struct v3d_compile {
|
||||
* yes, otherwise a block number + 1 that the channel jumped to.
|
||||
*/
|
||||
struct qreg execute;
|
||||
bool in_control_flow;
|
||||
|
||||
struct qreg line_x, point_x, point_y;
|
||||
|
||||
@@ -716,7 +718,7 @@ struct v3d_fs_prog_data {
|
||||
uint32_t centroid_flags[((V3D_MAX_FS_INPUTS - 1) / 24) + 1];
|
||||
|
||||
bool writes_z;
|
||||
bool discard;
|
||||
bool disable_ez;
|
||||
bool uses_center_w;
|
||||
};
|
||||
|
||||
|
@@ -777,21 +777,9 @@ v3d_fs_set_prog_data(struct v3d_compile *c,
|
||||
struct v3d_fs_prog_data *prog_data)
|
||||
{
|
||||
v3d_set_fs_prog_data_inputs(c, prog_data);
|
||||
prog_data->writes_z = (c->s->info.outputs_written &
|
||||
(1 << FRAG_RESULT_DEPTH));
|
||||
prog_data->discard = (c->s->info.fs.uses_discard ||
|
||||
c->fs_key->sample_alpha_to_coverage);
|
||||
prog_data->writes_z = c->writes_z;
|
||||
prog_data->disable_ez = !c->s->info.fs.early_fragment_tests;
|
||||
prog_data->uses_center_w = c->uses_center_w;
|
||||
|
||||
/* If the shader has some side effects and hasn't allowed early
|
||||
* fragment tests, disable them.
|
||||
*/
|
||||
if (!c->s->info.fs.early_fragment_tests &&
|
||||
(c->s->info.num_images ||
|
||||
c->s->info.num_ssbos ||
|
||||
c->s->info.num_abos)) {
|
||||
prog_data->discard = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -888,6 +876,15 @@ v3d_nir_lower_fs_early(struct v3d_compile *c)
|
||||
{
|
||||
if (c->fs_key->int_color_rb || c->fs_key->uint_color_rb)
|
||||
v3d_fixup_fs_output_types(c);
|
||||
|
||||
/* If the shader has no non-TLB side effects, we can promote it to
|
||||
* enabling early_fragment_tests even if the user didn't.
|
||||
*/
|
||||
if (!(c->s->info.num_images ||
|
||||
c->s->info.num_ssbos ||
|
||||
c->s->info.num_abos)) {
|
||||
c->s->info.fs.early_fragment_tests = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -618,11 +618,11 @@ optimizations = [
|
||||
# Reassociate constants in add/mul chains so they can be folded together.
|
||||
# For now, we mostly only handle cases where the constants are separated by
|
||||
# a single non-constant. We could do better eventually.
|
||||
(('~fmul', '#a', ('fmul', b, '#c')), ('fmul', ('fmul', a, c), b)),
|
||||
(('imul', '#a', ('imul', b, '#c')), ('imul', ('imul', a, c), b)),
|
||||
(('~fadd', '#a', ('fadd', b, '#c')), ('fadd', ('fadd', a, c), b)),
|
||||
(('~fadd', '#a', ('fneg', ('fadd', b, '#c'))), ('fadd', ('fadd', a, ('fneg', c)), ('fneg', b))),
|
||||
(('iadd', '#a', ('iadd', b, '#c')), ('iadd', ('iadd', a, c), b)),
|
||||
(('~fmul', '#a', ('fmul', 'b(is_not_const)', '#c')), ('fmul', ('fmul', a, c), b)),
|
||||
(('imul', '#a', ('imul', 'b(is_not_const)', '#c')), ('imul', ('imul', a, c), b)),
|
||||
(('~fadd', '#a', ('fadd', 'b(is_not_const)', '#c')), ('fadd', ('fadd', a, c), b)),
|
||||
(('~fadd', '#a', ('fneg', ('fadd', 'b(is_not_const)', '#c'))), ('fadd', ('fadd', a, ('fneg', c)), ('fneg', b))),
|
||||
(('iadd', '#a', ('iadd', 'b(is_not_const)', '#c')), ('iadd', ('iadd', a, c), b)),
|
||||
|
||||
# By definition...
|
||||
(('bcsel', ('ige', ('find_lsb', a), 0), ('find_lsb', a), -1), ('find_lsb', a)),
|
||||
|
@@ -313,6 +313,13 @@ opt_if_loop_last_continue(nir_loop *loop)
|
||||
if (!then_ends_in_continue && !else_ends_in_continue)
|
||||
return false;
|
||||
|
||||
/* if the block after the if/else is empty we bail, otherwise we might end
|
||||
* up looping forever
|
||||
*/
|
||||
if (&nif->cf_node == nir_cf_node_prev(&last_block->cf_node) &&
|
||||
exec_list_is_empty(&last_block->instr_list))
|
||||
return false;
|
||||
|
||||
/* Move the last block of the loop inside the last if-statement */
|
||||
nir_cf_list tmp;
|
||||
nir_cf_extract(&tmp, nir_after_cf_node(if_node),
|
||||
|
@@ -3595,6 +3595,7 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
|
||||
|
||||
case SpvCapabilityInt64Atomics:
|
||||
spv_check_supported(int64_atomics, cap);
|
||||
break;
|
||||
|
||||
case SpvCapabilityInt8:
|
||||
spv_check_supported(int8, cap);
|
||||
|
@@ -185,6 +185,16 @@ static void si_emit_guardband(struct si_context *ctx)
|
||||
const unsigned hw_screen_offset_alignment =
|
||||
ctx->chip_class >= VI ? 16 : MAX2(ctx->screen->se_tile_repeat, 16);
|
||||
|
||||
/* Indexed by quantization modes */
|
||||
static unsigned max_viewport_size[] = {65535, 16383, 4095};
|
||||
|
||||
/* Ensure that the whole viewport stays representable in
|
||||
* absolute coordinates.
|
||||
* See comment in si_set_viewport_states.
|
||||
*/
|
||||
assert(vp_as_scissor.maxx <= max_viewport_size[vp_as_scissor.quant_mode] &&
|
||||
vp_as_scissor.maxy <= max_viewport_size[vp_as_scissor.quant_mode]);
|
||||
|
||||
hw_screen_offset_x = CLAMP(hw_screen_offset_x, 0, MAX_PA_SU_HARDWARE_SCREEN_OFFSET);
|
||||
hw_screen_offset_y = CLAMP(hw_screen_offset_y, 0, MAX_PA_SU_HARDWARE_SCREEN_OFFSET);
|
||||
|
||||
@@ -219,7 +229,6 @@ static void si_emit_guardband(struct si_context *ctx)
|
||||
*
|
||||
* The viewport range is [-max_viewport_size/2, max_viewport_size/2].
|
||||
*/
|
||||
static unsigned max_viewport_size[] = {65535, 16383, 4095};
|
||||
assert(vp_as_scissor.quant_mode < ARRAY_SIZE(max_viewport_size));
|
||||
max_range = max_viewport_size[vp_as_scissor.quant_mode] / 2;
|
||||
left = (-max_range - vp.translate[0]) / vp.scale[0];
|
||||
@@ -333,6 +342,8 @@ static void si_set_viewport_states(struct pipe_context *pctx,
|
||||
unsigned h = scissor->maxy - scissor->miny;
|
||||
unsigned max_extent = MAX2(w, h);
|
||||
|
||||
int max_corner = MAX2(scissor->maxx, scissor->maxy);
|
||||
|
||||
unsigned center_x = (scissor->maxx + scissor->minx) / 2;
|
||||
unsigned center_y = (scissor->maxy + scissor->miny) / 2;
|
||||
unsigned max_center = MAX2(center_x, center_y);
|
||||
@@ -358,7 +369,22 @@ static void si_set_viewport_states(struct pipe_context *pctx,
|
||||
if (ctx->family == CHIP_RAVEN)
|
||||
max_extent = 16384; /* Use QUANT_MODE == 16_8. */
|
||||
|
||||
if (max_extent <= 1024) /* 4K scanline area for guardband */
|
||||
/* Another constraint is that all coordinates in the viewport
|
||||
* are representable in fixed point with respect to the
|
||||
* surface origin.
|
||||
*
|
||||
* It means that PA_SU_HARDWARE_SCREEN_OFFSET can't be given
|
||||
* an offset that would make the upper corner of the viewport
|
||||
* greater than the maximum representable number post
|
||||
* quantization, ie 2^quant_bits.
|
||||
*
|
||||
* This does not matter for 14.10 and 16.8 formats since the
|
||||
* offset is already limited at 8k, but it means we can't use
|
||||
* 12.12 if we are drawing to some pixels outside the lower
|
||||
* 4k x 4k of the render target.
|
||||
*/
|
||||
|
||||
if (max_extent <= 1024 && max_corner < 4096) /* 4K scanline area for guardband */
|
||||
scissor->quant_mode = SI_QUANT_MODE_12_12_FIXED_POINT_1_4096TH;
|
||||
else if (max_extent <= 4096) /* 16K scanline area for guardband */
|
||||
scissor->quant_mode = SI_QUANT_MODE_14_10_FIXED_POINT_1_1024TH;
|
||||
|
@@ -369,6 +369,8 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
||||
return 32;
|
||||
case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
|
||||
return 1 << 27;
|
||||
case PIPE_CAP_MAX_VARYINGS:
|
||||
return 32;
|
||||
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
return 0xFFFFFFFF;
|
||||
|
@@ -203,8 +203,13 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
|
||||
* shader needs to write the Z value (even just discards).
|
||||
*/
|
||||
shader.fragment_shader_does_z_writes =
|
||||
(v3d->prog.fs->prog_data.fs->writes_z ||
|
||||
v3d->prog.fs->prog_data.fs->discard);
|
||||
v3d->prog.fs->prog_data.fs->writes_z;
|
||||
/* Set if the EZ test must be disabled (due to shader side
|
||||
* effects and the early_z flag not being present in the
|
||||
* shader).
|
||||
*/
|
||||
shader.turn_off_early_z_test =
|
||||
v3d->prog.fs->prog_data.fs->disable_ez;
|
||||
|
||||
shader.fragment_shader_uses_real_pixel_centre_w_in_addition_to_centroid_w2 =
|
||||
v3d->prog.fs->prog_data.fs->uses_center_w;
|
||||
|
@@ -255,6 +255,13 @@ opt_cmod_propagation_local(const gen_device_info *devinfo, bblock_t *block)
|
||||
if (inst->opcode == BRW_OPCODE_AND)
|
||||
break;
|
||||
|
||||
/* Not safe to use inequality operators if the types are different
|
||||
*/
|
||||
if (scan_inst->dst.type != inst->src[0].type &&
|
||||
inst->conditional_mod != BRW_CONDITIONAL_Z &&
|
||||
inst->conditional_mod != BRW_CONDITIONAL_NZ)
|
||||
break;
|
||||
|
||||
/* Comparisons operate differently for ints and floats */
|
||||
if (scan_inst->dst.type != inst->dst.type &&
|
||||
(scan_inst->dst.type == BRW_REGISTER_TYPE_F ||
|
||||
|
@@ -512,6 +512,15 @@ fs_visitor::optimize_extract_to_float(nir_alu_instr *instr,
|
||||
src0->op != nir_op_extract_i8 && src0->op != nir_op_extract_i16)
|
||||
return false;
|
||||
|
||||
/* If either opcode has source modifiers, bail.
|
||||
*
|
||||
* TODO: We can potentially handle source modifiers if both of the opcodes
|
||||
* we're combining are signed integers.
|
||||
*/
|
||||
if (instr->src[0].abs || instr->src[0].negate ||
|
||||
src0->src[0].abs || src0->src[0].negate)
|
||||
return false;
|
||||
|
||||
unsigned element = nir_src_as_uint(src0->src[1].src);
|
||||
|
||||
/* Element type to extract.*/
|
||||
|
@@ -889,3 +889,35 @@ TEST_F(cmod_propagation_test, subtract_delete_compare_derp)
|
||||
EXPECT_EQ(BRW_OPCODE_ADD, instruction(block0, 1)->opcode);
|
||||
EXPECT_EQ(BRW_PREDICATE_NORMAL, instruction(block0, 1)->predicate);
|
||||
}
|
||||
|
||||
TEST_F(cmod_propagation_test, signed_unsigned_comparison_mismatch)
|
||||
{
|
||||
const fs_builder &bld = v->bld;
|
||||
fs_reg dest0 = v->vgrf(glsl_type::int_type);
|
||||
fs_reg src0 = v->vgrf(glsl_type::int_type);
|
||||
src0.type = BRW_REGISTER_TYPE_W;
|
||||
|
||||
bld.ASR(dest0, negate(src0), brw_imm_d(15));
|
||||
bld.CMP(bld.null_reg_ud(), retype(dest0, BRW_REGISTER_TYPE_UD),
|
||||
brw_imm_ud(0u), BRW_CONDITIONAL_LE);
|
||||
|
||||
/* = Before =
|
||||
* 0: asr(8) dest:D -src0:W 15D
|
||||
* 1: cmp.le.f0(8) null:UD dest:UD 0UD
|
||||
*
|
||||
* = After =
|
||||
* (no changes)
|
||||
*/
|
||||
v->calculate_cfg();
|
||||
bblock_t *block0 = v->cfg->blocks[0];
|
||||
|
||||
EXPECT_EQ(0, block0->start_ip);
|
||||
EXPECT_EQ(1, block0->end_ip);
|
||||
|
||||
EXPECT_FALSE(cmod_propagation(v));
|
||||
EXPECT_EQ(0, block0->start_ip);
|
||||
EXPECT_EQ(1, block0->end_ip);
|
||||
EXPECT_EQ(BRW_OPCODE_ASR, instruction(block0, 0)->opcode);
|
||||
EXPECT_EQ(BRW_OPCODE_CMP, instruction(block0, 1)->opcode);
|
||||
EXPECT_EQ(BRW_CONDITIONAL_LE, instruction(block0, 1)->conditional_mod);
|
||||
}
|
||||
|
@@ -1449,10 +1449,10 @@ _anv_combine_address(struct anv_batch *batch, void *location,
|
||||
*/
|
||||
|
||||
/* TC=LLC/eLLC, LeCC=WB, LRUM=3, L3CC=WB */
|
||||
#define GEN9_MOCS 2
|
||||
#define GEN9_MOCS (2 << 1)
|
||||
|
||||
/* TC=LLC/eLLC, LeCC=WB, LRUM=3, L3CC=WB */
|
||||
#define GEN9_EXTERNAL_MOCS 1
|
||||
#define GEN9_EXTERNAL_MOCS (1 << 1)
|
||||
|
||||
/* Cannonlake MOCS defines are duplicates of Skylake MOCS defines. */
|
||||
#define GEN10_MOCS GEN9_MOCS
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Copyright © 2017-2018 Intel Corporation
|
||||
# Copyright © 2017-2019 Intel Corporation
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -178,7 +178,10 @@ endif
|
||||
|
||||
libanv_common = static_library(
|
||||
'anv_common',
|
||||
[libanv_files, anv_entrypoints, anv_extensions_c, anv_extensions_h, sha1_h],
|
||||
[
|
||||
libanv_files, anv_entrypoints, anv_extensions_c, anv_extensions_h, sha1_h,
|
||||
gen_xml_pack,
|
||||
],
|
||||
include_directories : [
|
||||
inc_common, inc_intel, inc_compiler, inc_drm_uapi, inc_vulkan_util,
|
||||
inc_vulkan_wsi,
|
||||
|
@@ -4663,8 +4663,12 @@ get_fb_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
|
||||
case GL_COLOR_ATTACHMENT12:
|
||||
case GL_COLOR_ATTACHMENT13:
|
||||
case GL_COLOR_ATTACHMENT14:
|
||||
case GL_COLOR_ATTACHMENT15:
|
||||
return &fb->Attachment[BUFFER_COLOR0 + attachment - GL_COLOR_ATTACHMENT0];
|
||||
case GL_COLOR_ATTACHMENT15: {
|
||||
const unsigned i = attachment - GL_COLOR_ATTACHMENT0;
|
||||
if (i >= ctx->Const.MaxColorAttachments)
|
||||
return NULL;
|
||||
return &fb->Attachment[BUFFER_COLOR0 + i];
|
||||
}
|
||||
case GL_DEPTH:
|
||||
case GL_DEPTH_ATTACHMENT:
|
||||
case GL_DEPTH_STENCIL_ATTACHMENT:
|
||||
|
Reference in New Issue
Block a user