Cycles: Improve error reporting of large textures on HIP #118239
|
@ -855,7 +855,11 @@ void HIPDevice::tex_alloc(device_texture &mem)
|
||||||
thread_scoped_lock lock(device_mem_map_mutex);
|
thread_scoped_lock lock(device_mem_map_mutex);
|
||||||
cmem = &device_mem_map[&mem];
|
cmem = &device_mem_map[&mem];
|
||||||
|
|
||||||
hip_assert(hipTexObjectCreate(&cmem->texobject, &resDesc, &texDesc, NULL));
|
if (hipTexObjectCreate(&cmem->texobject, &resDesc, &texDesc, NULL) != hipSuccess) {
|
||||||
|
set_error(
|
||||||
Alaska marked this conversation as resolved
Outdated
|
|||||||
|
"Failed to create texture. Maximum GPU texture size or available GPU memory was likely "
|
||||||
|
"exceeded.");
|
||||||
|
}
|
||||||
|
|
||||||
texture_info[slot].data = (uint64_t)cmem->texobject;
|
texture_info[slot].data = (uint64_t)cmem->texobject;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
This type of change looks fine. Would prefer != 0 for clarity, and
string_printf
is not needed if it's just a plain string.I would suggest for the message.