"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/intel/vulkan/anv_device.c" between
mesa-21.2.0-rc1.tar.xz and mesa-21.2.0-rc2.tar.xz

About: Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics (main library code). Release candidate.

anv_device.c  (mesa-21.2.0-rc1.tar.xz):anv_device.c  (mesa-21.2.0-rc2.tar.xz)
skipping to change at line 331 skipping to change at line 331
.GOOGLE_hlsl_functionality1 = true, .GOOGLE_hlsl_functionality1 = true,
.GOOGLE_user_type = true, .GOOGLE_user_type = true,
.INTEL_performance_query = device->perf && .INTEL_performance_query = device->perf &&
device->perf->i915_perf_version > = 3, device->perf->i915_perf_version > = 3,
.INTEL_shader_integer_functions2 = device->info.ver >= 8, .INTEL_shader_integer_functions2 = device->info.ver >= 8,
.EXT_multi_draw = true, .EXT_multi_draw = true,
.NV_compute_shader_derivatives = true, .NV_compute_shader_derivatives = true,
}; };
} }
static void static bool
anv_track_meminfo(struct anv_physical_device *device, anv_get_query_meminfo(struct anv_physical_device *device, int fd)
const struct drm_i915_query_memory_regions *mem_regions)
{ {
struct drm_i915_query_memory_regions *mem_regions =
intel_i915_query_alloc(fd, DRM_I915_QUERY_MEMORY_REGIONS);
if (mem_regions == NULL)
return false;
for(int i = 0; i < mem_regions->num_regions; i++) { for(int i = 0; i < mem_regions->num_regions; i++) {
switch(mem_regions->regions[i].region.memory_class) { switch(mem_regions->regions[i].region.memory_class) {
case I915_MEMORY_CLASS_SYSTEM: case I915_MEMORY_CLASS_SYSTEM:
device->sys.region = mem_regions->regions[i].region; device->sys.region = mem_regions->regions[i].region;
device->sys.size = mem_regions->regions[i].probed_size; device->sys.size = mem_regions->regions[i].probed_size;
break; break;
case I915_MEMORY_CLASS_DEVICE: case I915_MEMORY_CLASS_DEVICE:
device->vram.region = mem_regions->regions[i].region; device->vram.region = mem_regions->regions[i].region;
device->vram.size = mem_regions->regions[i].probed_size; device->vram.size = mem_regions->regions[i].probed_size;
break; break;
default: default:
break; break;
} }
} }
}
static bool
anv_get_query_meminfo(struct anv_physical_device *device, int fd)
{
struct drm_i915_query_item item = {
.query_id = DRM_I915_QUERY_MEMORY_REGIONS
};
struct drm_i915_query query = {
.num_items = 1,
.items_ptr = (uintptr_t) &item,
};
if (drmIoctl(fd, DRM_IOCTL_I915_QUERY, &query))
return false;
struct drm_i915_query_memory_regions *mem_regions = calloc(1, item.length);
item.data_ptr = (uintptr_t) mem_regions;
if (drmIoctl(fd, DRM_IOCTL_I915_QUERY, &query) || item.length <= 0) {
free(mem_regions);
return false;
}
anv_track_meminfo(device, mem_regions);
free(mem_regions); free(mem_regions);
return true; return true;
} }
static void static void
anv_init_meminfo(struct anv_physical_device *device, int fd) anv_init_meminfo(struct anv_physical_device *device, int fd)
{ {
if (anv_get_query_meminfo(device, fd)) if (anv_get_query_meminfo(device, fd))
return; return;
skipping to change at line 1552 skipping to change at line 1530
CORE_FEATURE(1, 2, descriptorBindingUpdateUnusedWhilePending); CORE_FEATURE(1, 2, descriptorBindingUpdateUnusedWhilePending);
CORE_FEATURE(1, 2, descriptorBindingPartiallyBound); CORE_FEATURE(1, 2, descriptorBindingPartiallyBound);
CORE_FEATURE(1, 2, descriptorBindingVariableDescriptorCount); CORE_FEATURE(1, 2, descriptorBindingVariableDescriptorCount);
CORE_FEATURE(1, 2, runtimeDescriptorArray); CORE_FEATURE(1, 2, runtimeDescriptorArray);
break; break;
} }
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: {
VkPhysicalDeviceFragmentShadingRateFeaturesKHR *features = VkPhysicalDeviceFragmentShadingRateFeaturesKHR *features =
(VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)ext; (VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)ext;
features->attachmentFragmentShadingRate = false;
features->pipelineFragmentShadingRate = true; features->pipelineFragmentShadingRate = true;
features->primitiveFragmentShadingRate = false;
break; break;
} }
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT: { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT: {
VkPhysicalDeviceImageRobustnessFeaturesEXT *features = VkPhysicalDeviceImageRobustnessFeaturesEXT *features =
(VkPhysicalDeviceImageRobustnessFeaturesEXT *)ext; (VkPhysicalDeviceImageRobustnessFeaturesEXT *)ext;
features->robustImageAccess = true; features->robustImageAccess = true;
break; break;
} }
skipping to change at line 2345 skipping to change at line 2325
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KH R: { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KH R: {
VkPhysicalDeviceFragmentShadingRatePropertiesKHR *props = VkPhysicalDeviceFragmentShadingRatePropertiesKHR *props =
(VkPhysicalDeviceFragmentShadingRatePropertiesKHR *)ext; (VkPhysicalDeviceFragmentShadingRatePropertiesKHR *)ext;
/* Those must be 0 if attachmentFragmentShadingRate is not /* Those must be 0 if attachmentFragmentShadingRate is not
* supported. * supported.
*/ */
props->minFragmentShadingRateAttachmentTexelSize = (VkExtent2D) { 0, 0 }; props->minFragmentShadingRateAttachmentTexelSize = (VkExtent2D) { 0, 0 };
props->maxFragmentShadingRateAttachmentTexelSize = (VkExtent2D) { 0, 0 }; props->maxFragmentShadingRateAttachmentTexelSize = (VkExtent2D) { 0, 0 };
props->maxFragmentShadingRateAttachmentTexelSizeAspectRatio = 0; props->maxFragmentShadingRateAttachmentTexelSizeAspectRatio = 0;
props->primitiveFragmentShadingRateWithMultipleViewports = pdevice->inf o.ver >= 12; props->primitiveFragmentShadingRateWithMultipleViewports = false;
props->layeredShadingRateAttachments = false; props->layeredShadingRateAttachments = false;
props->fragmentShadingRateNonTrivialCombinerOps = true; props->fragmentShadingRateNonTrivialCombinerOps = false;
props->maxFragmentSize = (VkExtent2D) { 4, 4 }; props->maxFragmentSize = (VkExtent2D) { 4, 4 };
props->maxFragmentSizeAspectRatio = 4; props->maxFragmentSizeAspectRatio = 4;
props->maxFragmentShadingRateCoverageSamples = 4 * 4; props->maxFragmentShadingRateCoverageSamples = 4 * 4 * 16;
props->maxFragmentShadingRateRasterizationSamples = VK_SAMPLE_COUNT_16_ BIT; props->maxFragmentShadingRateRasterizationSamples = VK_SAMPLE_COUNT_16_ BIT;
props->fragmentShadingRateWithShaderDepthStencilWrites = false; props->fragmentShadingRateWithShaderDepthStencilWrites = false;
props->fragmentShadingRateWithSampleMask = true; props->fragmentShadingRateWithSampleMask = true;
props->fragmentShadingRateWithShaderSampleMask = false; props->fragmentShadingRateWithShaderSampleMask = false;
props->fragmentShadingRateWithConservativeRasterization = true; props->fragmentShadingRateWithConservativeRasterization = true;
props->fragmentShadingRateWithFragmentShaderInterlock = true; props->fragmentShadingRateWithFragmentShaderInterlock = true;
props->fragmentShadingRateWithCustomSampleLocations = true; props->fragmentShadingRateWithCustomSampleLocations = true;
props->fragmentShadingRateStrictMultiplyCombiner = false; props->fragmentShadingRateStrictMultiplyCombiner = false;
break; break;
} }
skipping to change at line 4955 skipping to change at line 4935
.height = _height, \ .height = _height, \
}; \ }; \
} \ } \
} while (0) } while (0)
VkSampleCountFlags sample_counts = VkSampleCountFlags sample_counts =
isl_device_get_sample_counts(&physical_device->isl_dev); isl_device_get_sample_counts(&physical_device->isl_dev);
for (uint32_t x = 4; x >= 1; x /= 2) { for (uint32_t x = 4; x >= 1; x /= 2) {
for (uint32_t y = 4; y >= 1; y /= 2) { for (uint32_t y = 4; y >= 1; y /= 2) {
append_rate(sample_counts, x, y); /* For size {1, 1}, the sample count must be ~0 */
if (x == 1 && y == 1)
append_rate(~0, x, y);
else
append_rate(sample_counts, x, y);
} }
} }
#undef append_rate #undef append_rate
return vk_outarray_status(&out); return vk_outarray_status(&out);
} }
 End of changes. 10 change blocks. 
34 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)