Skip to content

Commit 9c4151c

Browse files
committed
ShaderGenerator: fix TextureAttrib assertion
This was caused by af57c82 and was triggered by a change in TextureStage sort.
1 parent 511b0c1 commit 9c4151c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

panda/src/pgraph/textureAttrib.I

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ on_stage_affects_alpha(size_t n) const {
263263
*/
264264
INLINE void TextureAttrib::
265265
check_sorted() const {
266-
if (_sort_seq != TextureStage::get_sort_seq()) {
266+
if (_sort_seq != TextureStage::get_sort_seq() && !_sort_seq.is_fresh()) {
267267
((TextureAttrib *)this)->sort_on_stages();
268268
}
269269
}

panda/src/pgraph/textureAttrib.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,9 @@ get_auto_shader_attrib_impl(const RenderState *state) const {
807807
}
808808
}
809809

810+
// Prevent check_sorted() from being called on this state.
811+
attrib->_sort_seq = UpdateSeq::fresh();
812+
810813
return return_new(attrib);
811814
}
812815

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy