Vulkan: Push constants #104880
|
@ -57,8 +57,8 @@ bool VKBuffer::create(VKContext &context,
|
|||
create_info.flags = 0;
|
||||
create_info.size = size_in_bytes;
|
||||
create_info.usage = buffer_usage;
|
||||
/* For now the compute and graphics command queues are the same, so we can safely assume
|
||||
* exclusive mode.*/
|
||||
/* We use the same command queue for the compute and graphics pipeline, so it is safe to use
|
||||
* exclusive resource handling. */
|
||||
create_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
create_info.queueFamilyIndexCount = 1;
|
||||
create_info.pQueueFamilyIndices = context.queue_family_ptr_get();
|
||||
|
|
|
@ -36,7 +36,6 @@ class VKBuffer {
|
|||
GPUUsageType usage,
|
||||
VkBufferUsageFlagBits buffer_usage);
|
||||
bool update(VKContext &context, const void *data);
|
||||
// TODO: add partial_update (update_sub)
|
||||
bool free(VKContext &context);
|
||||
bool map(VKContext &context, void **r_mapped_memory) const;
|
||||
void unmap(VKContext &context) const;
|
||||
|
|
|
@ -126,9 +126,9 @@ void VKCommandBuffer::submit()
|
|||
|
||||
void VKCommandBuffer::encode_recorded_commands()
|
||||
{
|
||||
/* TODO: Intentionally not implemented. For the graphics pipeline we want to extract the
|
||||
* resources and its usages so we can encode multiple commands in the same command buffer. This
|
||||
* will also require to change the begin/end recording to be only inside this function. */
|
||||
/* Intentionally not implemented. For the graphics pipeline we want to extract the
|
||||
* resources and its usages so we can encode multiple commands in the same command buffer with
|
||||
* the correct synchorinzations. */
|
||||
}
|
||||
|
||||
void VKCommandBuffer::submit_encoded_commands()
|
||||
|
|
|
@ -184,7 +184,8 @@ VkImageViewType to_vk_image_view_type(const eGPUTextureType type)
|
|||
|
||||
VkComponentMapping to_vk_component_mapping(const eGPUTextureFormat /*format*/)
|
||||
{
|
||||
/* TODO: this should map to OpenGL defaults based on the eGPUTextureFormat*/
|
||||
/* TODO: this should map to OpenGL defaults based on the eGPUTextureFormat. The implementation of
|
||||
* this function will be implemented when implementing other parts of VKTexture.*/
|
||||
VkComponentMapping component_mapping;
|
||||
component_mapping.r = VK_COMPONENT_SWIZZLE_R;
|
||||
component_mapping.g = VK_COMPONENT_SWIZZLE_G;
|
||||
|
|
|
@ -33,9 +33,9 @@ VKContext::VKContext(void *ghost_window, void *ghost_context)
|
|||
|
||||
/* Initialize the memory allocator. */
|
||||
VmaAllocatorCreateInfo info = {};
|
||||
/* Should use same vulkan version as GHOST, but set to 1.0 for now. Raising it to 1.2 requires
|
||||
* correct extensions and functions to be found, which doesn't out-of-the-box. We should fix
|
||||
* this, but to continue the development at hand we lower the API to 1.0.*/
|
||||
/* Should use same vulkan version as GHOST (1.2), but set to 1.0 as 1.2 requires
|
||||
* correct extensions and functions to be found by VMA, which isn't working as expected and
|
||||
* requires more research. To continue development we lower the API to version 1.0.*/
|
||||
info.vulkanApiVersion = VK_API_VERSION_1_0;
|
||||
info.physicalDevice = vk_physical_device_;
|
||||
info.device = vk_device_;
|
||||
|
|
|
@ -60,7 +60,6 @@ class VKShader : public Shader {
|
|||
int program_handle_get() const override;
|
||||
|
||||
VKPipeline &pipeline_get();
|
||||
/* TODO: should be part of VKPipeline.*/
|
||||
VkPipelineLayout vk_pipeline_layout_get() const
|
||||
{
|
||||
return pipeline_layout_;
|
||||
|
|
Loading…
Reference in New Issue