Commit 3063b995 authored by m4xw's avatar m4xw
Browse files

git subrepo clone --force --branch=develop git@github.com:libretro/GLideN64.git GLideN64

subrepo:
  subdir:   "GLideN64"
  merged:   "d359d8f8"
upstream:
  origin:   "git@github.com:libretro/GLideN64.git"
  branch:   "develop"
  commit:   "d359d8f8"
git-subrepo:
  version:  "0.4.0"
  origin:   "???"
  commit:   "???"
parent 52405000
Pipeline #4336 passed with stages
in 3 minutes and 33 seconds
......@@ -13,6 +13,13 @@ src/Revision.h
/projects/msvc/GLideN64.VC.VC.opendb
/projects/msvc/GLideN64.VC.db
/projects/msvc/GeneratedFiles
/projects/cmake/CMakeCache.txt
/projects/cmake/CMakeFiles/
/projects/cmake/GLideNHQ/
/projects/cmake/Makefile
/projects/cmake/cmake_install.cmake
/projects/cmake/osal/
/projects/cmake/mupen64plus-video-GLideN64_autogen/
.vs
/translations/wtl
.vscode/ipch/*
......@@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:libretro/GLideN64.git
branch = develop
commit = aa83d46b01ecf2551d56884c57dfe2ba499912c6
parent = ec89a72b52d92b89537234153fb2a86a33dddb4b
commit = d359d8f8e0e881fbc64d6ebd9b02b01a14dd3e70
parent = 524050007bf4b904115e68fa3f7911e044138d4f
method = rebase
cmdver = 0.4.1
cmdver = 0.4.0
......@@ -3,10 +3,6 @@ image: Visual Studio 2017
version: 1.0.{build}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
skip_branch_with_pr: true
environment:
BUILD_PATH: $(APPVEYOR_BUILD_FOLDER)\build
......
@echo off
setlocal enableextensions disabledelayedexpansion
cls
set DPROJ=GLideN64.sln
set DMN=REM
set ERR=if errorlevel 1 goto err
set MSG=%DPROJ% does not exist in the same directory
if not exist "%~dp0%DPROJ%" goto err
set ARCH=
set BOTH=0
set CONF=Release
set DLQT=0
set REB=
set NOQT=0
set NOWTL=0
set NOM64=0
set ESIM=0
set EBQ=explorer "."
taskkill /im msbuild.exe /f 2>nul
taskkill /im vctip.exe /f 2>nul
taskkill /im mspdbsrv.exe /f 2>nul
if "%*"=="" goto help
for %%P in (%*) do (
if /i "%%P"=="--clean" goto clean
if /i "%%P"=="--x86" set ARCH=x86
if /i "%%P"=="--x64" set ARCH=x64& set BOTH=0
if /i "%%P"=="--all" set ARCH=x64& set BOTH=1
if /i "%%P"=="--debug" set CONF=Debug
if /i "%%P"=="--rebuild" set REB=/t:Rebuild
if /i "%%P"=="--noqt" set NOQT=1
if /i "%%P"=="--nowtl" set NOWTL=1
if /i "%%P"=="--nom64" set NOM64=1
if /i "%%P"=="--dlqt" set DLQT=1
if /i "%%P"=="--sim" set ESIM=1
if /i "%%P"=="--q" set EBQ=REM
)
if not defined ARCH goto help
set /a MOD=%NOQT%+%NOWTL%+%NOM64%
set MSG=All compilation tasks were disabled on request
if %MOD%==3 goto err
set MSG=7z was not found in the environment
7z >nul 2>&1
%ERR%
set tVSPF=%ProgramFiles(x86)%
if "%PROCESSOR_ARCHITECTURE%"=="x86" set tVSPF=%ProgramFiles%
set "tVSPF=%tVSPF%\Microsoft Visual Studio"
set tVSDS=Common7\Tools\VsDevCmd.bat
set MOD=\Community\ \Enterprise\ \Professional\
goto vsbeg
:vsenv
for %%V in (%MOD%) do (
if exist "%tVSPF%%~1%%V%tVSDS%" set "tVSDS=%tVSPF%%~1%%V%tVSDS%"
)
goto:eof
:vsbeg
call :vsenv "\2019"
call :vsenv "\2017"
set MOD=\
call :vsenv " 14.0"
call :vsenv " 12.0"
set MSG=Visual Studio developer environment was not loaded
msbuild -version >nul 2>&1
if errorlevel 1 call "%tVSDS%"
%ERR%
set MSG=Git was not found in the environment
git --version >nul 2>&1
%ERR%
set "TARCH=%ARCH%"
:X86
pushd "%~dp0..\..\"
if "%ARCH%"=="x86" set TARCH=Win32
if %NOQT%==1 goto noqt
if defined QTDIR_%ARCH% goto nodl
set "QTVER=qt-5_7_1-%ARCH%-msvc2017-static"
if exist "..\Qt\%QTVER%\include\QtCore" goto nodl
set MSG=Path to Qt %ARCH% was not specified or detected
if %DLQT%==0 goto err
set MSG=cURL was not found in the environment
curl --version >nul 2>&1
%ERR%
del /f /q "..\%QTVER%.7z" 2>nul
set errorlevel=0
set QTURL=https://github.com/gonetz/GLideN64/releases/download/qt_build
set MSG=cURL failed to download:^& echo %QTURL%/%QTVER%.7z
curl -L -o "..\%QTVER%.7z" "%QTURL%/%QTVER%.7z"
%ERR%
set MSG=7z failed to extract:^& echo %QTVER%.7z
7z x -y "..\%QTVER%.7z" -o"..\Qt"
%ERR%
:nodl
set "QTDIR=%~dp0..\..\..\Qt\%QTVER%"
if "%ARCH%"=="x64" (
if defined QTDIR_x64 set "QTDIR="%QTDIR_x64%""
) else (
if defined QTDIR_x86 set "QTDIR="%QTDIR_x86%""
)
set QTDIR=%QTDIR:"=%
set MSG=Something went wrong when detecting Qt:^& echo %QTDIR%
if not exist "%QTDIR%\include\QtCore" goto err
:noqt
if not defined BUILDROUTE set "BUILDROUTE="%~dp0..\..\build""
set BUILDROUTE=%BUILDROUTE:"=%
set "PJ64QT=%BUILDROUTE%\QT_for_Project64_%ARCH%"
set "PJ64WTL=%BUILDROUTE%\WTL_for_Project64_%ARCH%"
set "M64CL=%BUILDROUTE%\for_Mupen64Plus_%ARCH%"
set JACK=
if "%ARCH%"=="x64" set JACK=_x64
set "PJ64PluginsDirQT%JACK%=%PJ64QT%"
set "PJ64PluginsDirWTL%JACK%=%PJ64WTL%"
set "Mupen64PluginsDir%JACK%=%M64CL%"
set MOD=%random:~0,1%
if %MOD% LEQ 4 (set MOD=Lylat) else (
if %MOD% GEQ 8 (set MOD=Kildean) else set MOD=Caryll)
set MBQT=msbuild
if %ESIM%==1 (
set "MBQT=echo %MBQT%"
md "translations\wtl" 2>nul
cd.>"translations\wtl\%MOD%.Lang"
del /f /q "%BUILDROUTE%\*_%ARCH%.7z" 2>nul
set errorlevel=0
)
set "MBWTL=%MBQT%"
set "MBM64=%MBQT%"
if %NOQT%==1 set MBQT=REM
if %NOWTL%==1 set MBWTL=REM
if %NOM64%==1 set MBM64=REM
set "PTS=Platform=%TARCH%"
if defined TOOLSET set "PTS="%PTS%;PlatformToolset=%TOOLSET%""
set PTS=%PTS:"=%
goto mbbeg
:mbcl
%~1 "%~dp0%~2" /m /p:Configuration=%CONF%%~3;%PTS% %REB%
%ERR%
echo.
goto:eof
:mbbeg
set MSG=Qt version, architecture and path are really correct?^& echo %QTDIR%
call :mbcl "%MBQT%" "GLideNUI.vcxproj" ""
%DMN%
call :mbcl "%MBQT%" "%DPROJ%" "_qt"
%DMN%
set MSG=ERROR!
call :mbcl "%MBWTL%" "GLideNUI-wtl.vcxproj" ""
%DMN%
call :mbcl "%MBWTL%" "%DPROJ%" "_wtl"
%DMN%
call :mbcl "%MBM64%" "%DPROJ%" "_mupenplus"
%DMN%
goto pjqt
:cini
set MSG=Failed to copy some project files to:^&echo %~1
if %ESIM%==1 md "%~1" 2>nul
set errorlevel=0
copy /y ini\GLideN64.custom.ini "%~1\"
%ERR%
del /f /q "%~1\*.lib" "%~1\*.exp" 2>nul
set errorlevel=0
goto:eof
:pjqt
if %NOQT%==1 goto pjwtl
call :cini "%PJ64QT%"
%DMN%
copy /y translations\release\*.qm "%PJ64QT%\"
%ERR%
:pjwtl
if %NOWTL%==1 goto mpcl
call :cini "%PJ64WTL%"
%DMN%
md "%PJ64WTL%\translations" 2>nul
set errorlevel=0
copy /y translations\wtl\*.Lang "%PJ64WTL%\translations\"
%ERR%
:mpcl
if %NOM64%==1 goto pkg
call :cini "%M64CL%"
%DMN%
:pkg
for /f "tokens=1" %%R in ('git describe --always') do set "REV=%%R"
set MSG=The route could not be accessed:^& echo %BUILDROUTE%
pushd "%BUILDROUTE%"
%ERR%
for /f "tokens=*" %%Z in ('dir /ad /b *_%ARCH%') do 7z a -t7z "GLideN64-%REV%-%%Z.7z" ".\%%Z\*"
if "%ARCH%"=="x64" (
if %BOTH%==1 set ARCH=x86& goto X86
)
set MSG=DONE!^& echo Path to the compressed files:^& echo %CD%
%EBQ%
:err
set WTF=%errorlevel%
set DMN=exit /b %WTF%
echo.
echo %MSG%
exit /b %WTF%
:clean
pushd "%~dp0"
for /f "tokens=*" %%E in ('dir /ad /b') do (
if /i "%%E" NEQ "lib" rd /s /q "%%E"
)
cd ..\..
del /f /q "src\Revision.h" 2>nul
rd /s /q "build" 2>nul
rd /s /q "translations\wtl" 2>nul
exit /b 0
:help
echo.
echo GLideN64's simplified build and packaging script
echo.
echo Usage:
echo set ^<variable^>
echo %~nx0 ^<architecture^> ^<other^>
echo.
echo ^<Variables^>
echo set BUILDROUTE=^<Custom build folder^>
echo e.g. "Z:\My share folder"
echo set QTDIR_x86=^<Your Qt x86 path^>
echo e.g. "D:\Static Qt\qt-5.7.1-x86-msvc2013"
echo set QTDIR_x64=^<Your Qt x64 path^>
echo e.g. F:\Qt\qt-5_7_1-x64-msvc2015-static
echo set TOOLSET=^<Custom PlatformToolset^>
echo e.g. v141_xp
echo.
echo ^<Architectures^>
echo --x86 To compile x86
echo --x64 To compile x64
echo --all To compile x86 and x64
echo n.b. If more than one of these is used, only the last one will
echo take effect
echo.
echo ^<Others^>
echo --clean Clean ALL auto-generated build files within the project
echo --debug For debug builds
echo --dlqt Auto download and configure Qt for VS2017-2019, it
echo would have no effect if QTDIR_x* is used or if the
echo same version has already been extracted
echo --noqt To build without Qt support, it will ignore the
echo effects of QTDIR_x* and "--dlqt"
echo --nowtl To skip WTL builds
echo --nom64 To skip mupen64plus builds
echo --rebuild To rebuild without cleaning
echo --sim Simulated build, quick environment check without compiling
echo It's destructive to the final product by creating
echo dummy files, make sure to use "--clean" afterwards
echo --q Don't interact with Windows Explorer at the end
echo.
echo Usage examples:
echo.
echo %~nx0 --all --dlqt
echo.
echo %~nx0 --x86 --debug --rebuild
echo.
echo set BUILDROUTE=H:\%USERNAME%\experiment
echo set TOOLSET=ClangCL
echo %~nx0 --noqt --x64
echo.
echo set QTDIR_x86="G:\Static Qt\qt-5.7.1-x86-msvc2015"
echo set QTDIR_x64=G:\Static Qt\qt-5.7.1-x64-msvc2015
echo %~nx0 --nowtl --nom64 --all
exit /b 0
......@@ -79,7 +79,7 @@ End:
float len;
len = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
if (len != 0.0) {
if (len != 0.0f) {
len = sqrtf( len );
v[0] /= len;
v[1] /= len;
......@@ -92,7 +92,7 @@ void InverseTransformVectorNormalizeN(float src[][3], float dst[][3], float mtx[
{
for (u32 i = 0; i < count; i++)
{
InverseTransformVectorNormalize((float(*))src[i], (float(*))dst[i], mtx);
InverseTransformVectorNormalize(static_cast<float*>(src[i]), static_cast<float*>(dst[i]), mtx);
}
}
......
......@@ -42,7 +42,7 @@ inline float DotProduct(const float v0[3], const float v1[3])
inline float GetFloatMatrixElement(s16 _int, u16 _fract)
{
const s32 element = (_int << 16) | _fract;
const s32 element = static_cast<s32>((static_cast<u16>(_int) << 16) | _fract);
return _FIXED2FLOAT(element, 16);
}
......
......@@ -97,6 +97,8 @@ void RDRAMtoColorBuffer::addAddress(u32 _address, u32 _size)
template <typename TSrc>
bool _copyBufferFromRdram(u32 _address, u32* _dst, u32(*converter)(TSrc _c, bool _bCFB), u32 _xor, u32 _x0, u32 _y0, u32 _width, u32 _height, bool _fullAlpha)
{
if ((_address & 1) != 0)
return false;
TSrc * src = reinterpret_cast<TSrc*>(RDRAM + _address);
const u32 bound = (RDRAMSize + 1 - _address) >> (sizeof(TSrc) / 2);
TSrc col;
......
#include "CRC.h"
#define CRC32_POLYNOMIAL 0x04C11DB7
#define CRC32_POLYNOMIAL 0x04C11DB7U
unsigned int CRCTable[ 256 ];
static unsigned int CRCTable[ 256 ];
static
u32 Reflect( u32 ref, char ch )
u32 Reflect( u32 ref, u32 ch )
{
u32 value = 0;
// Swap bit 0 for bit 7
// bit 1 for bit 6, etc.
for (int i = 1; i < (ch + 1); ++i) {
for (u32 i = 1; i < (ch + 1); ++i) {
if(ref & 1)
value |= 1 << (ch - i);
ref >>= 1;
......@@ -23,22 +23,21 @@ void CRC_Init()
{
u32 crc;
for (int i = 0; i < 256; ++i) {
crc = Reflect( i, 8 ) << 24;
for (u32 i = 0; i < 256; ++i) {
crc = Reflect( i, 8U ) << 24U;
for (int j = 0; j < 8; ++j)
crc = (crc << 1) ^ (crc & (1 << 31) ? CRC32_POLYNOMIAL : 0);
crc = (crc << 1U) ^ (crc & (1U << 31U) ? CRC32_POLYNOMIAL : 0U);
CRCTable[i] = Reflect( crc, 32 );
CRCTable[i] = Reflect( crc, 32U );
}
}
u64 CRC_Calculate( u64 crc, const void * buffer, u32 count )
{
u8 *p;
u32 crc32 = static_cast<u32>(crc);
u32 orig = crc32;
p = (u8*) buffer;
const u8 *p = reinterpret_cast<const u8*>(buffer);
while (count--)
crc32 = (crc32 >> 8) ^ CRCTable[(crc32 & 0xFF) ^ *p++];
......@@ -47,16 +46,15 @@ u64 CRC_Calculate( u64 crc, const void * buffer, u32 count )
u32 CRC_Calculate_Strict( u32 crc, const void * buffer, u32 count )
{
return CRC_Calculate(crc, buffer, count);
return static_cast<u32>(CRC_Calculate(crc, buffer, count));
}
u64 CRC_CalculatePalette(u64 crc, const void * buffer, u32 count )
{
u8 *p;
u32 crc32 = static_cast<u32>(crc);
u32 orig = crc32;
p = (u8*) buffer;
const u8 *p = reinterpret_cast<const u8*>(buffer);
while (count--) {
crc32 = (crc32 >> 8) ^ CRCTable[(crc32 & 0xFF) ^ *p++];
crc32 = (crc32 >> 8) ^ CRCTable[(crc32 & 0xFF) ^ *p++];
......
......@@ -51,10 +51,10 @@
#define EncodeCombineMode( a0, b0, c0, d0, Aa0, Ab0, Ac0, Ad0, \
a1, b1, c1, d1, Aa1, Ab1, Ac1, Ad1 ) \
(u64)(((u64)(_SHIFTL( G_CCMUX_##a0, 20, 4 ) | _SHIFTL( G_CCMUX_##c0, 15, 5 ) | \
static_cast<u64>((static_cast<u64>(_SHIFTL( G_CCMUX_##a0, 20, 4 ) | _SHIFTL( G_CCMUX_##c0, 15, 5 ) | \
_SHIFTL( G_ACMUX_##Aa0, 12, 3 ) | _SHIFTL( G_ACMUX_##Ac0, 9, 3 ) | \
_SHIFTL( G_CCMUX_##a1, 5, 4 ) | _SHIFTL( G_CCMUX_##c1, 0, 5 )) << 32) | \
(u64)(_SHIFTL( G_CCMUX_##b0, 28, 4 ) | _SHIFTL( G_CCMUX_##d0, 15, 3 ) | \
static_cast<u64>(_SHIFTL( G_CCMUX_##b0, 28, 4 ) | _SHIFTL( G_CCMUX_##d0, 15, 3 ) | \
_SHIFTL( G_ACMUX_##Ab0, 12, 3 ) | _SHIFTL( G_ACMUX_##Ad0, 9, 3 ) | \
_SHIFTL( G_CCMUX_##b1, 24, 4 ) | _SHIFTL( G_ACMUX_##Aa1, 21, 3 ) | \
_SHIFTL( G_ACMUX_##Ac1, 18, 3 ) | _SHIFTL( G_CCMUX_##d1, 6, 3 ) | \
......@@ -91,30 +91,32 @@
#define G_GCI_ZERO 20
#define G_GCI_HALF 21
#define G_GCI_HW_LIGHT 22
#define G_GCI_HW_LIGHT 22
#define G_GCI_LAST 23
struct CombinerOp
{
int op = LOAD;
int param1 = -1;
int param2 = -1;
int param3 = -1;
u32 op = LOAD;
u32 param1 = G_GCI_LAST;
u32 param2 = G_GCI_LAST;
u32 param3 = G_GCI_LAST;
};
struct CombinerStage
{
int numOps;
u32 numOps;
CombinerOp op[6];
};
struct Combiner
{
int numStages;
u32 numStages;
CombinerStage stage[2];
};
struct CombineCycle
{
int sa, sb, m, a;
u32 sa, sb, m, a;
};
class CombinerInfo
......
......@@ -66,7 +66,7 @@ bool CombinerKey::isRectKey() const
void CombinerKey::read(std::istream & _is)
{
_is.read((char*)&m_key.mux, sizeof(m_key.mux));
_is.read(reinterpret_cast<char*>(&m_key.mux), sizeof(m_key.mux));
}
const CombinerKey & CombinerKey::getEmpty()
......
......@@ -257,7 +257,6 @@ void Debugger::_fillTriInfo(TriInfo & _info)
_info.fill_color = gDP.fillColor;
_info.blend_color = gDP.blendColor;
_info.env_color = gDP.envColor;
_info.fill_color = gDP.fillColor;
_info.prim_color = gDP.primColor;
_info.primDepthZ = gDP.primDepth.z;
_info.primDepthDeltaZ = gDP.primDepth.deltaZ;
......
......@@ -17,17 +17,6 @@
using namespace graphics;
DepthBuffer::DepthBuffer()
: m_address(0)
, m_width(0)
, m_pDepthImageZTexture(nullptr)
, m_pDepthImageDeltaZTexture(nullptr)
, m_pDepthBufferTexture(nullptr)
, m_depthRenderbufferWidth(0)
, m_cleared(false)
, m_pResolveDepthBufferTexture(nullptr)
, m_resolved(false)
, m_pDepthBufferCopyTexture(nullptr)
, m_copied(false)
{
m_copyFBO = gfxContext.createFramebuffer();
}
......@@ -50,15 +39,15 @@ void DepthBuffer::_initDepthImageTexture(FrameBuffer * _pBuffer, CachedTexture&
{
const FramebufferTextureFormats & fbTexFormat = gfxContext.getFramebufferTextureFormats();
_cachedTexture.width = (u32)(_pBuffer->m_pTexture->width);
_cachedTexture.height = (u32)(_pBuffer->m_pTexture->height);
_cachedTexture.width = _pBuffer->m_pTexture->width;
_cachedTexture.height = _pBuffer->m_pTexture->height;
_cachedTexture.format = 0;
_cachedTexture.size = 2;
_cachedTexture.clampS = 1;
_cachedTexture.clampT = 1;
_cachedTexture.address = _pBuffer->m_startAddress;
_cachedTexture.clampWidth = _pBuffer->m_width;
_cachedTexture.clampHeight = _pBuffer->m_height;
_cachedTexture.clampWidth = static_cast<u16>(_pBuffer->m_width);
_cachedTexture.clampHeight = static_cast<u16>(_pBuffer->m_height);
_cachedTexture.frameBufferTexture = CachedTexture::fbOneSample;
_cachedTexture.maskS = 0;
_cachedTexture.maskT = 0;
......@@ -117,22 +106,22 @@ void DepthBuffer::_initDepthBufferTexture(const FrameBuffer * _pBuffer, CachedTe
const FramebufferTextureFormats & fbTexFormat = gfxContext.getFramebufferTextureFormats();
if (_pBuffer != nullptr) {
_pTexture->width = (u32)(_pBuffer->m_pTexture->width);
_pTexture->height = (u32)(_pBuffer->m_pTexture->height);
_pTexture->width = _pBuffer->m_pTexture->width;
_pTexture->height = _pBuffer->m_pTexture->height;
_pTexture->address = _pBuffer->m_startAddress;
_pTexture->clampWidth = _pBuffer->m_width;
_pTexture->clampHeight = VI_GetMaxBufferHeight(_pBuffer->m_width);
_pTexture->clampWidth = static_cast<u16>(_pBuffer->m_width);
_pTexture->clampHeight = VI_GetMaxBufferHeight(static_cast<u16>(_pBuffer->m_width));
} else {
const u16 maxHeight = VI_GetMaxBufferHeight(VI.width);
const u16 maxHeight = VI_GetMaxBufferHeight(static_cast<u16>(VI.width));
if (config.frameBufferEmulation.nativeResFactor == 0) {
_pTexture->width = dwnd().getWidth();
_pTexture->height = (u16)(u32)(maxHeight * dwnd().getScaleX());
_pTexture->width = static_cast<u16>(dwnd().getWidth());
_pTexture->height = static_cast<u16>(static_cast<u32>(static_cast<f32>(maxHeight) * dwnd().getScaleX()));
} else {
_pTexture->width = VI.width * config.frameBufferEmulation.nativeResFactor;
_pTexture->height = maxHeight * config.frameBufferEmulation.nativeResFactor;
_pTexture->width = static_cast<u16>(VI.width * config.frameBufferEmulation.nativeResFactor);
_pTexture->height = static_cast<u16>(maxHeight * config.frameBufferEmulation.nativeResFactor);
}
_pTexture->address = gDP.depthImageAddress;
_pTexture->clampWidth = VI.width;
_pTexture->clampWidth = static_cast<u16>(VI.width);
_pTexture->clampHeight = maxHeight;
}
_pTexture->format = 0;
......@@ -175,16 +164,16 @@ void DepthBuffer::_initDepthBufferRenderbuffer(FrameBuffer * _pBuffer)
if (m_depthRenderbuffer.isNotNull())
return;
u32 height;
if (_pBuffer != NULL) {
m_depthRenderbufferWidth = (u32)(_pBuffer->m_pTexture->width);
height = (u32)(_pBuffer->m_pTexture->height);
if (_pBuffer != nullptr) {
m_depthRenderbufferWidth = _pBuffer->m_pTexture->width;
height = _pBuffer->m_pTexture->height;
} else {
if (config.frameBufferEmulation.nativeResFactor == 0) {
m_depthRenderbufferWidth = dwnd().getWidth();
height = (u32)(VI_GetMaxBufferHeight(VI.width) * dwnd().getScaleX());
height = static_cast<u32>(static_cast<f32>(VI_GetMaxBufferHeight(static_cast<u16>(VI.width))) * dwnd().getScaleX());
} else {
m_depthRenderbufferWidth = VI.width * config.frameBufferEmulation.nativeResFactor;
height = VI_GetMaxBufferHeight(VI.width) * config.frameBufferEmulation.nativeResFactor;
height = VI_GetMaxBufferHeight(static_cast<u16>(VI.width)) * config.frameBufferEmulation.nativeResFactor;
}
}
......@@ -342,7 +331,7 @@ void DepthBuffer::bindDepthImageTexture(ObjectHandle _fbo)
bindParams.imageUnit = textureImageUnits::DepthDeltaZ;
bindParams.texture = m_pDepthImageDeltaZTexture->name;
gfxContext.bindImageTexture(bindParams);