|
@@ -11623,7 +11623,17 @@ set_state_and_transform(const RenderState *target,
|
|
|
if (_target_rs->get_attrib(texture_slot) != _state_rs->get_attrib(texture_slot) ||
|
|
if (_target_rs->get_attrib(texture_slot) != _state_rs->get_attrib(texture_slot) ||
|
|
|
!_state_mask.get_bit(texture_slot)) {
|
|
!_state_mask.get_bit(texture_slot)) {
|
|
|
PStatGPUTimer timer(this, _draw_set_state_texture_pcollector);
|
|
PStatGPUTimer timer(this, _draw_set_state_texture_pcollector);
|
|
|
- determine_target_texture();
|
|
|
|
|
|
|
+ if (has_fixed_function_pipeline() ||
|
|
|
|
|
+ _current_shader == nullptr ||
|
|
|
|
|
+ _current_shader == _default_shader) {
|
|
|
|
|
+ determine_target_texture();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // If we have a custom shader, don't filter down the list of textures.
|
|
|
|
|
+ _target_texture = (const TextureAttrib *)
|
|
|
|
|
+ _target_rs->get_attrib_def(TextureAttrib::get_class_slot());
|
|
|
|
|
+ _target_tex_gen = (const TexGenAttrib *)
|
|
|
|
|
+ _target_rs->get_attrib_def(TexGenAttrib::get_class_slot());
|
|
|
|
|
+ }
|
|
|
do_issue_texture();
|
|
do_issue_texture();
|
|
|
|
|
|
|
|
// Since the TexGen and TexMatrix states depend partly on the particular
|
|
// Since the TexGen and TexMatrix states depend partly on the particular
|