Skip to content

Commit

Permalink
shader fix: rename Dim2 to _2d
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Jan 13, 2024
1 parent bd2ddb5 commit 6c899ec
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 43 deletions.
56 changes: 28 additions & 28 deletions src/shaders/mrt.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ extern(C):
ATTR_VS_DBG_POS = 0
Fragment shader: fs_dbg
Image 'tex':
Type: sg.ImageType.Dim2
Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Bind slot: SLOT_TEX = 0
Image 'tex':
Image Type: sg.ImageType.Dim2
Image Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Multisampled: false
Bind slot: SLOT_tex = 0
Expand All @@ -43,29 +43,29 @@ extern(C):
Bind slot: SLOT_FSQ_PARAMS = 0
Fragment shader: fs_fsq
Image 'tex0':
Type: sg.ImageType.Dim2
Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Bind slot: SLOT_TEX0 = 0
Image 'tex1':
Type: sg.ImageType.Dim2
Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Bind slot: SLOT_TEX1 = 1
Image 'tex2':
Type: sg.ImageType.Dim2
Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Bind slot: SLOT_TEX2 = 2
Image 'tex0':
Image Type: sg.ImageType.Dim2
Image Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Multisampled: false
Bind slot: SLOT_tex0 = 0
Image 'tex1':
Image Type: sg.ImageType.Dim2
Image Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Multisampled: false
Bind slot: SLOT_tex1 = 1
Image 'tex2':
Image Type: sg.ImageType.Dim2
Image Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Multisampled: false
Bind slot: SLOT_tex2 = 2
Expand Down Expand Up @@ -2038,7 +2038,7 @@ sg.ShaderDesc dbg_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -2056,7 +2056,7 @@ sg.ShaderDesc dbg_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -2077,7 +2077,7 @@ sg.ShaderDesc dbg_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -2093,7 +2093,7 @@ sg.ShaderDesc dbg_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main0";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -2109,7 +2109,7 @@ sg.ShaderDesc dbg_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand Down Expand Up @@ -2139,15 +2139,15 @@ sg.ShaderDesc fsq_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.images[1].used = true;
desc.fs.images[1].multisampled = false;
desc.fs.images[1].image_type = sg.ImageType.Dim2;
desc.fs.images[1].image_type = sg.ImageType._2d;
desc.fs.images[1].sample_type = sg.ImageSampleType.Float;
desc.fs.images[2].used = true;
desc.fs.images[2].multisampled = false;
desc.fs.images[2].image_type = sg.ImageType.Dim2;
desc.fs.images[2].image_type = sg.ImageType._2d;
desc.fs.images[2].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand Down Expand Up @@ -2178,15 +2178,15 @@ sg.ShaderDesc fsq_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.images[1].used = true;
desc.fs.images[1].multisampled = false;
desc.fs.images[1].image_type = sg.ImageType.Dim2;
desc.fs.images[1].image_type = sg.ImageType._2d;
desc.fs.images[1].sample_type = sg.ImageSampleType.Float;
desc.fs.images[2].used = true;
desc.fs.images[2].multisampled = false;
desc.fs.images[2].image_type = sg.ImageType.Dim2;
desc.fs.images[2].image_type = sg.ImageType._2d;
desc.fs.images[2].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand Down Expand Up @@ -2217,15 +2217,15 @@ sg.ShaderDesc fsq_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.images[1].used = true;
desc.fs.images[1].multisampled = false;
desc.fs.images[1].image_type = sg.ImageType.Dim2;
desc.fs.images[1].image_type = sg.ImageType._2d;
desc.fs.images[1].sample_type = sg.ImageSampleType.Float;
desc.fs.images[2].used = true;
desc.fs.images[2].multisampled = false;
desc.fs.images[2].image_type = sg.ImageType.Dim2;
desc.fs.images[2].image_type = sg.ImageType._2d;
desc.fs.images[2].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -2249,15 +2249,15 @@ sg.ShaderDesc fsq_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main0";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.images[1].used = true;
desc.fs.images[1].multisampled = false;
desc.fs.images[1].image_type = sg.ImageType.Dim2;
desc.fs.images[1].image_type = sg.ImageType._2d;
desc.fs.images[1].sample_type = sg.ImageSampleType.Float;
desc.fs.images[2].used = true;
desc.fs.images[2].multisampled = false;
desc.fs.images[2].image_type = sg.ImageType.Dim2;
desc.fs.images[2].image_type = sg.ImageType._2d;
desc.fs.images[2].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -2281,15 +2281,15 @@ sg.ShaderDesc fsq_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.images[1].used = true;
desc.fs.images[1].multisampled = false;
desc.fs.images[1].image_type = sg.ImageType.Dim2;
desc.fs.images[1].image_type = sg.ImageType._2d;
desc.fs.images[1].sample_type = sg.ImageSampleType.Float;
desc.fs.images[2].used = true;
desc.fs.images[2].multisampled = false;
desc.fs.images[2].image_type = sg.ImageType.Dim2;
desc.fs.images[2].image_type = sg.ImageType._2d;
desc.fs.images[2].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand Down
14 changes: 7 additions & 7 deletions src/shaders/offscreen.d
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ extern(C):
Bind slot: SLOT_VS_PARAMS = 0
Fragment shader: fs_default
Image 'tex':
Type: sg.ImageType.Dim2
Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Bind slot: SLOT_TEX = 0
Image 'tex':
Image Type: sg.ImageType.Dim2
Image Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Multisampled: false
Bind slot: SLOT_tex = 0
Expand Down Expand Up @@ -1351,7 +1351,7 @@ sg.ShaderDesc default_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -1376,7 +1376,7 @@ sg.ShaderDesc default_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -1403,7 +1403,7 @@ sg.ShaderDesc default_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -1421,7 +1421,7 @@ sg.ShaderDesc default_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main0";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -1439,7 +1439,7 @@ sg.ShaderDesc default_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand Down
14 changes: 7 additions & 7 deletions src/shaders/texcube.d
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ extern(C):
Bind slot: SLOT_VS_PARAMS = 0
Fragment shader: fs
Image 'tex':
Type: sg.ImageType.Dim2
Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Bind slot: SLOT_TEX = 0
Image 'tex':
Image Type: sg.ImageType.Dim2
Image Type: sg.ImageType._2d
Sample Type: sg.ImageSampleType.Float
Multisampled: false
Bind slot: SLOT_tex = 0
Expand Down Expand Up @@ -717,7 +717,7 @@ sg.ShaderDesc texcube_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -742,7 +742,7 @@ sg.ShaderDesc texcube_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -769,7 +769,7 @@ sg.ShaderDesc texcube_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -787,7 +787,7 @@ sg.ShaderDesc texcube_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main0";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand All @@ -805,7 +805,7 @@ sg.ShaderDesc texcube_shader_desc(sg.Backend backend) @trusted @nogc nothrow {
desc.fs.entry = "main";
desc.fs.images[0].used = true;
desc.fs.images[0].multisampled = false;
desc.fs.images[0].image_type = sg.ImageType.Dim2;
desc.fs.images[0].image_type = sg.ImageType._2d;
desc.fs.images[0].sample_type = sg.ImageSampleType.Float;
desc.fs.samplers[0].used = true;
desc.fs.samplers[0].sampler_type = sg.SamplerType.Filtering;
Expand Down
1 change: 0 additions & 1 deletion src/sokol/gfx.d
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ enum IndexType {
}
enum ImageType {
Default,
Dim2,
_2d,
Cube,
_3d,
Expand Down

0 comments on commit 6c899ec

Please sign in to comment.