Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,18 @@ A Vulkan implementation is found by CMake in the following priority order:
Environment variables:
* `VULKAN_SDK` should point to the platform-specific SDK directory
that contains the `include` and `lib` directories.
Example: `VULKAN_SDK=$HOME/vulkan-macos-1.1.85.0/macOS`
* `VK_ICD_FILENAMES` should point to the ICD JSON file.
Example: `VK_ICD_FILENAMES=$VULKAN_SDK/etc/vulkan/icd.d/MoltenVK_icd.json`
* `VK_LAYER_PATH` should point to the
$VULKAN_SDK/etc/vulkan/explicit\_layer.d folder.
* `VK_LAYER_PATH` should point to the explicit\_layer.d folder.
* `LD_LIBRARY_PATH` must contain the $VULKAN_SDK/lib/ folder for the
validation libraries.

```
export VULKAN_SDK=$HOME/vulkan-macos-1.1.85.0/macOS
export VK_ICD_FILENAMES=$VULKAN_SDK/etc/vulkan/icd.d/MoltenVK_icd.json
export VK_LAYER_PATH=$VULKAN_SDK/etc/vulkan/explicit_layer.d
export LD_LIBRARY_PATH=$VULKAN_SDK/lib:$LD_LIBRARY_PATH
```

### Using Dawn as a backend

We assume you have built [Dawn][Dawn] from source, and have access to both the
Expand Down
10 changes: 1 addition & 9 deletions docs/amber_script.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ either image buffers or, what the target API would refer to as a buffer.
* vec[2,3,4]\<type>
* mat[2,3,4]x[2,3,4]\<type>    -- useful?

TODO(dneto): Support half-precision floating point.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An upcoming CL allows this to be a image format as well. So this could be done with R16_SFLOAT as the format.


Sized arrays and structures are not currently representable.

```
Expand All @@ -118,8 +116,6 @@ BUFFER <name> DATA_TYPE <type> SIZE <size_in_items> <initializer>
BUFFER <name> FORMAT <format_string>
```

TODO(dsinclair): Does framebuffer need a format attached to it?
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

framebuffer doesn't exist anymore.


#### Buffer Initializers

```
Expand All @@ -142,7 +138,7 @@ The COPY command copy all data, values and memory from <buffer_from> to
COPY <buffer_from> TO <buffer_to>
```

Both buffers must be declared, and of the same type.
Both buffers must be declared, and of the same data type.

Buffers used as copy destination can be used only as copy destination, and as
argument to an EXPECT command.
Expand Down Expand Up @@ -207,8 +203,6 @@ The following commands are all specified within the `PIPELINE` command.
* uniform
* storage

TODO(dsinclair): Reserve `input` as a buffer type for input attachments.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colour attachments aren't a buffer type, they're done with ATTACH now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input attachments are not colour attachments. They are another kind of attachment with their own index space. See InputAttachmentIndex decoration in SPIR-V.

But point taken, the syntax should be something like:

BIND BUFFER  myInputAttachment AS input LOCATION 0

(reusing LOCATION here, but could just as well be INDEX.)


TODO(dsinclair): Sync the BufferTypes with the list of Vulkan Descriptor types.

A `pipeline` can have buffers bound. This includes buffers to contain image
Expand Down Expand Up @@ -348,9 +342,7 @@ CLEAR <pipeline>

#### Comparators
* EQ
* EQ\_FLOAT
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure these are useful, so removing for now.

* NE
* NE\_FLOAT
* LT
* LE
* GT
Expand Down
5 changes: 2 additions & 3 deletions tools/amber-syntax.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ syn keyword amberBlockCmd VERTEX_DATA INDEX_DATA INDEXED IMAGE_ATTACHMENT
syn keyword amberBlockCmd DEPTH_STENCIL_ATTACHMENT DEVICE_FEATURE TOLERANCE
syn keyword amberBlockCmd REPEAT COPY DERIVE_PIPELINE FROM

syn keyword amberComparator EQ NE LT LE GT GE EQ_RGB EQ_RGBA
syn keyword amberComparator EQ NE LT LE GT GE EQ_RGB EQ_RGBA EQ_BUFFER

syn keyword amberKeyword compute vertex geometry fragment graphics
syn keyword amberKeyword tessellation_evaulation tessellation_control
Expand All @@ -50,8 +50,7 @@ syn keyword amberTopology line_strip line_strip_with_adjacency triangle_list
syn keyword amberTopology triangle_list_with_adjacench triangle_strip
syn keyword amberTopology triangle_strip_with_adjacency triangle_fan patch_list

syn keyword amberBufferType uniform storage vertex index sampled storage color
syn keyword amberBufferType framebuffer depth image depth_stencil
syn keyword amberBufferType uniform storage push_constant

let b:current_syntax = "amber"
hi def link amberTodo Todo
Expand Down
4 changes: 2 additions & 2 deletions tools/amber.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ contexts:
scope: constant.character.escape.amber
- match: '\b(framebuffer|graphics)\b'
scope: constant.character.escape.amber
- match: '\b(uniform|storage|index|sampled|storage|color|depth|image|depth_stencil)\b'
- match: '\b(uniform|storage|push_constant)\b'
scope: constant.character.escape.amber
- match: '\b(EQ|NE|LT|LE|GT|GE|EQ_RGB|EQ_RGBA)\b'
- match: '\b(EQ|NE|LT|LE|GT|GE|EQ_RGB|EQ_RGBA|EQ_BUFFER)\b'
scope: constant.character.esape.amber
- match: '\b(GLSL|HLSL|SPIRV-ASM|SPIRV-HEX|OPENCL-C)\b'
scope: constant.character.escape.amber
Expand Down