mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-15 13:41:33 +01:00
fix compilation warnings
This commit is contained in:
parent
35275e0916
commit
5de30a4ff0
@ -691,6 +691,7 @@ VkShaderModule loadShader(const char *filename) {
|
||||
};
|
||||
VkShaderModule shader;
|
||||
byte* buf = gEngine.COM_LoadFile( filename, &size, false);
|
||||
uint32_t *pcode;
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
@ -703,7 +704,9 @@ VkShaderModule loadShader(const char *filename) {
|
||||
|
||||
smci.codeSize = size;
|
||||
//smci.pCode = (const uint32_t*)buf;
|
||||
memcpy(&smci.pCode, &buf, sizeof(void*));
|
||||
//memcpy(&smci.pCode, &buf, sizeof(void*));
|
||||
memcpy(&pcode, &buf, sizeof(pcode));
|
||||
smci.pCode = pcode;
|
||||
|
||||
XVK_CHECK(vkCreateShaderModule(vk_core.device, &smci, NULL, &shader));
|
||||
Mem_Free(buf);
|
||||
|
@ -112,7 +112,7 @@ void VK_DescriptorShutdown( void )
|
||||
vkDestroyDescriptorSetLayout(vk_core.device, vk_desc.one_uniform_buffer_layout, NULL);
|
||||
}
|
||||
|
||||
void VK_DescriptorsCreate(const vk_descriptors_t *desc)
|
||||
void VK_DescriptorsCreate(vk_descriptors_t *desc)
|
||||
{
|
||||
{
|
||||
VkDescriptorSetLayoutCreateInfo dslci = {
|
||||
@ -174,7 +174,7 @@ void VK_DescriptorsCreate(const vk_descriptors_t *desc)
|
||||
}
|
||||
}
|
||||
|
||||
void VK_DescriptorsWrite(vk_descriptors_t *desc)
|
||||
void VK_DescriptorsWrite(const vk_descriptors_t *desc)
|
||||
{
|
||||
VkWriteDescriptorSet wds[16];
|
||||
ASSERT(ARRAYSIZE(wds) >= desc->num_bindings);
|
||||
@ -217,7 +217,7 @@ void VK_DescriptorsWrite(vk_descriptors_t *desc)
|
||||
vkUpdateDescriptorSets(vk_core.device, desc->num_bindings, wds, 0, NULL);
|
||||
}
|
||||
|
||||
void VK_DescriptorsDestroy(vk_descriptors_t *desc)
|
||||
void VK_DescriptorsDestroy(const vk_descriptors_t *desc)
|
||||
{
|
||||
vkDestroyDescriptorPool(vk_core.device, desc->desc_pool, NULL);
|
||||
vkDestroyPipelineLayout(vk_core.device, desc->pipeline_layout, NULL);
|
||||
|
@ -51,8 +51,8 @@ typedef struct {
|
||||
} vk_descriptors_t;
|
||||
|
||||
void VK_DescriptorsCreate(vk_descriptors_t *desc);
|
||||
void VK_DescriptorsWrite(vk_descriptors_t *desc);
|
||||
void VK_DescriptorsDestroy(vk_descriptors_t *desc);
|
||||
void VK_DescriptorsWrite(const vk_descriptors_t *desc);
|
||||
void VK_DescriptorsDestroy(const vk_descriptors_t *desc);
|
||||
|
||||
// typedef enum {
|
||||
// VK_DescType_SingleTexture,
|
||||
|
@ -19,7 +19,7 @@ typedef struct {
|
||||
|
||||
static void loadRadData( const model_t *map, const char *filename ) {
|
||||
fs_offset_t size;
|
||||
const byte *data, *buffer = gEngine.COM_LoadFile( filename, &size, false);
|
||||
byte *data, *buffer = gEngine.COM_LoadFile( filename, &size, false);
|
||||
|
||||
memset(g_emissive_texture_table, 0, sizeof(g_emissive_texture_table));
|
||||
|
||||
|
@ -958,7 +958,7 @@ void VK_RenderModelDynamicCommit( void ) {
|
||||
if (g_dynamic_model.model.num_geometries > 0) {
|
||||
g_dynamic_model.model.dynamic = true;
|
||||
VK_RenderModelInit( &g_dynamic_model.model );
|
||||
VK_RenderModelDraw( &g_dynamic_model );
|
||||
VK_RenderModelDraw( &g_dynamic_model.model );
|
||||
}
|
||||
|
||||
g_dynamic_model.model.debug_name = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user