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:
parent
79f2c21dfb
commit
3dc7b64fa1
@ -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);
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user