Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ET-VK] Simplify lane offset copy logic in copy_packed_dim_offset shader. #9416

Open
wants to merge 3 commits into
base: gh/trivedivivek/69/base
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -69,22 +69,15 @@ void no_repeat_copy(ivec3 pos) {
// Keep input values from the end of current input pixel based on src_lane_offset
// offset 1 means the first lane of current input texel is not a part of the output texel
// offset 2 means first 2 lanes are not and so on
if (src_lane_offset == 1) {
in_value.xyz = in_value.yzw;
} else if (src_lane_offset == 2) {
in_value.xy = in_value.zw;
} else {
in_value.x = in_value.w;
}
// Copy next texel's values towards the end of input texel, based on lane offset
// offset 1 means the first lane from next texel is part of the input texel
// offset 2 means first 2 lanes from next texel is part of the input texel and so on
if (src_lane_offset == 1) {
in_value.w = next_value.x;
in_value = ivec4(in_value.yzw, next_value.x);
} else if (src_lane_offset == 2) {
in_value.zw = next_value.xy;
in_value = ivec4(in_value.zw, next_value.xy);
} else {
in_value.yzw = next_value.xyz;
in_value = ivec4(in_value.w, next_value.xyz);
}
}

Loading
Oops, something went wrong.