SWDEV-366397 - updating gl interop flag check

Change-Id: Ifefd5d4590216e3b73031cc25789aac2e8db541a


[ROCm/clr commit: 4d744547eb]
This commit is contained in:
pghafari
2022-11-15 13:14:21 -05:00
committed by Payam Ghafari
vanhempi 38b4f50f9c
commit e1c7a692cd
+6 -8
Näytä tiedosto
@@ -222,10 +222,10 @@ hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint ima
unsigned int flags) {
HIP_INIT_API(hipGraphicsGLRegisterImage, resource, image, target, flags);
if (!((flags == hipGraphicsRegisterFlagsNone) || (flags == hipGraphicsRegisterFlagsReadOnly) ||
(flags == hipGraphicsRegisterFlagsWriteDiscard) ||
(flags == hipGraphicsRegisterFlagsSurfaceLoadStore) ||
(flags == hipGraphicsRegisterFlagsTextureGather))) {
if (!((flags == hipGraphicsRegisterFlagsNone) || (flags & hipGraphicsRegisterFlagsReadOnly) ||
(flags & hipGraphicsRegisterFlagsWriteDiscard) ||
(flags & hipGraphicsRegisterFlagsSurfaceLoadStore) ||
(flags & hipGraphicsRegisterFlagsTextureGather))) {
LogError("invalid parameter \"flags\"");
HIP_RETURN(hipErrorInvalidValue);
}
@@ -531,10 +531,8 @@ hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint bu
unsigned int flags) {
HIP_INIT_API(hipGraphicsGLRegisterBuffer, resource, buffer, flags);
if (!((flags == hipGraphicsRegisterFlagsNone) || (flags == hipGraphicsRegisterFlagsReadOnly) ||
(flags == hipGraphicsRegisterFlagsWriteDiscard) ||
(flags == hipGraphicsRegisterFlagsSurfaceLoadStore) ||
(flags == hipGraphicsRegisterFlagsTextureGather))) {
if (!((flags == hipGraphicsRegisterFlagsNone) || (flags & hipGraphicsRegisterFlagsReadOnly) ||
(flags & hipGraphicsRegisterFlagsWriteDiscard))) {
LogError("invalid parameter \"flags\"");
HIP_RETURN(hipErrorInvalidValue);
}