Fix T80776: Cannot switch between Slots of Render Result
Introduced by D8234. Added active render slot to determine if the GPUTexture is still up to date.
This commit is contained in:
parent
91e32bff90
commit
ac58663dec
Notes:
blender-bot
2023-02-13 21:10:07 +01:00
Referenced by issue #80776, Cannot switch between Slots of Render Result
|
@ -277,9 +277,12 @@ static GPUTexture *image_get_gpu_texture(Image *ima,
|
|||
* the current `pass` and `layer` should be 0. */
|
||||
short requested_pass = iuser ? iuser->pass : 0;
|
||||
short requested_layer = iuser ? iuser->layer : 0;
|
||||
if (ima->gpu_pass != requested_pass || ima->gpu_layer != requested_layer) {
|
||||
short requested_slot = ima->render_slot;
|
||||
if (ima->gpu_pass != requested_pass || ima->gpu_layer != requested_layer ||
|
||||
ima->gpu_slot != requested_slot) {
|
||||
ima->gpu_pass = requested_pass;
|
||||
ima->gpu_layer = requested_layer;
|
||||
ima->gpu_slot = requested_slot;
|
||||
ima->gpuflag |= IMA_GPU_REFRESH;
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,8 @@ typedef struct Image {
|
|||
short gpuflag;
|
||||
short gpu_pass;
|
||||
short gpu_layer;
|
||||
char _pad2[6];
|
||||
short gpu_slot;
|
||||
char _pad2[4];
|
||||
|
||||
/** Deprecated. */
|
||||
struct PackedFile *packedfile DNA_DEPRECATED;
|
||||
|
|
Loading…
Reference in New Issue