mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-20 00:14:45 +00:00
Add cuMipmappedArrayDestroy and cuMipmappedArrayGetLevel
This commit is contained in:
parent
b0440bf9ba
commit
f8db1b8c63
2 changed files with 20 additions and 1 deletions
|
@ -214,6 +214,8 @@ cuda_function_declarations!(
|
|||
cuLinkDestroy,
|
||||
cuLinkCreate_v2,
|
||||
cuMipmappedArrayCreate,
|
||||
cuMipmappedArrayDestroy,
|
||||
cuMipmappedArrayGetLevel,
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -1248,7 +1250,9 @@ mod definitions {
|
|||
pTexDesc: *const HIP_TEXTURE_DESC,
|
||||
pResViewDesc: *const HIP_RESOURCE_VIEW_DESC,
|
||||
) -> hipError_t {
|
||||
texobj::create(pTexObject, pResDesc, pTexDesc, pResViewDesc)
|
||||
let mut tex_desc = *pTexDesc;
|
||||
tex_desc.maxMipmapLevelClamp = 0f32;
|
||||
texobj::create(pTexObject, pResDesc, &tex_desc, pResViewDesc)
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn cuTexObjectDestroy(texObject: hipTextureObject_t) -> hipError_t {
|
||||
|
@ -1654,4 +1658,18 @@ mod definitions {
|
|||
) -> hipError_t {
|
||||
array::mipmapped_create(pHandle, pMipmappedArrayDesc, numMipmapLevels)
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn cuMipmappedArrayDestroy(
|
||||
hMipmappedArray: hipMipmappedArray_t,
|
||||
) -> hipError_t {
|
||||
hipMipmappedArrayDestroy(hMipmappedArray)
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn cuMipmappedArrayGetLevel(
|
||||
pLevelArray: *mut CUarray,
|
||||
hMipmappedArray: hipMipmappedArray_t,
|
||||
level: ::std::os::raw::c_uint,
|
||||
) -> hipError_t {
|
||||
hipMipmappedArrayGetLevel(pLevelArray.cast(), hMipmappedArray, level)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -253,6 +253,7 @@ impl FromCuda<CUgraphExec> for hipGraphExec_t {}
|
|||
impl FromCuda<CUgraphicsResource> for hipGraphicsResource_t {}
|
||||
impl FromCuda<CUlimit> for hipLimit_t {}
|
||||
impl FromCuda<CUsurfObject> for hipSurfaceObject_t {}
|
||||
impl FromCuda<CUmipmappedArray> for hipMipmappedArray_t {}
|
||||
|
||||
impl<From, Into: FromCuda<From>> FromCuda<*mut From> for *mut Into {}
|
||||
impl<From, Into: FromCuda<From>> FromCuda<*const From> for *const Into {}
|
||||
|
|
Loading…
Add table
Reference in a new issue