mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-20 00:14:45 +00:00
Fix cuSurfObjectDestroy and guard cuSurfObjectCreate
This commit is contained in:
parent
d23d247ed9
commit
2f158b7776
2 changed files with 7 additions and 1 deletions
|
@ -1245,7 +1245,7 @@ mod definitions {
|
|||
pub(crate) unsafe fn cuSurfObjectDestroy(
|
||||
surfObject: hipSurfaceObject_t,
|
||||
) -> hipError_t {
|
||||
hipDestroySurfaceObject(surfObject)
|
||||
surface::destroy(surfObject)
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn cuTexObjectCreate(
|
||||
|
|
|
@ -31,6 +31,12 @@ pub(crate) unsafe fn create(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn destroy(surf_object: hipSurfaceObject_t) -> hipError_t {
|
||||
hipDestroySurfaceObject(
|
||||
(((surf_object as usize) << IMAGE_RESERVED_TOP_BITS) >> IMAGE_RESERVED_TOP_BITS) as _,
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) fn format_size(f: hipArray_Format) -> Result<usize, CUresult> {
|
||||
Ok(match f {
|
||||
hipArray_Format::HIP_AD_FORMAT_UNSIGNED_INT8
|
||||
|
|
Loading…
Add table
Reference in a new issue