Merge pull request #546 from gargrahul/fix_bindtex_offset_null_check
Fixed offset null check in bind texture functions
Этот коммит содержится в:
1 file changed
+4
-2
@@ -389,7 +389,8 @@ hipError_t ihipBindTextureImpl(int dim, enum hipTextureReadMode readMode, size_t
|
|||||||
enum hipTextureFilterMode filterMode = tex->filterMode;
|
enum hipTextureFilterMode filterMode = tex->filterMode;
|
||||||
int normalizedCoords = tex->normalized;
|
int normalizedCoords = tex->normalized;
|
||||||
hipTextureObject_t& textureObject = tex->textureObject;
|
hipTextureObject_t& textureObject = tex->textureObject;
|
||||||
*offset = 0;
|
if(offset != nullptr)
|
||||||
|
*offset = 0;
|
||||||
auto ctx = ihipGetTlsDefaultCtx();
|
auto ctx = ihipGetTlsDefaultCtx();
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
hc::accelerator acc = ctx->getDevice()->_acc;
|
hc::accelerator acc = ctx->getDevice()->_acc;
|
||||||
@@ -459,7 +460,8 @@ hipError_t ihipBindTexture2DImpl(int dim, enum hipTextureReadMode readMode, size
|
|||||||
enum hipTextureFilterMode filterMode = tex->filterMode;
|
enum hipTextureFilterMode filterMode = tex->filterMode;
|
||||||
int normalizedCoords = tex->normalized;
|
int normalizedCoords = tex->normalized;
|
||||||
hipTextureObject_t& textureObject = tex->textureObject;
|
hipTextureObject_t& textureObject = tex->textureObject;
|
||||||
*offset = 0;
|
if(offset != nullptr)
|
||||||
|
*offset = 0;
|
||||||
auto ctx = ihipGetTlsDefaultCtx();
|
auto ctx = ihipGetTlsDefaultCtx();
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
hc::accelerator acc = ctx->getDevice()->_acc;
|
hc::accelerator acc = ctx->getDevice()->_acc;
|
||||||
|
|||||||
Reference in new issue
Block a user