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

"gfx/examples/hal/quad" doesn't work on macbook with Iris Graphics with metal #1581

Closed
zakarumych opened this issue Oct 16, 2017 · 4 comments · Fixed by #1576
Closed

"gfx/examples/hal/quad" doesn't work on macbook with Iris Graphics with metal #1581

zakarumych opened this issue Oct 16, 2017 · 4 comments · Fixed by #1576

Comments

@zakarumych
Copy link

zakarumych commented Oct 16, 2017

Full output of command cargo run --features metal

AdapterInfo { name: "Intel Iris Pro Graphics", vendor: 0, device: 0, software_rendering: false }
pipelines: [Ok(GraphicsPipeline { raw: id(0x7fd9f983fa00), primitive_type: Triangle })]
Memory types: [MemoryType { id: 0, properties: CPU_VISIBLE | CPU_CACHED, heap_index: 0 }, MemoryType { id: 1, properties: CPU_VISIBLE | CPU_CACHED, heap_index: 0 }, MemoryType { id: 2, properties: COHERENT | CPU_VISIBLE | CPU_CACHED, heap_index: 0 }, MemoryType { id: 3, properties: DEVICE_LOCAL, heap_index: 1 }]
UnboundBuffer { size: 96 }
2017-10-16 18:46:14.449 quad[69047:2170851] -[MTLIGAccelDevice heapBufferSizeAndAlignWithLength:options:]: unrecognized selector sent to instance 0x7fd9fb098c00
[1]    69047 segmentation fault  cargo run --features metal

Ask me if additional info needed.

@zakarumych zakarumych changed the title "gfx/examples/hal/quad" doesn't work on macbook with Iris Graphics "gfx/examples/hal/quad" doesn't work on macbook with Iris Graphics with metal Oct 16, 2017
@kvark
Copy link
Member

kvark commented Oct 16, 2017

The method requires:

iOS 10.0+
macOS 10.13+
tvOS 10.0+

We should check for it and use another overload.

@zakarumych
Copy link
Author

zakarumych commented Oct 16, 2017

I have macOS 10.12
I'm going to update to 10.13 and verify that everything is OK with it.

@kvark
Copy link
Member

kvark commented Oct 16, 2017

wait please! we'll need you to verify a fix first

@zakarumych
Copy link
Author

Ok.

bors bot added a commit that referenced this issue Oct 17, 2017
1576: [metal] New binding model and SPIRV support r=msiglreith a=kvark

This PR grew out of scope (basic SPIRV-support), but that was necessary.
Major changes:
  - Argument buffer support is turned into a run-time feature flag, disabled until SPIRV gets support for it (KhronosGroup/SPIRV-Cross#293)
  - Proper resource binding/state inheritance for command buffers
  - SPIRV-cross integration

Also fixes #1581

## New binding model
Assignment from (descriptor_set, binding) to MSL buffer/texture/sampler index is figured out for the pipeline layout and stored inside it as a hashmap.

A shader is not really compiled at `create_shader_module`, but rather - at PSO creation time, since this is where we know about the pipeline layout. The resource binding overrides of that layout are fed directly into SPIRV-cross compile options.

A command buffer caches all bound resources at the MSL level (not descriptor set level, like it previously did). Binding descriptor sets would update the caches and potentially set the active encoder values. Both argument and regular vertex buffers just participate without extra semantics at this stage, simplifying the command buffer handling and solving the question of how to map those to not conflict.
@bors bors bot closed this as completed in #1576 Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants