/**
 * @file mvgal_dxvk.h
 * @brief DXVK integration bridge header
 *
 * MVGAL - Multi-Vendor GPU Aggregation Layer for Linux
 *
 * SPDX-License-Identifier: MIT
 */

#ifndef MVGAL_DXVK_H
#define MVGAL_DXVK_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
struct DXVKDeviceProperties {
    uint32_t vendorID;
    uint32_t deviceID;
    uint32_t apiVersion;
};

struct DXVKCommandBuffer;
#endif

/**
 * @brief Initialize DXVK bridge
 * @return 0 on success, -1 on failure
 */
int dxvk_bridge_init(void);

/**
 * @brief Get DXVK version
 * @return DXVK version (major * 100 + minor)
 */
uint32_t dxvk_bridge_get_version(void);

/**
 * @brief Check if DXVK bridge is available
 * @return Non-zero if available, 0 if not
 */
int dxvk_bridge_is_available(void);

/**
 * @brief Get DXVK device properties
 * @param device Output device properties
 * @return 0 on success, -1 on failure
 */
int dxvk_bridge_get_device_properties(void *device);

/**
 * @brief Submit DXVK command buffer through MVGAL
 * @param cmd_buf Command buffer to submit
 * @param wait_semaphore Wait semaphore
 * @param signal_semaphore Signal semaphore
 * @return 0 on success, -1 on failure
 */
int dxvk_bridge_submit_command_buffer(
    void *cmd_buf,
    uint64_t wait_semaphore,
    uint64_t signal_semaphore
);

#ifdef __cplusplus
}
#endif

#endif /* MVGAL_DXVK_H */