Skip to content

Instantly share code, notes, and snippets.

@leroycep
Created April 24, 2019 22:31
Show Gist options
  • Save leroycep/4e5a069565b57805c6f930dec3ee1e58 to your computer and use it in GitHub Desktop.
Save leroycep/4e5a069565b57805c6f930dec3ee1e58 to your computer and use it in GitHub Desktop.
Error loading texture in amethyst
~/p/f/g/dodger (master|✔) 1 $ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.25s
Running `target/debug/dodger`
[INFO][winit::platform::platform::x11::window] Guessed window DPI factor: 1.8333333333333333
[DEBUG][winit::platform::platform::x11::window] Calculated physical dimensions: 500x500
[INFO][gfx_device_gl::info] parsing version '4.5 (Core Profile) Mesa 18.1.7'
[INFO][gfx_device_gl::info] parsing version '4.50'
[INFO][gfx_device_gl] Info { platform_name: PlatformName { vendor: "Intel Open Source Technology Center", renderer: "Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2) " }, version: 4.5, shading_language: 4.50, extensions: {"GL_NV_depth_clamp", "GL_INTEL_performance_query", "GL_ARB_pipeline_statistics_query", "GL_ARB_texture_query_levels", "GL_ARB_map_buffer_range", "GL_ARB_draw_elements_base_vertex", "GL_AMD_vertex_shader_layer", "GL_ARB_texture_multisample", "GL_ARB_shader_texture_lod", "GL_NV_packed_depth_stencil", "GL_ARB_gpu_shader_fp64", "GL_KHR_no_error", "GL_EXT_shader_samples_identical", "GL_ARB_shading_language_packing", "GL_ARB_shader_viewport_layer_array", "GL_ARB_enhanced_layouts", "GL_ARB_robustness", "GL_ARB_program_interface_query", "GL_ARB_transform_feedback_instanced", "GL_ARB_texture_mirror_clamp_to_edge", "GL_ARB_post_depth_coverage", "GL_ARB_conditional_render_inverted", "GL_ARB_shader_stencil_export", "GL_ARB_invalidate_subdata", "GL_EXT_blend_equation_separate", "GL_AMD_seamless_cubemap_per_texture", "GL_ARB_texture_view", "GL_ARB_texture_rg", "GL_EXT_texture_shared_exponent", "GL_ARB_ES3_2_compatibility", "GL_ARB_half_float_vertex", "GL_ARB_timer_query", "GL_ARB_vertex_shader", "GL_ARB_shader_objects", "GL_AMD_draw_buffers_blend", "GL_KHR_robustness", "GL_ARB_separate_shader_objects", "GL_ARB_arrays_of_arrays", "GL_ARB_shader_group_vote", "GL_ARB_get_texture_sub_image", "GL_ARB_shading_language_420pack", "GL_ARB_copy_image", "GL_ARB_explicit_attrib_location", "GL_ARB_shader_draw_parameters", "GL_KHR_context_flush_control", "GL_KHR_texture_compression_astc_sliced_3d", "GL_ANGLE_texture_compression_dxt5", "GL_ARB_conservative_depth", "GL_ARB_vertex_array_object", "GL_EXT_texture_compression_dxt1", "GL_EXT_texture_filter_anisotropic", "GL_MESA_pack_invert", "GL_ARB_base_instance", "GL_ARB_transform_feedback3", "GL_ARB_query_buffer_object", "GL_EXT_polygon_offset_clamp", "GL_ARB_fragment_layer_viewport", "GL_EXT_texture_swizzle", "GL_ARB_texture_non_power_of_two", "GL_ARB_fragment_coord_conventions", "GL_ARB_transform_feedback2", "GL_ARB_blend_func_extended", "GL_EXT_packed_depth_stencil", "GL_ARB_viewport_array", "GL_OES_EGL_image", "GL_ARB_compressed_texture_pixel_storage", "GL_ARB_texture_buffer_object_rgb32", "GL_ARB_robust_buffer_access_behavior", "GL_ARB_vertex_array_bgra", "GL_ARB_shader_ballot", "GL_ARB_texture_stencil8", "GL_ARB_buffer_storage", "GL_ARB_half_float_pixel", "GL_EXT_texture_snorm", "GL_ARB_draw_indirect", "GL_ARB_texture_filter_anisotropic", "GL_ARB_shader_atomic_counter_ops", "GL_ARB_compute_shader", "GL_ARB_vertex_attrib_binding", "GL_IBM_multimode_draw_arrays", "GL_AMD_shader_trinary_minmax", "GL_ARB_point_sprite", "GL_ARB_explicit_uniform_location", "GL_ARB_gpu_shader_int64", "GL_ARB_texture_buffer_object", "GL_ARB_tessellation_shader", "GL_AMD_shader_stencil_export", "GL_ARB_texture_buffer_range", "GL_AMD_conservative_depth", "GL_EXT_texture_sRGB_decode", "GL_ARB_sync", "GL_ARB_provoking_vertex", "GL_S3_s3tc", "GL_ARB_texture_barrier", "GL_EXT_framebuffer_multisample", "GL_ARB_texture_query_lod", "GL_ARB_uniform_buffer_object", "GL_ARB_texture_swizzle", "GL_ARB_texture_gather", "GL_MESA_shader_integer_functions", "GL_EXT_vertex_array_bgra", "GL_ARB_multi_bind", "GL_ARB_shader_image_load_store", "GL_ARB_copy_buffer", "GL_EXT_timer_query", "GL_NV_texture_barrier", "GL_ARB_get_program_binary", "GL_ARB_clip_control", "GL_ARB_vertex_type_2_10_10_10_rev", "GL_ARB_depth_buffer_float", "GL_ARB_sample_shading", "GL_EXT_framebuffer_multisample_blit_scaled", "GL_KHR_blend_equation_advanced", "GL_KHR_blend_equation_advanced_coherent", "GL_ARB_draw_buffers_blend", "GL_3DFX_texture_compression_FXT1", "GL_ARB_texture_storage", "GL_EXT_draw_buffers2", "GL_ARB_derivative_control", "GL_ARB_texture_compression_rgtc", "GL_ARB_indirect_parameters", "GL_ARB_cull_distance", "GL_ARB_clear_texture", "GL_ARB_ES2_compatibility", "GL_KHR_debug", "GL_ARB_shader_bit_encoding", "GL_ARB_instanced_arrays", "GL_ARB_texture_float", "GL_ARB_fragment_shader", "GL_ARB_sampler_objects", "GL_ARB_shader_precision", "GL_EXT_pixel_buffer_object", "GL_EXT_shader_framebuffer_fetch", "GL_ARB_shader_storage_buffer_object", "GL_NV_conditional_render", "GL_EXT_draw_instanced", "GL_EXT_shader_integer_mix", "GL_ARB_internalformat_query", "GL_ARB_shader_clock", "GL_ATI_texture_float", "GL_KHR_texture_compression_astc_ldr", "GL_KHR_robust_buffer_access_behavior", "GL_ARB_texture_storage_multisample", "GL_ARB_depth_clamp", "GL_ANGLE_texture_compression_dxt3", "GL_ARB_stencil_texturing", "GL_ARB_vertex_type_10f_11f_11f_rev", "GL_EXT_abgr", "GL_APPLE_object_purgeable", "GL_ARB_seamless_cubemap_per_texture", "GL_ARB_shader_atomic_counters", "GL_EXT_texture_integer", "GL_ARB_ES3_1_compatibility", "GL_ARB_multi_draw_indirect", "GL_INTEL_conservative_rasterization", "GL_ARB_debug_output", "GL_ARB_framebuffer_no_attachments", "GL_EXT_texture_compression_rgtc", "GL_ARB_framebuffer_object", "GL_EXT_texture_sRGB", "GL_EXT_transform_feedback", "GL_ARB_internalformat_query2", "GL_EXT_framebuffer_blit", "GL_MESA_texture_signed_rgba", "GL_EXT_provoking_vertex", "GL_EXT_framebuffer_sRGB", "GL_ARB_seamless_cube_map", "GL_ARB_texture_rectangle", "GL_ARB_pixel_buffer_object", "GL_ARB_polygon_offset_clamp", "GL_EXT_packed_float", "GL_EXT_texture_compression_s3tc", "GL_ARB_shader_image_size", "GL_ARB_transform_feedback_overflow_query", "GL_ATI_blend_equation_separate", "GL_ARB_direct_state_access", "GL_EXT_shader_framebuffer_fetch_non_coherent", "GL_EXT_texture_array", "GL_ARB_ES3_compatibility", "GL_AMD_vertex_shader_viewport_index", "GL_ARB_vertex_attrib_64bit", "GL_ARB_shader_texture_image_samples", "GL_ARB_gpu_shader5", "GL_ARB_texture_cube_map_array", "GL_ARB_framebuffer_sRGB", "GL_ARB_texture_rgb10_a2ui", "GL_ARB_shader_subroutine", "GL_ARB_clear_buffer_object", "GL_ARB_draw_buffers", "GL_ARB_draw_instanced", "GL_ARB_occlusion_query2", "GL_ARB_texture_compression_bptc", "GL_ARB_map_buffer_alignment"} }
[INFO][gfx_device_gl] Capabilities { max_vertex_count: 3000, max_index_count: 3000, max_texture_size: 16384, max_patch_size: 32, instance_base_supported: true, instance_call_supported: true, instance_rate_supported: true, vertex_base_supported: true, srgb_color_supported: true, constant_buffer_supported: true, unordered_access_view_supported: true, separate_blending_slots_supported: true, copy_buffer_supported: true }
[INFO][gfx_device_gl] PrivateCaps { array_buffer_supported: true, frame_buffer_supported: true, immutable_storage_supported: true, sampler_objects_supported: true, program_interface_supported: true, buffer_storage_supported: true, clear_buffer_supported: true, frag_data_location_supported: true, sampler_lod_bias_supported: true, texture_border_clamp_supported: true, texture_view_supported: true }
[INFO][gfx_device_gl::factory] Created frame buffer 1
[DEBUG][amethyst_renderer::pipe::effect] Building effect
[DEBUG][amethyst_renderer::pipe::effect] Compiling shaders
[INFO][gfx_device_gl::shade] Compiled shader 1
[INFO][gfx_device_gl::shade] Compiled shader 2
[DEBUG][amethyst_renderer::pipe::effect] Creating pipeline state
[INFO][gfx_device_gl::shade] Linked program 3
[INFO][gfx_device_gl::shade] Sampler[0] = 'albedo' F32 D2(NoArray, NoMultiSample)
[INFO][gfx_device_gl::shade] Attrib[0] = "position" F32 Vector(3)
[INFO][gfx_device_gl::shade] Attrib[3] = "tex_coord" F32 Vector(2)
[INFO][gfx_device_gl::shade] Block[0] = 'VertexArgs' of size 208
[INFO][gfx_device_gl::shade] Element at 192 = 'color' F32 Vector(4)
[INFO][gfx_device_gl::shade] Element at 128 = 'model' F32 Matrix(ColumnMajor, 4, 4)
[INFO][gfx_device_gl::shade] Element at 64 = 'view' F32 Matrix(ColumnMajor, 4, 4)
[INFO][gfx_device_gl::shade] Element at 0 = 'proj' F32 Matrix(ColumnMajor, 4, 4)
[INFO][gfx_device_gl::shade] Block[1] = 'AlbedoOffset' of size 16
[INFO][gfx_device_gl::shade] Element at 0 = 'AlbedoOffset.u_offset' F32 Vector(2)
[INFO][gfx_device_gl::shade] Element at 8 = 'AlbedoOffset.v_offset' F32 Vector(2)
[DEBUG][gfx_device_gl::shade] Program 3 reflection: ProgramInfo { vertex_attributes: [AttributeVar { name: "position", slot: 0, base_type: F32, container: Vector(3) }, AttributeVar { name: "tex_coord", slot: 3, base_type: F32, container: Vector(2) }], globals: [], constant_buffers: [ConstantBufferVar { name: "VertexArgs", slot: 0, size: 208, usage: VERTEX, elements: [ConstVar { name: "color", location: 192, count: 1, base_type: F32, container: Vector(4) }, ConstVar { name: "model", location: 128, count: 1, base_type: F32, container: Matrix(ColumnMajor, 4, 4) }, ConstVar { name: "view", location: 64, count: 1, base_type: F32, container: Matrix(ColumnMajor, 4, 4) }, ConstVar { name: "proj", location: 0, count: 1, base_type: F32, container: Matrix(ColumnMajor, 4, 4) }] }, ConstantBufferVar { name: "AlbedoOffset", slot: 1, size: 16, usage: PIXEL, elements: [ConstVar { name: "AlbedoOffset.u_offset", location: 0, count: 1, base_type: F32, container: Vector(2) }, ConstVar { name: "AlbedoOffset.v_offset", location: 8, count: 1, base_type: F32, container: Vector(2) }] }], textures: [TextureVar { name: "albedo", slot: 0, base_type: F32, ty: D2(NoArray, NoMultiSample), usage: VERTEX | PIXEL }], unordereds: [], samplers: [SamplerVar { name: "albedo", slot: 0, ty: SamplerType(NoCompare, NoRect), usage: VERTEX | PIXEL }], outputs: [OutputVar { name: "color", slot: 0, base_type: F32, container: Vector(4) }], output_depth: false, knows_outputs: true }
[DEBUG][amethyst_renderer::pipe::effect] Creating raw constant buffers
[INFO][gfx_device_gl::factory] Created buffer 1
[INFO][gfx_device_gl::factory] Created buffer 2
[DEBUG][amethyst_renderer::pipe::effect] Set global uniforms
[DEBUG][amethyst_renderer::pipe::effect] Process Color/Depth/Blend outputs
[DEBUG][amethyst_renderer::pipe::effect] Finished building effect
[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.10.0
[INFO][amethyst::app] Platform: x86_64-unknown-linux-gnu
[INFO][amethyst::app] Amethyst git commit:
[INFO][amethyst::app] Rustc version: 1.34.0 Stable
[INFO][amethyst::app] Rustc git commit: 91856ed52c58aa5ba66a015354d1cc69e9779bdf
[DEBUG][amethyst_assets::loader] "renderer::Texture": Loading asset "texture/dodger.png" with format "PNG" from source "[default source]" (handle id: Handle { id: 7 })
[DEBUG][amethyst_assets::loader] "renderer::SpriteSheet": Loading asset "texture/dodger.ron" with format "SPRITE_SHEET" from source "[default source]" (handle id: Handle { id: 0 })
thread 'main' panicked at 'Tried to fetch a resource, but the resource does not exist.
Try adding the resource by inserting it manually or using the `setup` method.
You can get the type name of the missing resource by enabling `shred`'s `nightly` feature', /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.7.2/src/res/mod.rs:215:48
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:70
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:58
at src/libstd/panicking.rs:200
3: std::panicking::default_hook
at src/libstd/panicking.rs:215
4: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:478
5: std::panicking::begin_panic
at /rustc/91856ed52c58aa5ba66a015354d1cc69e9779bdf/src/libstd/panicking.rs:412
6: shred::res::Resources::fetch_mut::{{closure}}
at ./<::std::macros::panic macros>:3
7: <core::option::Option<T>>::unwrap_or_else
at /rustc/91856ed52c58aa5ba66a015354d1cc69e9779bdf/src/libcore/option.rs:386
8: shred::res::Resources::fetch_mut
at /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.7.2/src/res/mod.rs:215
9: specs::storage::data::<impl shred::system::SystemData<'a> for specs::storage::Storage<'a, T, shred::res::FetchMut<'a, specs::storage::MaskedStorage<T>>>>::fetch
at /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/specs-0.14.3/src/storage/data.rs:217
10: specs::world::World::write_storage
at /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/specs-0.14.3/src/world/mod.rs:464
11: <specs::world::EntityBuilder<'a> as specs::world::Builder>::with
at /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/specs-0.14.3/src/world/mod.rs:145
12: dodger::dodger::initialize_player
at src/dodger.rs:96
13: <dodger::dodger::Dodger as amethyst::state::SimpleState>::on_start
at src/dodger.rs:30
14: <T as amethyst::state::State<amethyst::game_data::GameData<'static, 'static>, amethyst::state_event::StateEvent>>::on_start
at /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.10.0/src/state.rs:284
15: <amethyst::state::StateMachine<'a, T, E>>::start
at /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.10.0/src/state.rs:370
16: <amethyst::app::CoreApplication<'a, T, E, R>>::initialize
at /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.10.0/src/app.rs:253
17: <amethyst::app::CoreApplication<'a, T, E, R>>::run
at /home/geemili/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.10.0/src/app.rs:229
18: dodger::main
at src/main.rs:30
19: std::rt::lang_start::{{closure}}
at /rustc/91856ed52c58aa5ba66a015354d1cc69e9779bdf/src/libstd/rt.rs:64
20: std::panicking::try::do_call
at src/libstd/rt.rs:49
at src/libstd/panicking.rs:297
21: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:87
22: std::rt::lang_start_internal
at src/libstd/panicking.rs:276
at src/libstd/panic.rs:388
at src/libstd/rt.rs:48
23: std::rt::lang_start
at /rustc/91856ed52c58aa5ba66a015354d1cc69e9779bdf/src/libstd/rt.rs:64
24: main
25: __libc_start_main
26: _start
at ../sysdeps/x86_64/start.S:120
~/p/f/g/dodger (master|✔) 1 $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment