google / google/amber

Image dumps only support limited formats

Open
#800 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
228
Forks
77
PR merge metrics
No merged PRs in 30d

Description

```
#!amber

SHADER vertex vs PASSTHROUGH

SHADER fragment test GLSL
#version 450 core

layout(location=0) out vec4 color_out;

void main()
{
color_out = vec4(1.0, 0.0, 0.0, 1.0);
}
END

BUFFER color_buffer FORMAT R8G8B8A8_UNORM

PIPELINE graphics test_pipe
ATTACH vs
ATTACH test

FRAMEBUFFER_SIZE 8 8
BIND BUFFER color_buffer AS color LOCATION 0
END

RUN test_pipe DRAW_RECT POS 0 0 SIZE 8 8
```

Running the above as test.amber:
```
amber test.amber -I color_buffer -i out.png
```

Produces an assertion:
>Framebuffer (color_buffer) size (0) != width * height (64)

This assertion goes away if the format is changed to `B8G8R8A8_UNORM`.

At very least the error message should be improved.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.