diff options
author | Kenneth Graunke <[email protected]> | 2017-08-03 00:01:14 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-08-04 10:26:37 -0700 |
commit | 4d26c77a7108a11e8fe9d0851341732067e4bd06 (patch) | |
tree | c13bbe216ade464841c5a198b86921ac9061be0d /src/mesa | |
parent | 68d611ed8e62fd3b166c52bbfcb96730ae1459c0 (diff) |
i965: Use a C99 initializer for new validation list entries.
More succinct - we can skip a bunch of = 0 lines.
Extracted from a patch by Chris Wilson.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 6f152e9b264..d4ffbdac8a1 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -121,16 +121,13 @@ add_exec_bo(struct intel_batchbuffer *batch, struct brw_bo *bo) batch->exec_array_size * sizeof(batch->validation_list[0])); } - struct drm_i915_gem_exec_object2 *validation_entry = - &batch->validation_list[batch->exec_count]; - validation_entry->handle = bo->gem_handle; - validation_entry->relocation_count = 0; - validation_entry->relocs_ptr = 0; - validation_entry->alignment = bo->align; - validation_entry->offset = bo->offset64; - validation_entry->flags = bo->kflags; - validation_entry->rsvd1 = 0; - validation_entry->rsvd2 = 0; + batch->validation_list[batch->exec_count] = + (struct drm_i915_gem_exec_object2) { + .handle = bo->gem_handle, + .alignment = bo->align, + .offset = bo->offset64, + .flags = bo->kflags, + }; bo->index = batch->exec_count; batch->exec_bos[batch->exec_count] = bo; |