mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
gstvulkan: Constify code in create_shader
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1226>
This commit is contained in:
parent
e3bb858239
commit
944623c3aa
2 changed files with 5 additions and 5 deletions
|
@ -497,8 +497,8 @@ gst_vulkan_get_or_create_image_view (GstVulkanImageMemory * image)
|
|||
* Since: 1.18
|
||||
*/
|
||||
GstVulkanHandle *
|
||||
gst_vulkan_create_shader (GstVulkanDevice * device, gchar * code, gsize size,
|
||||
GError ** error)
|
||||
gst_vulkan_create_shader (GstVulkanDevice * device, const gchar * code,
|
||||
gsize size, GError ** error)
|
||||
{
|
||||
VkShaderModule shader;
|
||||
VkResult res;
|
||||
|
@ -509,7 +509,7 @@ gst_vulkan_create_shader (GstVulkanDevice * device, gchar * code, gsize size,
|
|||
.pNext = NULL,
|
||||
.flags = 0,
|
||||
.codeSize = size,
|
||||
.pCode = (guint32 *) code
|
||||
.pCode = (const guint32 *) code
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
guint32 first_word;
|
||||
|
@ -523,7 +523,7 @@ gst_vulkan_create_shader (GstVulkanDevice * device, gchar * code, gsize size,
|
|||
|| first_word == SPIRV_MAGIC_NUMBER_OE, VK_NULL_HANDLE);
|
||||
if (first_word == SPIRV_MAGIC_NUMBER_OE) {
|
||||
/* endianness swap... */
|
||||
guint32 *old_code = (guint32 *) code;
|
||||
const guint32 *old_code = (const guint32 *) code;
|
||||
gsize i;
|
||||
|
||||
GST_DEBUG ("performaing endianness conversion on spirv shader of size %"
|
||||
|
|
|
@ -57,7 +57,7 @@ GstVulkanImageView * gst_vulkan_get_or_create_image_view (GstVulkanImageM
|
|||
|
||||
GST_VULKAN_API
|
||||
GstVulkanHandle * gst_vulkan_create_shader (GstVulkanDevice * device,
|
||||
gchar * code,
|
||||
const gchar * code,
|
||||
gsize size,
|
||||
GError ** error);
|
||||
|
||||
|
|
Loading…
Reference in a new issue