GLSL icon indicating copy to clipboard operation
GLSL copied to clipboard

Minimising/Collapsing Functions Is Erratic!

Open GaryDT opened this issue 3 years ago • 1 comments

Installed product versions

  • Visual Studio: Microsoft Visual Studio Community 2022 (64-bit) Version 17.0.5

Description

When clicking the "-" or "+" to collapse or expand functions, then often it'll un-collapse some of the already collapsed functions. Also, sometimes the "-" "+" box is missing, especially when having collapsed all but one functions, in which case the final function often cannot be collapsed because the little box isn't there.

Steps to recreate

  1. As described in the above description.

Current behavior

As described in the above description.

Expected behavior

Collapsing or expanding any function should simply be independent of all other functions, and the "-" "+" boxes should always be showing.

GaryDT avatar Feb 18 '22 08:02 GaryDT

Sorry for the delay! I can confirm this behaviour. I'm looking into it. Helpfull would be short example shaders that do not work.

danielscherzer avatar Mar 04 '22 10:03 danielscherzer

An example Task-Shader (*.task) that does not work for me:

#version 460

#extension GL_EXT_mesh_shader : require

#extension GL_EXT_buffer_reference2 : require

#extension GL_EXT_shader_explicit_arithmetic_types : enable

#extension GL_GOOGLE_include_directive : enable

layout (local_size_x = 32) in;

// ####################################################################################################################

#define uint08_t uint8_t
#define sint08_t  int8_t
#define sint16_t int16_t
#define sint32_t int32_t
#define sint64_t int64_t

// ####################################################################################################################

layout (buffer_reference, std430, buffer_reference_align = 1) buffer UInt08ptr
{
    uint08_t v;
};
layout (buffer_reference, std430, buffer_reference_align = 1) buffer UInt16ptr
{
    uint16_t v;
};
layout (buffer_reference, std430, buffer_reference_align = 1) buffer UInt32ptr
{
    uint32_t v;
};
layout (buffer_reference, std430, buffer_reference_align = 1) buffer UInt64ptr
{
    uint64_t v;
};

layout (buffer_reference, std430, buffer_reference_align = 1) buffer SInt08ptr
{
    sint08_t v;
};
layout (buffer_reference, std430, buffer_reference_align = 1) buffer SInt16ptr
{
    sint16_t v;
};
layout (buffer_reference, std430, buffer_reference_align = 1) buffer SInt32ptr
{
    sint32_t v;
};
layout (buffer_reference, std430, buffer_reference_align = 1) buffer SInt64ptr
{
    sint64_t v;
};

MaikBusch78 avatar Mar 22 '24 10:03 MaikBusch78

Steps to reproduce:

  • Open that file
  • Close all 8 Braces GLSL-vsix-Collapsing
  • Scroll down, so that the file content not is visible an more
  • Scroll up, then some Braces are opened and some Sections cant be collapsed again, because the - to collapse is missing GLSL-vsix-Collapsing-2
  • I am using VS 17.9.4 and GLSL 0.11.170

MaikBusch78 avatar Mar 22 '24 11:03 MaikBusch78

This happens to me for a very long time in all files, not only for that simplified example

MaikBusch78 avatar Mar 22 '24 11:03 MaikBusch78

Thanks! I can confirm this behaviour.

danielscherzer avatar Mar 27 '24 17:03 danielscherzer

Your example now works for me. I published a new version of the extension. Please try if this resolves all problems with collapsing. Cheers, Daniel

danielscherzer avatar Mar 27 '24 17:03 danielscherzer

@danielscherzer Oh man, you made my day ! It really works now. It annoyed me for years, but it works now :-) :-)

MaikBusch78 avatar Apr 02 '24 08:04 MaikBusch78

Cool! Thansk for your good example. This helped me to find the error rather quickly!

danielscherzer avatar Apr 02 '24 16:04 danielscherzer