1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

rsx: Fix initialization of null cubemap resources

This commit is contained in:
kd-11 2022-09-19 14:16:02 +03:00 committed by kd-11
parent 79f2c21dfb
commit 3dc7b64fa1
2 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ void GLGSRender::on_init_thread()
// Fallback null texture instead of relying on texture0 // Fallback null texture instead of relying on texture0
{ {
std::vector<u32> pixeldata = { 0, 0, 0, 0 }; std::array<u32, 8> pixeldata = { 0, 0, 0, 0, 0, 0, 0, 0 };
// 1D // 1D
auto tex1D = std::make_unique<gl::texture>(GL_TEXTURE_1D, 1, 1, 1, 1, GL_RGBA8); auto tex1D = std::make_unique<gl::texture>(GL_TEXTURE_1D, 1, 1, 1, 1, GL_RGBA8);

View File

@ -110,7 +110,7 @@ namespace vk
tex->change_layout(cmd, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); tex->change_layout(cmd, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
VkClearColorValue clear_color = {}; VkClearColorValue clear_color = {};
VkImageSubresourceRange range = { VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 }; VkImageSubresourceRange range = { VK_IMAGE_ASPECT_COLOR_BIT, 0, tex->mipmaps(), 0, tex->layers() };
vkCmdClearColorImage(cmd, tex->value, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_color, 1, &range); vkCmdClearColorImage(cmd, tex->value, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_color, 1, &range);
// Prep for shader access // Prep for shader access