goto fail;
}
+ device->cmd_parser_version = -1;
+ if (device->info->gen == 7) {
+ device->cmd_parser_version =
+ anv_gem_get_param(fd, I915_PARAM_CMD_PARSER_VERSION);
+ if (device->cmd_parser_version == -1) {
+ result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
+ "failed to get command parser version");
+ goto fail;
+ }
+ }
+
if (anv_gem_get_aperture(fd, &device->aperture_size) == -1) {
result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
"failed to get aperture size: %m");
.extensionName = VK_KHR_SURFACE_EXTENSION_NAME,
.specVersion = 25,
},
+#ifdef VK_USE_PLATFORM_XCB_KHR
{
.extensionName = VK_KHR_XCB_SURFACE_EXTENSION_NAME,
.specVersion = 5,
},
-#ifdef HAVE_WAYLAND_PLATFORM
+#endif
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
{
.extensionName = VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
.specVersion = 4,
}
if (VK_MAKE_VERSION(1, 0, 0) > client_version ||
- client_version > VK_MAKE_VERSION(1, 0, 3)) {
+ client_version > VK_MAKE_VERSION(1, 0, 0xfff)) {
return vk_errorf(VK_ERROR_INCOMPATIBLE_DRIVER,
"Client requested version %d.%d.%d",
VK_VERSION_MAJOR(client_version),
.alphaToOne = true,
.multiViewport = true,
.samplerAnisotropy = false, /* FINISHME */
- .textureCompressionETC2 = true,
- .textureCompressionASTC_LDR = true,
+ .textureCompressionETC2 = pdevice->info->gen >= 8 ||
+ pdevice->info->is_baytrail,
+ .textureCompressionASTC_LDR = false, /* FINISHME */
.textureCompressionBC = true,
.occlusionQueryPrecise = true,
.pipelineStatisticsQuery = false,
- .vertexPipelineStoresAndAtomics = pdevice->info->gen >= 8,
.fragmentStoresAndAtomics = true,
.shaderTessellationAndGeometryPointSize = true,
.shaderImageGatherExtended = true,
.variableMultisampleRate = false,
.inheritedQueries = false,
};
+
+ /* We can't do image stores in vec4 shaders */
+ pFeatures->vertexPipelineStoresAndAtomics =
+ pdevice->compiler->scalar_stage[MESA_SHADER_VERTEX] &&
+ pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];
}
void
};
*pProperties = (VkPhysicalDeviceProperties) {
- .apiVersion = VK_MAKE_VERSION(1, 0, 2),
+ .apiVersion = VK_MAKE_VERSION(1, 0, 5),
.driverVersion = 1,
.vendorID = 0x8086,
.deviceID = pdevice->chipset_id,
/* Kernel driver requires 8 byte aligned batch length */
size = align_u32(batch->next - batch->start, 8);
- assert(size < device->batch_bo_pool.bo_size);
- result = anv_bo_pool_alloc(&device->batch_bo_pool, &bo);
+ result = anv_bo_pool_alloc(&device->batch_bo_pool, &bo, size);
if (result != VK_SUCCESS)
return result;
device->info = *physical_device->info;
device->isl_dev = physical_device->isl_dev;
+ /* On Broadwell and later, we can use batch chaining to more efficiently
+ * implement growing command buffers. Prior to Haswell, the kernel
+ * command parser gets in the way and we have to fall back to growing
+ * the batch.
+ */
+ device->can_chain_batches = device->info.gen >= 8;
+
pthread_mutex_init(&device->mutex, NULL);
- anv_bo_pool_init(&device->batch_bo_pool, device, ANV_CMD_BUFFER_BATCH_SIZE);
+ anv_bo_pool_init(&device->batch_bo_pool, device);
anv_block_pool_init(&device->dynamic_state_block_pool, device, 16384);
batch.start = batch.next = cmds;
batch.end = (void *) cmds + sizeof(cmds);
- anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END);
- anv_batch_emit(&batch, GEN7_MI_NOOP);
+ anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END, bbe);
+ anv_batch_emit(&batch, GEN7_MI_NOOP, noop);
return anv_device_submit_simple_batch(device, &batch);
}
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO);
- result = anv_bo_pool_alloc(&device->batch_bo_pool, &fence_bo);
+ result = anv_bo_pool_alloc(&device->batch_bo_pool, &fence_bo, 4096);
if (result != VK_SUCCESS)
return result;
const uint32_t batch_offset = align_u32(sizeof(*fence), CACHELINE_SIZE);
batch.next = batch.start = fence->bo.map + batch_offset;
batch.end = fence->bo.map + fence->bo.size;
- anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END);
- anv_batch_emit(&batch, GEN7_MI_NOOP);
+ anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END, bbe);
+ anv_batch_emit(&batch, GEN7_MI_NOOP, noop);
if (!device->info.has_llc) {
assert(((uintptr_t) batch.start & CACHELINE_MASK) == 0);