danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
258 stars 28 forks source link

Minimising/Collapsing Functions Is Erratic! #98

Closed GaryDT closed 6 months ago

GaryDT commented 2 years ago

Installed product versions

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.

danielscherzer commented 2 years ago

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

MaikBusch78 commented 7 months ago

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 commented 7 months ago

Steps to reproduce:

MaikBusch78 commented 7 months ago

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

danielscherzer commented 6 months ago

Thanks! I can confirm this behaviour.

danielscherzer commented 6 months ago

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

MaikBusch78 commented 6 months ago

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

danielscherzer commented 6 months ago

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