diff options
| -rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 23948feed..a2c1599f7 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -341,6 +341,20 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array<SwizzleSource, 4 | |||
| 341 | [[nodiscard]] CopyOrigin MakeCopyOrigin(VideoCommon::Offset3D offset, | 341 | [[nodiscard]] CopyOrigin MakeCopyOrigin(VideoCommon::Offset3D offset, |
| 342 | VideoCommon::SubresourceLayers subresource, GLenum target) { | 342 | VideoCommon::SubresourceLayers subresource, GLenum target) { |
| 343 | switch (target) { | 343 | switch (target) { |
| 344 | case GL_TEXTURE_1D: | ||
| 345 | return CopyOrigin{ | ||
| 346 | .level = static_cast<GLint>(subresource.base_level), | ||
| 347 | .x = static_cast<GLint>(offset.x), | ||
| 348 | .y = static_cast<GLint>(0), | ||
| 349 | .z = static_cast<GLint>(0), | ||
| 350 | }; | ||
| 351 | case GL_TEXTURE_1D_ARRAY: | ||
| 352 | return CopyOrigin{ | ||
| 353 | .level = static_cast<GLint>(subresource.base_level), | ||
| 354 | .x = static_cast<GLint>(offset.x), | ||
| 355 | .y = static_cast<GLint>(0), | ||
| 356 | .z = static_cast<GLint>(subresource.base_layer), | ||
| 357 | }; | ||
| 344 | case GL_TEXTURE_2D_ARRAY: | 358 | case GL_TEXTURE_2D_ARRAY: |
| 345 | case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: | 359 | case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: |
| 346 | return CopyOrigin{ | 360 | return CopyOrigin{ |
| @@ -366,6 +380,18 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array<SwizzleSource, 4 | |||
| 366 | VideoCommon::SubresourceLayers dst_subresource, | 380 | VideoCommon::SubresourceLayers dst_subresource, |
| 367 | GLenum target) { | 381 | GLenum target) { |
| 368 | switch (target) { | 382 | switch (target) { |
| 383 | case GL_TEXTURE_1D: | ||
| 384 | return CopyRegion{ | ||
| 385 | .width = static_cast<GLsizei>(extent.width), | ||
| 386 | .height = static_cast<GLsizei>(1), | ||
| 387 | .depth = static_cast<GLsizei>(1), | ||
| 388 | }; | ||
| 389 | case GL_TEXTURE_1D_ARRAY: | ||
| 390 | return CopyRegion{ | ||
| 391 | .width = static_cast<GLsizei>(extent.width), | ||
| 392 | .height = static_cast<GLsizei>(1), | ||
| 393 | .depth = static_cast<GLsizei>(dst_subresource.num_layers), | ||
| 394 | }; | ||
| 369 | case GL_TEXTURE_2D_ARRAY: | 395 | case GL_TEXTURE_2D_ARRAY: |
| 370 | case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: | 396 | case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: |
| 371 | return CopyRegion{ | 397 | return CopyRegion{ |