Summary: | Fixed function programs generated multiple times per draw call | ||
---|---|---|---|
Product: | Mesa | Reporter: | Ilia Mirkin <imirkin> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED MOVED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | trace that demonstrates 2 FS and 2 VS programs generated in a single draw call |
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/995. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 119318 [details] trace that demonstrates 2 FS and 2 VS programs generated in a single draw call FF programs are affected by various state. It seems it's possible to do things "just right" to cause them to be regenerated twice in a single draw. The attached trace produces the following for me: 48: message: shader compiler issue 1: type: 1, 48: message: shader compiler issue 1: type: 0, 53: message: shader compiler issue 1: type: 1, 53: message: shader compiler issue 1: type: 0, 172: message: shader compiler issue 1: type: 1, 172: message: shader compiler issue 1: type: 0, 172: message: shader compiler issue 1: type: 1, 172: message: shader compiler issue 1: type: 0, 275: message: shader compiler issue 1: type: 1, 275: message: shader compiler issue 1: type: 0, 275: message: shader compiler issue 1: type: 0, 2172: message: shader compiler issue 1: type: 1 2172: message: shader compiler issue 1: type: 0 2172: message: shader compiler issue 1: type: 0 2239: message: shader compiler issue 1: type: 1 2239: message: shader compiler issue 1: type: 0 2328: message: shader compiler issue 1: type: 1 2328: message: shader compiler issue 1: type: 0 2328: message: shader compiler issue 1: type: 1 2328: message: shader compiler issue 1: type: 0 Type 0/1 are VS and FS (id corresponds to PIPE_SHADER_*). Note that the draw calls at 172 and 2328 both generate 2 programs each, while draw calls 275 and 2172 generate 2 programs for one of the types. One set is generated via the path vbo_exec_DrawRangeElementsBaseVertex -> validate_DrawElements_common -> check_valid_to_render -> _mesa_valid_to_render -> _mesa_update_state -> update_program while the second is generated via vbo_exec_DrawRangeElementsBaseVertex -> vbo_validated_drawrangeelements -> vbo_bind_arrays -> _mesa_update_state -> update_program. I guess in between the _NEW_PROGRAM bit manages to set itself.