1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2025-02-19 16:54:18 +01:00

trying to get msaa working

This commit is contained in:
Unknown 2020-02-16 18:14:45 +00:00
parent d82329cd75
commit 20dae3b400
3 changed files with 14 additions and 2 deletions

View File

@ -351,6 +351,17 @@ VKAPI_ATTR VkResult VKAPI_CALL rpi_vkQueueSubmit(
submitCl.clear_s = 0;
}
if(i->samples > 1)
{
// This bit controls how many pixels the general
// (i.e. subsampled) loads/stores are iterating over
// (multisample loads replicate out to the other samples).
submitCl.color_write.bits |= VC4_RENDER_CONFIG_MS_MODE_4X;
// Controls whether color_write's
// VC4_PACKET_STORE_MS_TILE_BUFFER does 4x decimation
submitCl.color_write.bits |= VC4_RENDER_CONFIG_DECIMATE_MODE_4X;
}
submitCl.min_x_tile = 0;
submitCl.min_y_tile = 0;

View File

@ -91,7 +91,7 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer)
0, //coverage pipe select
0, //coverage update mode
0, //coverage read type
0, //rasterizer oversample mode
cb->graphicsPipeline->rasterizationSamples > 1, //rasterizer oversample mode
cb->graphicsPipeline->depthBiasEnable, //depth offset enable
cb->graphicsPipeline->frontFace == VK_FRONT_FACE_CLOCKWISE, //clockwise
!(cb->graphicsPipeline->cullMode & VK_CULL_MODE_BACK_BIT), //enable back facing primitives

View File

@ -1236,7 +1236,8 @@ void CreateTexture()
uint32_t width = swapChainExtent.width, height = swapChainExtent.height;
uint32_t mipLevels = 1;
char* texData = readPPM("image.ppm");
//char* texData = readPPM("image.ppm");
char* texData = readPPM("triangle.ppm");
VkBuffer stagingBuffer;
VkDeviceMemory stagingMemory;