Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPURenderer: fix createBindGroup warnings when use videoTexture in webgpu mode [Draft] #28369

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

z4122
Copy link

@z4122 z4122 commented May 13, 2024

Related issue: #27690

Description

When open exmaples , multi warnings will be printed

img_v3_02as_8632e46e-1af7-4fe2-af59-d1769d002bfg

The reason is, in the beginning, video texture is not set correctly. it should be an external texture, but it is initialed as a normal texture view.
image

Later, the external texture is set in WebGPUTextureUtils.js. So the second frame is correct.

else if ( texture.isVideoTexture ) {

	const video = texture.source.data;

	textureData.externalTexture = video;

}

To solve this problem, we should set external texture correctly in the first frame.

@z4122 z4122 force-pushed the fix/webgpu_externaltexture_warning branch 2 times, most recently from 039381e to 007e7c0 Compare May 13, 2024 16:29
@z4122 z4122 changed the title fix createBindGroup warnings when use videoTexture in webgpu mode WebGPURenderer: fix createBindGroup warnings when use videoTexture in webgpu mode May 13, 2024
@sunag sunag self-requested a review May 13, 2024 17:12
@sunag
Copy link
Collaborator

sunag commented May 14, 2024

I'm getting this message of error most part of times that I tested:

image


if ( binding.texture.source !== undefined && binding.texture.source.data !== undefined ) {

textureData.externalTexture = binding.texture.source.data;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference in all this code compared to the binding.isSampledTexture condition except this one line and binding.texture.source !== undefined && binding.texture.source.data !== undefined part?

I think it could be moved into the next block instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I get the same error as Sunag.

@z4122 z4122 changed the title WebGPURenderer: fix createBindGroup warnings when use videoTexture in webgpu mode WebGPURenderer: fix createBindGroup warnings when use videoTexture in webgpu mode [Draft] May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants