Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Fix textureGather compatibility on macOS 10.13 #2104

Merged
merged 3 commits into from
Oct 27, 2022

Conversation

xiaopengli89
Copy link
Contributor

thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
    Internal error in VERTEX shader: Metal: Compilation failed: 

program_source:90:65: error: use of undeclared identifier 'int2'; did you mean 'int'?
            metal::float4 _e4 = image.gather(samp, tex_coord_1, int2(0), metal::component::y);
                                                                ^
program_source:94:65: error: use of undeclared identifier 'int2'; did you mean 'int'?
            metal::float4 _e5 = image.gather(samp, tex_coord_1, int2(0), metal::component::z);
                                                                ^
program_source:98:65: error: use of undeclared identifier 'int2'; did you mean 'int'?
            metal::float4 _e6 = image.gather(samp, tex_coord_1, int2(0), metal::component::w);
                                                                ^
program_source:196:98: warning: suggest braces around initialization of subobject
                fitting_lanczos_weight(weight_color_1, weight_sum_1, _e74, point_ori_1, type_10 {metal::float2(gather_center.x - 0.5, gather_center.y + 0.5), metal::float2(gather_center.x + 0.5, gather_center.y + 0.5), metal::float2(gather_center.x + 0.5, gather_center.y - 0.5), metal::float2(gather_center.x - 0.5, gather_center.y - 0.5)}, fitting_scale);
                                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                 {                                                                                                                                                                                                                                                 }


', /Users/admin/.cargo/git/checkouts/wgpu-53e70f8674b08dd4/754a4ba/wgpu/src/backend/[direct.rs:2418](http://direct.rs:2418/):5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Just a small improvement and it should be good to go!

Co-authored-by: Teodor Tanasoaia <[email protected]>
@xiaopengli89 xiaopengli89 requested a review from teoxoy October 27, 2022 04:42
@teoxoy teoxoy merged commit e7fc8e6 into gfx-rs:master Oct 27, 2022
This was referenced Oct 27, 2022
xiaopengli89 added a commit to xiaopengli89/wgpu that referenced this pull request Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants