"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/intel/vulkan/anv_gem.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_gem.c  (mesa-21.2.0-rc1.tar.xz):anv_gem.c  (mesa-21.2.0-rc2.tar.xz)
skipping to change at line 773 skipping to change at line 773
struct drm_syncobj_timeline_array args = { struct drm_syncobj_timeline_array args = {
.handles = (uint64_t)(uintptr_t)handles, .handles = (uint64_t)(uintptr_t)handles,
.points = (uint64_t)(uintptr_t)points, .points = (uint64_t)(uintptr_t)points,
.count_handles = num_items, .count_handles = num_items,
}; };
return intel_ioctl(device->fd, DRM_IOCTL_SYNCOBJ_QUERY, &args); return intel_ioctl(device->fd, DRM_IOCTL_SYNCOBJ_QUERY, &args);
} }
int
anv_i915_query(int fd, uint64_t query_id, void *buffer,
int32_t *buffer_len)
{
struct drm_i915_query_item item = {
.query_id = query_id,
.length = *buffer_len,
.data_ptr = (uintptr_t)buffer,
};
struct drm_i915_query args = {
.num_items = 1,
.flags = 0,
.items_ptr = (uintptr_t)&item,
};
int ret = intel_ioctl(fd, DRM_IOCTL_I915_QUERY, &args);
*buffer_len = item.length;
return ret;
}
struct drm_i915_query_engine_info * struct drm_i915_query_engine_info *
anv_gem_get_engine_info(int fd) anv_gem_get_engine_info(int fd)
{ {
int32_t length = 0; return intel_i915_query_alloc(fd, DRM_I915_QUERY_ENGINE_INFO);
int ret = anv_i915_query(fd, DRM_I915_QUERY_ENGINE_INFO, NULL, &length);
if (ret == -1)
return NULL;
struct drm_i915_query_engine_info *info = calloc(1, length);
ret = anv_i915_query(fd, DRM_I915_QUERY_ENGINE_INFO, info, &length);
assert(ret == 0);
if (ret != 0) {
free(info);
return NULL;
}
return info;
} }
int int
anv_gem_count_engines(const struct drm_i915_query_engine_info *info, anv_gem_count_engines(const struct drm_i915_query_engine_info *info,
uint16_t engine_class) uint16_t engine_class)
{ {
int count = 0; int count = 0;
for (int i = 0; i < info->num_engines; i++) { for (int i = 0; i < info->num_engines; i++) {
if (info->engines[i].engine.engine_class == engine_class) if (info->engines[i].engine.engine_class == engine_class)
count++; count++;
 End of changes. 2 change blocks. 
36 lines changed or deleted 1 lines changed or added

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