[vulkan] Mark read-only buffers as such

Recent vulkan validation layers started complaining about vertex
processing stages having read-write buffers without atomics enabled
(fair enough), but I decided to get all the buffers that don't need to
be written.
This commit is contained in:
Bill Currie 2024-09-24 10:44:59 +09:00
parent 594ba86aae
commit e3d403cada
9 changed files with 19 additions and 19 deletions

View file

@ -2,11 +2,11 @@
#extension GL_GOOGLE_include_directive : enable
#extension GL_EXT_multiview : enable
layout (set = 0, binding = 0) buffer ShadowView {
layout (set = 0, binding = 0) readonly buffer ShadowView {
mat4x4 shadowView[];
};
layout (set = 0, binding = 1) buffer ShadowId {
layout (set = 0, binding = 1) readonly buffer ShadowId {
uint shadowId[];
};

View file

@ -8,7 +8,7 @@ layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) buffer Entities {
layout (set = 1, binding = 0) readonly buffer Entities {
Entity entities[];
};

View file

@ -7,7 +7,7 @@ layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) buffer Entities {
layout (set = 1, binding = 0) readonly buffer Entities {
Entity entities[];
};

View file

@ -2,11 +2,11 @@
#extension GL_GOOGLE_include_directive : enable
#extension GL_EXT_multiview : enable
layout (set = 0, binding = 0) buffer ShadowView {
layout (set = 0, binding = 0) readonly buffer ShadowView {
mat4x4 shadowView[];
};
layout (set = 0, binding = 1) buffer ShadowId {
layout (set = 0, binding = 1) readonly buffer ShadowId {
uint shadowId[];
};
@ -16,7 +16,7 @@ layout (push_constant) uniform PushConstants {
#include "entity.h"
layout (set = 1, binding = 0) buffer Entities {
layout (set = 1, binding = 0) readonly buffer Entities {
Entity entities[];
};

View file

@ -14,7 +14,7 @@ struct PlaneData {
vec4 tcolor;
};
layout (set = 1, binding = 0) buffer Planes {
layout (set = 1, binding = 0) readonly buffer Planes {
int numPlanes;
PlaneData planes[];
};

View file

@ -8,7 +8,7 @@ layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 3, binding = 0) buffer Bones {
layout (set = 3, binding = 0) readonly buffer Bones {
// NOTE these are transposed, so v * m
mat3x4 bones[];
};

View file

@ -4,15 +4,15 @@
layout (constant_id = 0) const bool IQMDepthOnly = false;
layout (set = 0, binding = 0) buffer ShadowView {
layout (set = 0, binding = 0) readonly buffer ShadowView {
mat4x4 shadowView[];
};
layout (set = 0, binding = 1) buffer ShadowId {
layout (set = 0, binding = 1) readonly buffer ShadowId {
uint shadowId[];
};
layout (set = 3, binding = 0) buffer Bones {
layout (set = 3, binding = 0) readonly buffer Bones {
// NOTE these are transposed, so v * m
mat3x4 bones[];
};

View file

@ -15,22 +15,22 @@ struct LightRender {
uint style;
};
layout (set = 0, binding = 0) buffer ShadowMatrices {
layout (set = 0, binding = 0) readonly buffer ShadowMatrices {
mat4 shadow_mats[];
};
layout (set = 1, binding = 0) buffer LightIds {
layout (set = 1, binding = 0) readonly buffer LightIds {
uint lightIds[];
};
layout (set = 1, binding = 1) buffer Lights {
layout (set = 1, binding = 1) readonly buffer Lights {
LightData lights[];
};
layout (set = 1, binding = 2) buffer Renderer {
layout (set = 1, binding = 2) readonly buffer Renderer {
LightRender renderer[];
};
layout (set = 1, binding = 3) buffer Style {
layout (set = 1, binding = 3) readonly buffer Style {
vec4 style[];
};
layout (set = 1, binding = 4) buffer LightEntIds {
layout (set = 1, binding = 4) readonly buffer LightEntIds {
uint light_entids[];
};

View file

@ -8,7 +8,7 @@ layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) buffer Entities {
layout (set = 1, binding = 0) readonly buffer Entities {
Entity entities[];
};