vulkan_test_simple

diff src/main.c @ 1:d5a3f6912f4d

how the hell did this work?
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 12 Sep 2024 04:19:14 +0300
parents 8de4fe926882
children
line diff
     1.1 --- a/src/main.c	Thu Jun 28 13:57:28 2018 +0300
     1.2 +++ b/src/main.c	Thu Sep 12 04:19:14 2024 +0300
     1.3 @@ -422,6 +422,7 @@
     1.4  		ivinf.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
     1.5  		ivinf.subresourceRange.levelCount = 1;
     1.6  		ivinf.subresourceRange.layerCount = 1;
     1.7 +		ivinf.viewType = VK_IMAGE_VIEW_TYPE_2D;
     1.8  
     1.9  		if(vkCreateImageView(vkdev, &ivinf, 0, vksc_view + i) != 0) {
    1.10  			fprintf(stderr, "failed to create image view for image %d\n", i);
    1.11 @@ -498,7 +499,7 @@
    1.12  	VkPipelineLayoutCreateInfo lay;
    1.13  	VkGraphicsPipelineCreateInfo pinf;
    1.14  
    1.15 -	if(!(sdr[0] = load_shader("vertex.glsl")) || !(sdr[1] = load_shader("pixel.glsl"))) {
    1.16 +	if(!(sdr[0] = load_shader("vertex.spv")) || !(sdr[1] = load_shader("pixel.spv"))) {
    1.17  		return -1;
    1.18  	}
    1.19  	memset(ssinf, 0, sizeof ssinf);