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

Forbid calling of derivative functions in incorrect functions #93358

Merged

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Jun 19, 2024

Fix #76155

Compared to #83897 this code will recursively check the functions, and if it contains any derivative function and being called by vertex processor - it will correctly emit error.

shader_derivative_fix

@Chaosus Chaosus requested a review from a team as a code owner June 19, 2024 16:12
@Chaosus Chaosus force-pushed the shader_forbid_derivative_usage branch 5 times, most recently from d3d574c to 76d5644 Compare June 19, 2024 17:46
@AThousandShips AThousandShips added this to the 4.x milestone Jun 19, 2024
@Chaosus Chaosus force-pushed the shader_forbid_derivative_usage branch 12 times, most recently from daccbcd to 7ca1e01 Compare June 19, 2024 20:12
@Chaosus Chaosus force-pushed the shader_forbid_derivative_usage branch 7 times, most recently from 8e04a9d to 8933f7e Compare June 20, 2024 02:50
@Chaosus Chaosus force-pushed the shader_forbid_derivative_usage branch 2 times, most recently from ea424fd to e442f43 Compare June 20, 2024 06:46
@Chaosus Chaosus requested a review from clayjohn June 20, 2024 06:51
@Chaosus Chaosus force-pushed the shader_forbid_derivative_usage branch 4 times, most recently from e1ef3ac to f8fb3a9 Compare June 20, 2024 11:11
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected.

image

image

@Chaosus Chaosus force-pushed the shader_forbid_derivative_usage branch from f8fb3a9 to ae95531 Compare June 21, 2024 17:47
@Chaosus Chaosus modified the milestones: 4.x, 4.3, 4.4 Jun 24, 2024
@akien-mga akien-mga merged commit cc625a1 into godotengine:master Jun 25, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Chaosus Chaosus deleted the shader_forbid_derivative_usage branch June 25, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dFdx and dFdy Bricking Spatial Shaders from Vertex Function
4 participants