three.js icon indicating copy to clipboard operation
three.js copied to clipboard

WebGPURenderer: Concurrency issue.

Open WestLangley opened this issue 1 year ago • 2 comments
trafficstars

Description

I believe @sunag is working on this, but posting here for reference:

This code block is leading to a concurrency problem.

https://github.com/mrdoob/three.js/blob/7b9a543a488cd842c41d9cee4fd4a826082475f2/src/renderers/common/PostProcessing.js#L69-L85

While awaiting renderAsync() to resolve, other asychronous calls to renderer.render() can occur -- in a loader callback, for example.

Adding some print statememts to the above block, I get results like this:

renderer.toneMapping temporarily set to:  0
renderer.toneMapping temporarily set to:  0

renderer.toneMapping restored to:  2
renderer.toneMapping restored to:  0

renderer.toneMapping temporarily set to:  0
renderer.toneMapping restored to:  0

renderer.toneMapping temporarily set to:  0
renderer.toneMapping restored to:  0

         .
         .

Reproduction steps

see above

Code

see above

Live example

n/a

Screenshots

No response

Version

r169dev

Device

No response

Browser

No response

OS

No response

WestLangley avatar Sep 25 '24 20:09 WestLangley