aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_gem.c
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-07-17 16:58:22 +0100
committerEric Engestrom <[email protected]>2018-07-23 17:56:08 +0100
commite6e22e42076445fadc1f46b5eb18e79dbcf8d846 (patch)
tree2c2948d9335fc9a7ba01c3a088727688789d0bd0 /src/intel/vulkan/anv_gem.c
parent54f8f1545fefd4a3e4dd6d025dd41ce521494ea4 (diff)
anv: remove unnecessary runtime copy of static string
It's actually also a bit safer, since now the compiler will warn if the string is larger than the `.name` array. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_gem.c')
-rw-r--r--src/intel/vulkan/anv_gem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c
index 3ba6d198a8a..c43b5ef9e06 100644
--- a/src/intel/vulkan/anv_gem.c
+++ b/src/intel/vulkan/anv_gem.c
@@ -444,12 +444,11 @@ struct sync_merge_data {
int
anv_gem_sync_file_merge(struct anv_device *device, int fd1, int fd2)
{
- const char name[] = "anv merge fence";
struct sync_merge_data args = {
+ .name = "anv merge fence",
.fd2 = fd2,
.fence = -1,
};
- memcpy(args.name, name, sizeof(name));
int ret = anv_ioctl(fd1, SYNC_IOC_MERGE, &args);
if (ret == -1)