~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_bridge.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
   }
310
310
}
311
311
 
 
312
VkResult
 
313
pvr_srv_set_sync_primitive(int fd, void *handle, uint32_t index, uint32_t value)
 
314
{
 
315
   struct pvr_srv_bridge_sync_prim_set_cmd cmd = {
 
316
      .handle = handle,
 
317
      .index = index,
 
318
      .value = value,
 
319
   };
 
320
 
 
321
   struct pvr_srv_bridge_sync_prim_set_ret ret = {
 
322
      .error = PVR_SRV_ERROR_BRIDGE_CALL_FAILED,
 
323
   };
 
324
 
 
325
   int result;
 
326
 
 
327
   result = pvr_srv_bridge_call(fd,
 
328
                                PVR_SRV_BRIDGE_SYNC,
 
329
                                PVR_SRV_BRIDGE_SYNC_SYNCPRIMSET,
 
330
                                &cmd,
 
331
                                sizeof(cmd),
 
332
                                &ret,
 
333
                                sizeof(ret));
 
334
   if (result || ret.error != PVR_SRV_OK) {
 
335
      return vk_bridge_err(VK_ERROR_UNKNOWN,
 
336
                           "PVR_SRV_BRIDGE_SYNC_SYNCPRIMSET",
 
337
                           ret);
 
338
   }
 
339
 
 
340
   return VK_SUCCESS;
 
341
}
 
342
 
312
343
VkResult pvr_srv_get_heap_count(int fd, uint32_t *const heap_count_out)
313
344
{
314
345
   struct pvr_srv_heap_count_cmd cmd = {