togles: use sampler objects by default

This commit is contained in:
nillerusr 2022-08-03 16:21:23 +03:00
parent 1aa326b7f2
commit 50ff9922a6
3 changed files with 17 additions and 18 deletions

View File

@ -320,6 +320,18 @@ FORCEINLINE_PIXEL void CPixelWriter::SetPixelMemory( ImageFormat format, void* p
m_BMask = 0x00;
m_AMask = 0x00;
break;
case IMAGE_FORMAT_RGB888:
m_Size = 3;
m_RShift = 0;
m_GShift = 8;
m_BShift = 16;
m_AShift = 0;
m_RMask = 0xFF;
m_GMask = 0xFF;
m_BMask = 0xFF;
m_AMask = 0x0;
break;
// FIXME: Add more color formats as need arises
default:
{

View File

@ -3649,9 +3649,9 @@ void CGLMTex::WriteTexels( GLMTexLockDesc *desc, bool writeWholeSlice, bool noDa
Assert( writeWholeSlice ); //subimage not implemented in this path yet
// compressed path
// http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage2D.xml
/* if( gGL->m_bHave_GL_EXT_texture_compression_dxt1 )
if( gGL->m_bHave_GL_EXT_texture_compression_dxt1 )
gGL->glCompressedTexImage2D( target, desc->m_req.m_mip, intformat, slice->m_xSize, slice->m_ySize, 0, slice->m_storageSize, sliceAddress );
else*/
else
CompressedTexImage2D( target, desc->m_req.m_mip, intformat, slice->m_xSize, slice->m_ySize, 0, slice->m_storageSize, sliceAddress );
}
else

View File

@ -2359,22 +2359,9 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] =
GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params )
{
// m_bUseSamplerObjects = true;
//
// // On most AMD drivers (like the current latest, 12.10 Windows), the PCF depth comparison mode doesn't work on sampler objects, so just punt them.
// if ( gGL->m_nDriverProvider == cGLDriverProviderAMD )
// {
// m_bUseSamplerObjects = false;
// }
// if ( CommandLine()->CheckParm( "-gl_disablesamplerobjects" ) )
// {
// Disable sampler object usage for now since ScaleForm isn't aware of them
// and doesn't know how to push/pop their binding state. It seems we don't
// really use them in this codebase anyhow, except to preload textures.
m_bUseSamplerObjects = false;
if ( CommandLine()->CheckParm( "-gl_enablesamplerobjects" ) )
m_bUseSamplerObjects = true;
m_bUseSamplerObjects = true;
if ( CommandLine()->CheckParm( "-gl_disablesamplerobjects" ) )
m_bUseSamplerObjects = false;
// Try to get some more free memory by relying on driver host copies instead of ours.
// In some cases the driver will be able to discard their own host copy and rely on GPU