video_core: Generate mipmap texture by drawing
This commit is contained in:
parent
cbc2761f11
commit
9a95c7fa14
29 changed files with 259 additions and 8 deletions
|
@ -502,6 +502,17 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) {
|
|||
float_image_scaling_mask, down_factor, 0.0f);
|
||||
}
|
||||
}
|
||||
if (info.uses_render_area) {
|
||||
const auto render_area_width(static_cast<GLfloat>(regs.render_area.width));
|
||||
const auto render_area_height(static_cast<GLfloat>(regs.render_area.height));
|
||||
if (use_assembly) {
|
||||
glProgramLocalParameter4fARB(AssemblyStage(stage), 1, render_area_width,
|
||||
render_area_height, 0.0f, 0.0f);
|
||||
} else {
|
||||
glProgramUniform4f(source_programs[stage].handle, 1, render_area_width,
|
||||
render_area_height, 0.0f, 0.0f);
|
||||
}
|
||||
}
|
||||
}};
|
||||
if constexpr (Spec::enabled_stages[0]) {
|
||||
prepare_stage(0);
|
||||
|
|
|
@ -622,6 +622,16 @@ void RasterizerOpenGL::SyncViewport() {
|
|||
}
|
||||
flags[Dirty::Viewport0 + index] = false;
|
||||
|
||||
if (!regs.viewport_transform_enabled) {
|
||||
const auto x = static_cast<GLfloat>(regs.render_area.x);
|
||||
const auto y = static_cast<GLfloat>(regs.render_area.y);
|
||||
const auto width = static_cast<GLfloat>(regs.render_area.width);
|
||||
const auto height = static_cast<GLfloat>(regs.render_area.height);
|
||||
glViewportIndexedf(static_cast<GLuint>(index), x, y, width != 0.0f ? width : 1.0f,
|
||||
height != 0.0f ? height : 1.0f);
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto& src = regs.viewport_transform[index];
|
||||
GLfloat x = conv(src.translate_x - src.scale_x);
|
||||
GLfloat y = conv(src.translate_y - src.scale_y);
|
||||
|
|
|
@ -49,7 +49,7 @@ using VideoCommon::LoadPipelines;
|
|||
using VideoCommon::SerializePipeline;
|
||||
using Context = ShaderContext::Context;
|
||||
|
||||
constexpr u32 CACHE_VERSION = 5;
|
||||
constexpr u32 CACHE_VERSION = 7;
|
||||
|
||||
template <typename Container>
|
||||
auto MakeSpan(Container& container) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue