Fix Conflict
This commit is contained in:
@@ -504,8 +504,8 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) {
|
||||
}
|
||||
}
|
||||
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));
|
||||
const auto render_area_width(static_cast<GLfloat>(regs.surface_clip.width));
|
||||
const auto render_area_height(static_cast<GLfloat>(regs.surface_clip.height));
|
||||
if (use_assembly) {
|
||||
glProgramLocalParameter4fARB(AssemblyStage(stage), 1, render_area_width,
|
||||
render_area_height, 0.0f, 0.0f);
|
||||
|
||||
@@ -618,11 +618,11 @@ 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);
|
||||
if (!regs.viewport_scale_offset_enbled) {
|
||||
const auto x = static_cast<GLfloat>(regs.surface_clip.x);
|
||||
const auto y = static_cast<GLfloat>(regs.surface_clip.y);
|
||||
const auto width = static_cast<GLfloat>(regs.surface_clip.width);
|
||||
const auto height = static_cast<GLfloat>(regs.surface_clip.height);
|
||||
glViewportIndexedf(static_cast<GLuint>(index), x, y, width != 0.0f ? width : 1.0f,
|
||||
height != 0.0f ? height : 1.0f);
|
||||
continue;
|
||||
|
||||
@@ -444,8 +444,8 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) {
|
||||
const auto& info{stage_infos[0]};
|
||||
if (info.uses_render_area) {
|
||||
render_area.uses_render_area = true;
|
||||
render_area.words = {static_cast<float>(regs.render_area.width),
|
||||
static_cast<float>(regs.render_area.height)};
|
||||
render_area.words = {static_cast<float>(regs.surface_clip.width),
|
||||
static_cast<float>(regs.surface_clip.height)};
|
||||
}
|
||||
}};
|
||||
if constexpr (Spec::enabled_stages[0]) {
|
||||
|
||||
@@ -683,11 +683,11 @@ void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& reg
|
||||
if (!state_tracker.TouchViewports()) {
|
||||
return;
|
||||
}
|
||||
if (!regs.viewport_transform_enabled) {
|
||||
const auto x = static_cast<float>(regs.render_area.x);
|
||||
const auto y = static_cast<float>(regs.render_area.y);
|
||||
const auto width = static_cast<float>(regs.render_area.width);
|
||||
const auto height = static_cast<float>(regs.render_area.height);
|
||||
if (!regs.viewport_scale_offset_enbled) {
|
||||
const auto x = static_cast<float>(regs.surface_clip.x);
|
||||
const auto y = static_cast<float>(regs.surface_clip.y);
|
||||
const auto width = static_cast<float>(regs.surface_clip.width);
|
||||
const auto height = static_cast<float>(regs.surface_clip.height);
|
||||
VkViewport viewport{
|
||||
.x = x,
|
||||
.y = y,
|
||||
|
||||
@@ -332,8 +332,9 @@ u32 GraphicsEnvironment::ReadCbufValue(u32 cbuf_index, u32 cbuf_offset) {
|
||||
|
||||
Shader::TextureType GraphicsEnvironment::ReadTextureType(u32 handle) {
|
||||
const auto& regs{maxwell3d->regs};
|
||||
const bool via_header_index{regs.sampler_index == Maxwell::SamplerIndex::ViaHeaderIndex};
|
||||
auto entry = ReadTextureInfo(regs.tic.Address(), regs.tic.limit, via_header_index, handle);
|
||||
const bool via_header_index{regs.sampler_binding == Maxwell::SamplerBinding::ViaHeaderBinding};
|
||||
auto entry =
|
||||
ReadTextureInfo(regs.tex_header.Address(), regs.tex_header.limit, via_header_index, handle);
|
||||
const Shader::TextureType result{ConvertTextureType(entry)};
|
||||
texture_types.emplace(handle, result);
|
||||
return result;
|
||||
@@ -341,8 +342,9 @@ Shader::TextureType GraphicsEnvironment::ReadTextureType(u32 handle) {
|
||||
|
||||
Shader::TexturePixelFormat GraphicsEnvironment::ReadTexturePixelFormat(u32 handle) {
|
||||
const auto& regs{maxwell3d->regs};
|
||||
const bool via_header_index{regs.sampler_index == Maxwell::SamplerIndex::ViaHeaderIndex};
|
||||
auto entry = ReadTextureInfo(regs.tic.Address(), regs.tic.limit, via_header_index, handle);
|
||||
const bool via_header_index{regs.sampler_binding == Maxwell::SamplerBinding::ViaHeaderBinding};
|
||||
auto entry =
|
||||
ReadTextureInfo(regs.tex_header.Address(), regs.tex_header.limit, via_header_index, handle);
|
||||
const Shader::TexturePixelFormat result(ConvertTexturePixelFormat(entry));
|
||||
texture_pixel_formats.emplace(handle, result);
|
||||
return result;
|
||||
@@ -350,7 +352,7 @@ Shader::TexturePixelFormat GraphicsEnvironment::ReadTexturePixelFormat(u32 handl
|
||||
|
||||
u32 GraphicsEnvironment::ReadViewportTransformState() {
|
||||
const auto& regs{maxwell3d->regs};
|
||||
viewport_transform_state = regs.viewport_transform_enabled;
|
||||
viewport_transform_state = regs.viewport_scale_offset_enbled;
|
||||
return viewport_transform_state;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,6 @@ public:
|
||||
|
||||
u32 ReadViewportTransformState() override;
|
||||
|
||||
|
||||
private:
|
||||
Tegra::Engines::KeplerCompute* kepler_compute{};
|
||||
};
|
||||
@@ -156,7 +155,7 @@ public:
|
||||
[[nodiscard]] Shader::TextureType ReadTextureType(u32 handle) override;
|
||||
|
||||
[[nodiscard]] Shader::TexturePixelFormat ReadTexturePixelFormat(u32 handle) override;
|
||||
|
||||
|
||||
[[nodiscard]] u32 ReadViewportTransformState() override;
|
||||
|
||||
[[nodiscard]] u32 LocalMemorySize() const override;
|
||||
|
||||
Reference in New Issue
Block a user