Usage of `vk::raii:ImageView` with `std::vector`

I’m trying to map std::vector<VkImage> to std::vector<vk::raii::ImageView> with this function. The mapping approach was taken from their samples, so maybe samples are wrong, idk. std::vector<vk::raii::ImageView> Render::createImageViews( std::vector<VkImage>& images, vk::raii::Device& device ) { std::vector<vk::raii::ImageView> views(images.size()); vk::ImageViewCreateInfo createInfo( {}, {}, vk::ImageViewType::e2D, vk::Format::eB8G8R8A8Srgb, {}, { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } ); for (size_t i = 0; i… Read More Usage of `vk::raii:ImageView` with `std::vector`

VS code Undefined symbols for architecture arm64

Here is the complete error: Undefined symbols for architecture arm64: "ug::UgWindow::UgWindow(int, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: _main in main.cpp.o "ug::UgWindow::~UgWindow()", referenced from: _main in main.cpp.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [untitled-game] Error 1 make[1]: ***… Read More VS code Undefined symbols for architecture arm64

Optimizations causing errors

std::vector<VkWriteDescriptorSet> writeDescriptorSets; for (int index = 0; index < descriptorBindings.size(); index++) { VkWriteDescriptorSet writeDescriptorSet = {}; // Binding 0 : Uniform buffer writeDescriptorSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSet.dstSet = descriptorSet; // Binds this uniform buffer to binding point 0 writeDescriptorSet.dstBinding = index; writeDescriptorSet.descriptorCount = descriptorBindings[index].Count; writeDescriptorSet.pNext = nullptr; writeDescriptorSet.pTexelBufferView = nullptr; if (descriptorBindings[index].Type == DescriptorType::UniformBuffer) { VkDescriptorBufferInfo… Read More Optimizations causing errors

degenerate triangles fragment generation

Can I safely assume that, in polygon fill mode, with no culling, using VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, a degenerate zero area triangle (with all vertices sharing the same index) will always produce zero fragments (with or without multisampling)? The specs (1.3.228) explicitly addresses degenerate zero area triangles only in the context of the VK_EXT_conservative_rasterization extension: "Implementations can process… Read More degenerate triangles fragment generation

Vulkan – How to enable Synchronization 2 feature?

I am trying to use Vulkan Synchronization2 feature. However, even though I enable it (correctly as far as I can tell), the validation layer reports an error when trying to use vkCmdPipelineBarrier2: Validation Error: [ VUID-vkCmdPipelineBarrier2-synchronization2-03848 ] Object 0: handle = 0x258b5ee3dc0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa060404 | vkCmdPipelineBarrier2(): Synchronization2 feature is not… Read More Vulkan – How to enable Synchronization 2 feature?

how show response of text view after clicking a button

I am trying to show response on screen using text view after clicking a button but getting error saying com.android.volley.toolbox.JsonObjectRequest cannot be cast to java.lang.CharSequence package com.example.volleydemo; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.JsonObjectRequest; import com.android.volley.toolbox.Volley; import org.json.JSONException; import org.json.JSONObject;… Read More how show response of text view after clicking a button

How to guarantee ordering for vkCmdPushConstants?

My understanding of Vulkan is that (with a few exceptions) there’s basically no ordering guarantees for command execution within a command buffer: Commands are submitted in-order but they do not complete in-order. Suppose a program issues these three commands in sequence: vkCmdDraw vkCmdPushConstants vkCmdDraw If I understand this correctly, the GPU is free to reorder… Read More How to guarantee ordering for vkCmdPushConstants?