mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-11 13:20:04 +00:00
Rasterizer refactor hotfixes (#6465)
* texture_codec: Clamp buffer end to tiled buffer size * Fixes crash on Pokemon Super Mystery Dungeon * rasterizer_cache: Use rect for duplicate surface * Fixes broken bloom in fire emblem * surface_params: Check levels for exact match * It was removed previously to prevent copies when games used the base level of a multi level surface. FE on the other hand will first use the base level and then use it as a face of a cubemap with many levels. So instead check if the surface equal or more levels and consider it an exact match in that case * gl_texture_runtime: Bind old tex to 2D target * Fixes a small error opengl would print when creating texture cubes * gl_blit_helper: Fix nearest filter * Use texture unit 2 which has the nearest sampler bound
This commit is contained in:
parent
9ba6a90193
commit
2c74ed1a6d
6 changed files with 9 additions and 6 deletions
|
@ -166,6 +166,7 @@ void BlitHelper::FilterBicubic(Surface& surface, const VideoCore::TextureBlit& b
|
|||
}
|
||||
|
||||
void BlitHelper::FilterNearest(Surface& surface, const VideoCore::TextureBlit& blit) {
|
||||
state.texture_units[2].texture_2d = surface.Handle(false);
|
||||
SetParams(nearest_program, surface.width, surface.height, blit.src_rect);
|
||||
Draw(nearest_program, surface.Handle(), filter_fbo.handle, blit.dst_level, blit.dst_rect);
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ Allocation TextureRuntime::Allocate(const VideoCore::SurfaceParams& params) {
|
|||
handles[1] = textures[1].handle;
|
||||
}
|
||||
|
||||
glBindTexture(target, old_tex);
|
||||
glBindTexture(GL_TEXTURE_2D, old_tex);
|
||||
|
||||
return Allocation{
|
||||
.textures = std::move(textures),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue