Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ RUST_LOG=info cargo run --bin colour-uniform --features metal
Compiling hal-examples v0.1.0 (/Users/parasyte/other-projects/gfx/examples)
Finished dev [unoptimized + debuginfo] target(s) in 11.09s
Running `/Users/parasyte/other-projects/gfx/target/debug/colour-uniform`
Chosen: AdapterInfo { name: "AMD Radeon Pro 560", vendor: 0, device: 0, device_type: DiscreteGpu }
AdapterInfo { name: "Intel(R) HD Graphics 630", vendor: 0, device: 0, device_type: IntegratedGpu }
Limits { max_image_1d_size: 16384, max_image_2d_size: 16384, max_image_3d_size: 2048, max_image_cube_size: 16384, max_image_array_layers: 2048, max_texel_elements: 268435456, max_uniform_buffer_range: 1073741824, max_storage_buffer_range: 1073741824, max_push_constants_size: 4096, max_memory_allocation_count: 4096, max_sampler_allocation_count: 18446744073709551615, max_bound_descriptor_sets: 8, max_framebuffer_layers: 2048, max_per_stage_descriptor_samplers: 16, max_per_stage_descriptor_uniform_buffers: 31, max_per_stage_descriptor_storage_buffers: 31, max_per_stage_descriptor_sampled_images: 128, max_per_stage_descriptor_storage_images: 128, max_per_stage_descriptor_input_attachments: 128, max_per_stage_resources: 256, max_descriptor_set_samplers: 0, max_descriptor_set_uniform_buffers: 256, max_descriptor_set_uniform_buffers_dynamic: 0, max_descriptor_set_storage_buffers: 0, max_descriptor_set_storage_buffers_dynamic: 0, max_descriptor_set_sampled_images: 0, max_descriptor_set_storage_images: 0, max_descriptor_set_input_attachments: 0, max_vertex_input_attributes: 31, max_vertex_input_bindings: 31, max_vertex_input_attribute_offset: 255, max_vertex_input_binding_stride: 256, max_vertex_output_components: 16, max_patch_size: 0, max_geometry_shader_invocations: 0, max_geometry_input_components: 0, max_geometry_output_components: 0, max_geometry_output_vertices: 0, max_geometry_total_output_components: 0, max_fragment_input_components: 32, max_fragment_output_attachments: 0, max_fragment_dual_source_attachments: 0, max_fragment_combined_output_resources: 0, max_compute_shared_memory_size: 0, max_compute_work_group_count: [16, 16, 16], max_compute_work_group_invocations: 0, max_compute_work_group_size: [64, 64, 64], max_draw_indexed_index_value: 0, max_draw_indirect_count: 0, max_sampler_lod_bias: 0.0, max_sampler_anisotropy: 16.0, max_viewports: 1, max_viewport_dimensions: [16384, 16384], max_framebuffer_extent: Extent { width: 16384, height: 16384, depth: 2048 }, min_memory_map_alignment: 0, buffer_image_granularity: 1, min_texel_buffer_offset_alignment: 256, min_uniform_buffer_offset_alignment: 256, min_storage_buffer_offset_alignment: 256, framebuffer_color_sample_counts: 5, framebuffer_depth_sample_counts: 5, framebuffer_stencil_sample_counts: 5, max_color_attachments: 4, standard_sample_locations: false, optimal_buffer_copy_offset_alignment: 256, optimal_buffer_copy_pitch_alignment: 4, non_coherent_atom_size: 4, min_vertex_input_binding_stride_alignment: 4 }
Memory types: [MemoryType { properties: DEVICE_LOCAL, heap_index: 0 }, MemoryType { properties: CPU_VISIBLE | COHERENT, heap_index: 1 }, MemoryType { properties: DEVICE_LOCAL | CPU_VISIBLE, heap_index: 1 }, MemoryType { properties: DEVICE_LOCAL | CPU_VISIBLE | CPU_CACHED, heap_index: 1 }]
formats: Some([Bgra8Unorm, Bgra8Srgb, Rgba16Sfloat])
Surface format: Bgra8Srgb
[2019-09-05T07:24:33Z INFO gfx_backend_metal::window] build swapchain SwapchainConfig { present_mode: Fifo, composite_alpha: OPAQUE, format: Bgra8Srgb, extent: Extent2D { width: 2048, height: 1536 }, image_count: 2, image_layers: 1, image_usage: COLOR_ATTACHMENT }
[2019-09-05T07:24:33Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-09-05T07:24:33Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Fragment, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
Instructions:
Choose whether to change the (R)ed, (G)reen or (B)lue color by pressing the appropriate key.
Type in the value you want to change it to, where 0 is nothing, 255 is normal and 510 is double, ect.
Then press C to change the (C)lear colour or (Enter) for the image color.
Set Red color to: 0 (press enter/C to confirm)
EventsCleared
RedrawRequested
EventsCleared
RedrawRequested
EventsCleared
RedrawRequested
[2019-09-05T07:24:34Z WARN gfx_backend_metal::window] Swapchain drawables are changed, unable to wait for 0
[2019-09-05T07:24:34Z WARN gfx_backend_metal::window] Failed to get the drawable of frame 0
EventsCleared
RedrawRequested
[2019-09-05T07:24:34Z INFO gfx_backend_metal::window] dropping Swapchain
[2019-09-05T07:24:34Z INFO gfx_backend_metal::window] dropping Frame
[2019-09-05T07:24:34Z INFO gfx_backend_metal::window] dropping Frame
formats: Some([Bgra8Unorm, Bgra8Srgb, Rgba16Sfloat])
Surface format: Bgra8Srgb
[2019-09-05T07:24:34Z INFO gfx_backend_metal::window] build swapchain SwapchainConfig { present_mode: Fifo, composite_alpha: OPAQUE, format: Bgra8Srgb, extent: Extent2D { width: 2048, height: 1536 }, image_count: 2, image_layers: 1, image_usage: COLOR_ATTACHMENT }
[2019-09-05T07:24:34Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-09-05T07:24:34Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Fragment, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
EventsCleared
RedrawRequested
[2019-09-05T07:24:34Z WARN gfx_backend_metal::window] Swapchain drawables are changed, unable to wait for 0
[2019-09-05T07:24:34Z WARN gfx_backend_metal::window] Failed to get the drawable of frame 0
EventsCleared
RedrawRequested
[2019-09-05T07:24:34Z INFO gfx_backend_metal::window] dropping Swapchain
[2019-09-05T07:24:34Z INFO gfx_backend_metal::window] dropping Frame
[2019-09-05T07:24:34Z INFO gfx_backend_metal::window] dropping Frame
formats: Some([Bgra8Unorm, Bgra8Srgb, Rgba16Sfloat])
Surface format: Bgra8Srgb
[2019-09-05T07:24:34Z INFO gfx_backend_metal::window] build swapchain SwapchainConfig { present_mode: Fifo, composite_alpha: OPAQUE, format: Bgra8Srgb, extent: Extent2D { width: 2048, height: 1536 }, image_count: 2, image_layers: 1, image_usage: COLOR_ATTACHMENT }
[2019-09-05T07:24:34Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-09-05T07:24:34Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Fragment, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
EventsCleared
RedrawRequested
[2019-09-05T07:24:34Z WARN gfx_backend_metal::window] Swapchain drawables are changed, unable to wait for 0
[2019-09-05T07:24:34Z WARN gfx_backend_metal::window] Failed to get the drawable of frame 0
EventsCleared
RedrawRequested
[2019-09-05T07:24:35Z INFO gfx_backend_metal::window] dropping Swapchain
[2019-09-05T07:24:35Z INFO gfx_backend_metal::window] dropping Frame
[2019-09-05T07:24:35Z INFO gfx_backend_metal::window] dropping Frame
formats: Some([Bgra8Unorm, Bgra8Srgb, Rgba16Sfloat])
Surface format: Bgra8Srgb
[2019-09-05T07:24:35Z INFO gfx_backend_metal::window] build swapchain SwapchainConfig { present_mode: Fifo, composite_alpha: OPAQUE, format: Bgra8Srgb, extent: Extent2D { width: 2048, height: 1536 }, image_count: 2, image_layers: 1, image_usage: COLOR_ATTACHMENT }
[2019-09-05T07:24:35Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-09-05T07:24:35Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Fragment, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
EventsCleared
RedrawRequested
[2019-09-05T07:24:38Z WARN gfx_backend_metal::window] Swapchain drawables are changed, unable to wait for 0
[2019-09-05T07:24:38Z WARN gfx_backend_metal::window] Failed to get the drawable of frame 0
EventsCleared
RedrawRequested
[2019-09-05T07:24:38Z INFO gfx_backend_metal::window] dropping Swapchain
[2019-09-05T07:24:38Z INFO gfx_backend_metal::window] dropping Frame
[2019-09-05T07:24:38Z INFO gfx_backend_metal::window] dropping Frame
formats: Some([Bgra8Unorm, Bgra8Srgb, Rgba16Sfloat])
Surface format: Bgra8Srgb
[2019-09-05T07:24:38Z INFO gfx_backend_metal::window] build swapchain SwapchainConfig { present_mode: Fifo, composite_alpha: OPAQUE, format: Bgra8Srgb, extent: Extent2D { width: 2048, height: 1536 }, image_count: 2, image_layers: 1, image_usage: COLOR_ATTACHMENT }
[2019-09-05T07:24:38Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-09-05T07:24:38Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Fragment, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
EventsCleared
RedrawRequested
[2019-09-05T07:24:38Z WARN gfx_backend_metal::window] Swapchain drawables are changed, unable to wait for 0
[2019-09-05T07:24:38Z WARN gfx_backend_metal::window] Failed to get the drawable of frame 0
EventsCleared
RedrawRequested
[2019-09-05T07:24:39Z INFO gfx_backend_metal::window] dropping Swapchain
[2019-09-05T07:24:39Z INFO gfx_backend_metal::window] dropping Frame
[2019-09-05T07:24:39Z INFO gfx_backend_metal::window] dropping Frame
formats: Some([Bgra8Unorm, Bgra8Srgb, Rgba16Sfloat])
Surface format: Bgra8Srgb
[2019-09-05T07:24:39Z INFO gfx_backend_metal::window] build swapchain SwapchainConfig { present_mode: Fifo, composite_alpha: OPAQUE, format: Bgra8Srgb, extent: Extent2D { width: 2048, height: 1536 }, image_count: 2, image_layers: 1, image_usage: COLOR_ATTACHMENT }
[2019-09-05T07:24:39Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-09-05T07:24:39Z INFO gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Fragment, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
EventsCleared
RedrawRequested
[2019-09-05T07:24:39Z WARN gfx_backend_metal::window] Swapchain drawables are changed, unable to wait for 0
[2019-09-05T07:24:39Z WARN gfx_backend_metal::window] Failed to get the drawable of frame 0
EventsCleared
[2019-09-05T07:24:40Z INFO gfx_backend_metal::window] dropping Swapchain
[2019-09-05T07:24:40Z INFO gfx_backend_metal::window] dropping Frame
[2019-09-05T07:24:40Z INFO gfx_backend_metal::window] dropping Frame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.