Fix T101969: Crash when using large texture with nonstandard colorspace
When the image colorspace is not data, linear or sRGB, the image will be converted to float (and colorspace-converted) during loading. However, if it also needs to be rescaled (due to exceeding the GPU texture size limit), the resizing assumed that it's still a byte texture.
This commit is contained in:
parent
04eab0fd01
commit
ea571ddc29
Notes:
blender-bot
2023-02-14 05:52:32 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3 Referenced by issue #101969, Eevee : Crash or glitches with new "Filmic sRGB" color space Referenced by issue #101938, Crashing On Operation: MARK AS ASSET
|
@ -174,6 +174,7 @@ static void *imb_gpu_get_data(const ImBuf *ibuf,
|
|||
/* Other colorspace, store as float texture to avoid precision loss. */
|
||||
data_rect = MEM_mallocN(sizeof(float[4]) * ibuf->x * ibuf->y, __func__);
|
||||
*r_freedata = freedata = true;
|
||||
is_float_rect = true;
|
||||
|
||||
if (data_rect == NULL) {
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue