mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
gpu,gpu/shaders: revert attempt to fix path gaps
This is effectively a revert of [0], reintroducing the path gaps described in [1]. A follow-up change will implement another attempt. [0] https://gioui.org/commit/2feec23561cd84d6b8ddbab84a202df66b123208 [1] https://github.com/linebender/piet-gpu/issues/62 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+9
-13
@@ -10,14 +10,13 @@ struct State {
|
||||
vec4 mat;
|
||||
vec2 translate;
|
||||
vec4 bbox;
|
||||
uint tail;
|
||||
float linewidth;
|
||||
uint flags;
|
||||
uint path_count;
|
||||
uint pathseg_count;
|
||||
};
|
||||
|
||||
#define State_size 60
|
||||
#define State_size 56
|
||||
|
||||
StateRef State_index(StateRef ref, uint index) {
|
||||
return StateRef(ref.offset + index * State_size);
|
||||
@@ -39,16 +38,14 @@ State State_read(StateRef ref) {
|
||||
uint raw11 = state[ix + 11];
|
||||
uint raw12 = state[ix + 12];
|
||||
uint raw13 = state[ix + 13];
|
||||
uint raw14 = state[ix + 14];
|
||||
State s;
|
||||
s.mat = vec4(uintBitsToFloat(raw0), uintBitsToFloat(raw1), uintBitsToFloat(raw2), uintBitsToFloat(raw3));
|
||||
s.translate = vec2(uintBitsToFloat(raw4), uintBitsToFloat(raw5));
|
||||
s.bbox = vec4(uintBitsToFloat(raw6), uintBitsToFloat(raw7), uintBitsToFloat(raw8), uintBitsToFloat(raw9));
|
||||
s.tail = raw10;
|
||||
s.linewidth = uintBitsToFloat(raw11);
|
||||
s.flags = raw12;
|
||||
s.path_count = raw13;
|
||||
s.pathseg_count = raw14;
|
||||
s.linewidth = uintBitsToFloat(raw10);
|
||||
s.flags = raw11;
|
||||
s.path_count = raw12;
|
||||
s.pathseg_count = raw13;
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -64,10 +61,9 @@ void State_write(StateRef ref, State s) {
|
||||
state[ix + 7] = floatBitsToUint(s.bbox.y);
|
||||
state[ix + 8] = floatBitsToUint(s.bbox.z);
|
||||
state[ix + 9] = floatBitsToUint(s.bbox.w);
|
||||
state[ix + 10] = s.tail;
|
||||
state[ix + 11] = floatBitsToUint(s.linewidth);
|
||||
state[ix + 12] = s.flags;
|
||||
state[ix + 13] = s.path_count;
|
||||
state[ix + 14] = s.pathseg_count;
|
||||
state[ix + 10] = floatBitsToUint(s.linewidth);
|
||||
state[ix + 11] = s.flags;
|
||||
state[ix + 12] = s.path_count;
|
||||
state[ix + 13] = s.pathseg_count;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user