diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-07-01 08:36:49 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-07-01 08:36:49 +0000 |
commit | caba34dab78a511c668481b21144cd9e1f4a0d44 (patch) | |
tree | 98afd1b0c919969abdf482b843819f2ff5695abb /lib/mesa/src/intel | |
parent | 2710d6d469f07ac1e3d994de08797b1a6978f35b (diff) |
Merge Mesa 19.0.8
Diffstat (limited to 'lib/mesa/src/intel')
-rw-r--r-- | lib/mesa/src/intel/compiler/brw_eu_emit.c | 6 | ||||
-rw-r--r-- | lib/mesa/src/intel/vulkan/anv_image.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/intel/vulkan/genX_cmd_buffer.c | 37 |
3 files changed, 28 insertions, 17 deletions
diff --git a/lib/mesa/src/intel/compiler/brw_eu_emit.c b/lib/mesa/src/intel/compiler/brw_eu_emit.c index 9be82d1b8..a53ace327 100644 --- a/lib/mesa/src/intel/compiler/brw_eu_emit.c +++ b/lib/mesa/src/intel/compiler/brw_eu_emit.c @@ -696,9 +696,9 @@ brw_alu3(struct brw_codegen *p, unsigned opcode, struct brw_reg dest, gen7_convert_mrf_to_grf(p, &dest); assert(dest.nr < 128); - assert(src0.file != BRW_IMMEDIATE_VALUE || src0.nr < 128); - assert(src1.file != BRW_IMMEDIATE_VALUE || src1.nr < 128); - assert(src2.file != BRW_IMMEDIATE_VALUE || src2.nr < 128); + assert(src0.file == BRW_IMMEDIATE_VALUE || src0.nr < 128); + assert(src1.file != BRW_IMMEDIATE_VALUE && src1.nr < 128); + assert(src2.file == BRW_IMMEDIATE_VALUE || src2.nr < 128); assert(dest.address_mode == BRW_ADDRESS_DIRECT); assert(src0.address_mode == BRW_ADDRESS_DIRECT); assert(src1.address_mode == BRW_ADDRESS_DIRECT); diff --git a/lib/mesa/src/intel/vulkan/anv_image.c b/lib/mesa/src/intel/vulkan/anv_image.c index 3999c7399..c076b9cf4 100644 --- a/lib/mesa/src/intel/vulkan/anv_image.c +++ b/lib/mesa/src/intel/vulkan/anv_image.c @@ -751,7 +751,7 @@ resolve_ahw_image(struct anv_device *device, vk_format, VK_IMAGE_ASPECT_COLOR_BIT, vk_tiling); - assert(format != ISL_FORMAT_UNSUPPORTED); + assert(isl_fmt != ISL_FORMAT_UNSUPPORTED); /* Handle RGB(X)->RGBA fallback. */ switch (desc.format) { diff --git a/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c b/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c index a3994f587..94411872d 100644 --- a/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c +++ b/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c @@ -122,6 +122,23 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer) sba.IndirectObjectBufferSizeModifyEnable = true; sba.InstructionBufferSize = 0xfffff; sba.InstructionBuffersizeModifyEnable = true; +# else + /* On gen7, we have upper bounds instead. According to the docs, + * setting an upper bound of zero means that no bounds checking is + * performed so, in theory, we should be able to leave them zero. + * However, border color is broken and the GPU bounds-checks anyway. + * To avoid this and other potential problems, we may as well set it + * for everything. + */ + sba.GeneralStateAccessUpperBound = + (struct anv_address) { .bo = NULL, .offset = 0xfffff000 }; + sba.GeneralStateAccessUpperBoundModifyEnable = true; + sba.DynamicStateAccessUpperBound = + (struct anv_address) { .bo = NULL, .offset = 0xfffff000 }; + sba.DynamicStateAccessUpperBoundModifyEnable = true; + sba.InstructionAccessUpperBound = + (struct anv_address) { .bo = NULL, .offset = 0xfffff000 }; + sba.InstructionAccessUpperBoundModifyEnable = true; # endif # if (GEN_GEN >= 9) sba.BindlessSurfaceStateBaseAddress = (struct anv_address) { NULL, 0 }; @@ -828,27 +845,21 @@ init_fast_clear_color(struct anv_cmd_buffer *cmd_buffer, set_image_fast_clear_state(cmd_buffer, image, aspect, ANV_FAST_CLEAR_NONE); - /* The fast clear value dword(s) will be copied into a surface state object. - * Ensure that the restrictions of the fields in the dword(s) are followed. - * - * CCS buffers on SKL+ can have any value set for the clear colors. - */ - if (image->samples == 1 && GEN_GEN >= 9) - return; - - /* Other combinations of auxiliary buffers and platforms require specific - * values in the clear value dword(s). + /* Initialize the struct fields that are accessed for fast-clears so that + * the HW restrictions on the field values are satisfied. */ struct anv_address addr = anv_image_get_clear_color_addr(cmd_buffer->device, image, aspect); if (GEN_GEN >= 9) { - for (unsigned i = 0; i < 4; i++) { + const struct isl_device *isl_dev = &cmd_buffer->device->isl_dev; + const unsigned num_dwords = GEN_GEN >= 10 ? + isl_dev->ss.clear_color_state_size / 4 : + isl_dev->ss.clear_value_size / 4; + for (unsigned i = 0; i < num_dwords; i++) { anv_batch_emit(&cmd_buffer->batch, GENX(MI_STORE_DATA_IMM), sdi) { sdi.Address = addr; sdi.Address.offset += i * 4; - /* MCS buffers on SKL+ can only have 1/0 clear colors. */ - assert(image->samples > 1); sdi.ImmediateData = 0; } } |