From 917d5adf9cd7d75add909de3194009ec16ffe505 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 10 Apr 2019 12:04:46 -0400 Subject: [PATCH] AmberScript and README updates --- README.md | 12 ++++++++---- docs/amber_script.md | 10 +--------- tools/amber-syntax.vim | 5 ++--- tools/amber.sublime-syntax | 4 ++-- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 85073921d..ec8665ec1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/amber_script.md b/docs/amber_script.md index c755d2a70..6f937fd56 100644 --- a/docs/amber_script.md +++ b/docs/amber_script.md @@ -98,8 +98,6 @@ either image buffers or, what the target API would refer to as a buffer. * vec[2,3,4]\ * mat[2,3,4]x[2,3,4]\    -- useful? -TODO(dneto): Support half-precision floating point. - Sized arrays and structures are not currently representable. ``` @@ -118,8 +116,6 @@ BUFFER DATA_TYPE SIZE BUFFER FORMAT ``` -TODO(dsinclair): Does framebuffer need a format attached to it? - #### Buffer Initializers ``` @@ -142,7 +138,7 @@ The COPY command copy all data, values and memory from to COPY 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. @@ -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. - TODO(dsinclair): Sync the BufferTypes with the list of Vulkan Descriptor types. A `pipeline` can have buffers bound. This includes buffers to contain image @@ -348,9 +342,7 @@ CLEAR #### Comparators * EQ - * EQ\_FLOAT * NE - * NE\_FLOAT * LT * LE * GT diff --git a/tools/amber-syntax.vim b/tools/amber-syntax.vim index 3a6ba9a27..b3caa386b 100644 --- a/tools/amber-syntax.vim +++ b/tools/amber-syntax.vim @@ -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 @@ -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 diff --git a/tools/amber.sublime-syntax b/tools/amber.sublime-syntax index 4a9ad3a75..e7f518da6 100644 --- a/tools/amber.sublime-syntax +++ b/tools/amber.sublime-syntax @@ -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