mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-03 14:50:53 +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(
|
pub(crate) unsafe fn cuSurfObjectDestroy(
|
||||||
surfObject: hipSurfaceObject_t,
|
surfObject: hipSurfaceObject_t,
|
||||||
) -> hipError_t {
|
) -> hipError_t {
|
||||||
hipDestroySurfaceObject(surfObject)
|
surface::destroy(surfObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) unsafe fn cuTexObjectCreate(
|
pub(crate) unsafe fn cuTexObjectCreate(
|
||||||
|
|
|
@ -31,6 +31,12 @@ pub(crate) unsafe fn create(
|
||||||
Ok(())
|
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> {
|
pub(crate) fn format_size(f: hipArray_Format) -> Result<usize, CUresult> {
|
||||||
Ok(match f {
|
Ok(match f {
|
||||||
hipArray_Format::HIP_AD_FORMAT_UNSIGNED_INT8
|
hipArray_Format::HIP_AD_FORMAT_UNSIGNED_INT8
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue