mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +11:00
Address review comments
This commit is contained in:
parent
e2ed54361d
commit
abd238bff3
|
@ -208,7 +208,7 @@ impl VkInstance {
|
||||||
None,
|
None,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
let (_dbg_loader, _dbg_callbk) = if false {
|
let (_dbg_loader, _dbg_callbk) = if cfg!(debug_assertions) {
|
||||||
let dbg_info = vk::DebugUtilsMessengerCreateInfoEXT::builder()
|
let dbg_info = vk::DebugUtilsMessengerCreateInfoEXT::builder()
|
||||||
.message_severity(
|
.message_severity(
|
||||||
vk::DebugUtilsMessageSeverityFlagsEXT::ERROR
|
vk::DebugUtilsMessageSeverityFlagsEXT::ERROR
|
||||||
|
@ -504,7 +504,7 @@ impl crate::Device for VkDevice {
|
||||||
|
|
||||||
/// This creates a pipeline that runs over the buffer.
|
/// This creates a pipeline that runs over the buffer.
|
||||||
///
|
///
|
||||||
/// The descriptor set layout is just some number of buffers (this will change).
|
/// The descriptor set layout is just some number of storage buffers and storage images (this might change).
|
||||||
unsafe fn create_simple_compute_pipeline(
|
unsafe fn create_simple_compute_pipeline(
|
||||||
&self,
|
&self,
|
||||||
code: &[u8],
|
code: &[u8],
|
||||||
|
|
|
@ -63,11 +63,11 @@ void main() {
|
||||||
SegChunk seg_chunk = SegChunk_read(seg_chunk_ref);
|
SegChunk seg_chunk = SegChunk_read(seg_chunk_ref);
|
||||||
for (int i = 0; i < seg_chunk.n; i++) {
|
for (int i = 0; i < seg_chunk.n; i++) {
|
||||||
Segment seg = Segment_read(SegmentRef(seg_chunk_ref.offset + SegChunk_size + Segment_size * i));
|
Segment seg = Segment_read(SegmentRef(seg_chunk_ref.offset + SegChunk_size + Segment_size * i));
|
||||||
vec2 line_vec = seg.end - seg.start;
|
vec2 line_vec = seg.end - seg.start;
|
||||||
vec2 dpos = xy + vec2(0.5, 0.5) - seg.start;
|
vec2 dpos = xy + vec2(0.5, 0.5) - seg.start;
|
||||||
float t = clamp(dot(line_vec, dpos) / dot(line_vec, line_vec), 0.0, 1.0);
|
float t = clamp(dot(line_vec, dpos) / dot(line_vec, line_vec), 0.0, 1.0);
|
||||||
df = min(df, length(line_vec * t - dpos));
|
df = min(df, length(line_vec * t - dpos));
|
||||||
}
|
}
|
||||||
seg_chunk_ref = seg_chunk.next;
|
seg_chunk_ref = seg_chunk.next;
|
||||||
} while (seg_chunk_ref.offset != 0);
|
} while (seg_chunk_ref.offset != 0);
|
||||||
fg_rgba = unpackUnorm4x8(stroke.rgba_color).wzyx;
|
fg_rgba = unpackUnorm4x8(stroke.rgba_color).wzyx;
|
||||||
|
|
Loading…
Reference in a new issue