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

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!

src/back/msl/writer.rs Outdated Show resolved Hide resolved
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
@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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants