Skip to content

Commit e243d81

Browse files
authored
Release 0.16.1 - Fixed VUID-02703 & VUID-02699 (#31)
1 parent e530790 commit e243d81

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Unreleased
22

3+
# Version 0.16.1 (July 25th, 2022)
4+
5+
- Fixed `VUID-vkCmdDraw-None-02703` & `VUID-vkCmdDraw-None-02699` validation errors.
6+
37
# Version 0.16.0 (July 20th, 2022)
48

59
- **BREAKING** Update dependency `vulkano` & `vulkano-shaders` to `0.30`.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "basalt"
33
edition = "2021"
4-
version = "0.16.0"
4+
version = "0.16.1"
55
authors = ["Austin <[email protected]>"]
66
repository = "https://github.com/AustinJ235/basalt"
77
documentation = "https://docs.rs/basalt"

src/interface/render/layer_fs.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ pub mod layer_fs {
4646
vec4 s = vec4(xcubic.xz + xcubic.yw, ycubic.xz + ycubic.yw);
4747
vec4 offset = c + vec4 (xcubic.yw, ycubic.yw) / s;
4848
offset *= invTexSize.xxyy;
49-
vec4 sample0 = texture(tex_nearest[tex_i], offset.xz);
50-
vec4 sample1 = texture(tex_nearest[tex_i], offset.yz);
51-
vec4 sample2 = texture(tex_nearest[tex_i], offset.xw);
52-
vec4 sample3 = texture(tex_nearest[tex_i], offset.yw);
49+
vec4 sample0 = textureLod(tex_nearest[tex_i], offset.xz, 0);
50+
vec4 sample1 = textureLod(tex_nearest[tex_i], offset.yz, 0);
51+
vec4 sample2 = textureLod(tex_nearest[tex_i], offset.xw, 0);
52+
vec4 sample3 = textureLod(tex_nearest[tex_i], offset.yw, 0);
5353
float sx = s.x / (s.x + s.y);
5454
float sy = s.z / (s.z + s.w);
5555
return mix(mix(sample3, sample2, sx), mix(sample1, sample0, sx), sy);
@@ -88,7 +88,7 @@ pub mod layer_fs {
8888
out_std_rgba(clamp(textureBicubic(coords) * color, 0.0, 1.0));
8989
}
9090
else if(type == 2) { // Glyph
91-
vec3 mask = texture(tex_nearest[tex_i], coords).rgb;
91+
vec3 mask = textureLod(tex_nearest[tex_i], coords, 0).rgb;
9292
9393
if(mask.r <= epsilon && mask.g <= epsilon && mask.b <= epsilon) {
9494
discard;

src/interface/render/pipeline.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ pub(super) struct ItfPipeline {
5050
pipeline_cache: Arc<PipelineCache>,
5151
image_sampler: Arc<Sampler>,
5252
conservative_draw: bool,
53+
empty_image: Arc<BstImageView>,
5354
}
5455

5556
struct Context {
@@ -126,6 +127,7 @@ impl ItfPipeline {
126127
.unwrap(),
127128
conservative_draw: bst.options_ref().app_loop
128129
&& bst.options_ref().conservative_draw,
130+
empty_image: bst.atlas_ref().empty_image(),
129131
bst,
130132
}
131133
}
@@ -144,7 +146,7 @@ impl ItfPipeline {
144146
&& view.images.len() > self.context.as_ref().unwrap().image_capacity)
145147
{
146148
let mut image_capacity =
147-
self.context.as_ref().map(|c| c.image_capacity).unwrap_or(2);
149+
self.context.as_ref().map(|c| c.image_capacity).unwrap_or(1);
148150

149151
while image_capacity < view.images.len() {
150152
image_capacity *= 2;
@@ -541,6 +543,8 @@ impl ItfPipeline {
541543
view.images
542544
.iter()
543545
.cloned()
546+
// VUID-vkCmdDraw-None-02699
547+
.chain((0..(context.image_capacity - view.images.len())).into_iter().map(|_| self.empty_image.clone()))
544548
.map(|image| (image as Arc<_>, nearest_sampler.clone())),
545549
),
546550
]

0 commit comments

Comments
 (0)