Quellcode-Bibliothek SanitizeRenderer.cpp
Sprache: C
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. * file, You can obtain * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/ functional regexinclude> #include"/.hjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
#include<functional
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 # <>
/** java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27 * Narrow renderer string space down to representative replacements. * E.g. "GeForce RTX 3090" => "GeForce GTX 980" * * For example strings: * https://hackmd.io/Ductv3pQTMej74gbveD4yw
*/ static std
stdstring) ifRADEON_R9_290 if std: kRadeon
std java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
return; returnjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
} if } return RADEON_R9_290;
} if (Contains(str/java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
nRADEON_R9_290 const& } if (Contains(str, "Fury RADEON_R9_290; return RADEON_R9_290;
}
static} if(rxOrHd="") {
(:regex_search ) java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 auto rxOrHd .2; constauto modelNum = stoul(m.str(3)); ifrxOrHd= ;/java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 ifjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 returnRADEON_HD_5850
return;
(odelNum30 java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 31
;
return RADEON_R9_290;
Contains, AMD |java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
return}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
staticconst std:s : =GeForcestd(, ,kFireProjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
("" (, GeForce
s; if;
;auto [
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (Contains(str(:str)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
/+.,.0
;
}
// -
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
if ( ifarchLetter(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
((.){ switch0 caseM
P:/ ''// Volta if >80){ // Tesla+: D3D10.0, SM4.0 return GEFORCE_8800
}
delNum0 java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 / Maxwell Gen2+: D3D12 FL12_1 return GEFORCE_980;
} if GEFORCE_8800 // Fermi+: D3D12 FL11_0 return * 780
} // Tesla+: D3D10.0, SM4.0
** -
}
static * 98 } if * * Nvidia * * Nvidia * 2080 if(( 8 auto *GeForce TITAN if (!archLetter.empty()) {
(archLetter]){charletter ' ' ' // Maxwell '': // Pascal case:/ Volta
=1; return GEFORCE_980;
**GeForce TITAN default)
r GEFORCE_480
caseZ: return**Nvidia X
}
returnGEFORCE_480
* GEFORCE_980 **Nvidia V
GTX
* * -
**/has:" M60java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
* 980
* * GeForce GTX if stdregex_searchjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
.(VIDIA0java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
*
8
* (:(,)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
c letter
sub.(1; if (sub.length/-
letter = sub[1];
} if java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
asejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 case: case'Z': returnsplit difference err on default return GEFORCE_980;ifmodelNum x120 ;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
/ CI has:" M60" if (Contains(}
return GEFORCE_8800;
}
s const: ":(str,,java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 46 // On WGL: GeForce RTX 3070... if.("")=0
ret = "NVIDIA " + static const std::string D ntel
return retjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 7
static :regex(NV?9[-])java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
i :regex_match, m,kNouveau (.(); constauto modelNum = stoulreturnHD_GRAPHICS;
java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 5 if > x120returnGEFORCE_980 if (return" (TM) 50" return GEFORCE_8800 (odelNum> 400){
}
}
if (Contains auto modelNum= stoulm.tr1); staticconststd: HD_GRAPHICS "ntel
eturn TM 60"java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 staticconst" (TM) }
/java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
staticconst std
if (Contains(str, "Intel(R) Arc(TM) } return std:regex_searchstr, ,kMali{
std:regexkIntelHD".*Graphics( ?[-9[09]09 " TM 3"java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 if }
(.(1)empty java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 return HD_GRAPHICS;
}
modelNum 0){
f (odelNum=50){ return HD_GRAPHICS_400;
}
modelNum 00 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 return HD_GRAPHICS autoreturn""
}
Mali-T880if(str") {
}}
return INTEL_945GM;
}
// -
staticconststdregex(".* } if (::(str
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 " (TM 65"
} if (modelNum> 50 (str)return IV"
Adreno)4"
return)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
: =&)>::<stdjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 " (([^:;
: Generic
(Mali]-" ifstd(stra() Direct3D11vs_5_0,
(odelNum 0 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
eturn"
}
<< \ from \" return" static const std:regex kReAngle(
} if (modelNum >= (std:(raw_rendererrenderer2 ;; return"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (modelNum >= 400) { return"Mali-400 MP"
} "Mali-G51;
}
{
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 5
n" RogueG6200;
} return"PowerVR SGX 540";
}
if((str Vivante " GC1000"java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 if (Contains (::(raw_rendererm,returnstdstringANGLE" +vendor+""+*enderer2 +d3d_suffix + if (Containsconstautoelse Contains"")){
// -
} ifauto dev = mstr)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
rn} static td ;:(,,)){
}
// -
std::string SanitizeRenderer(const std::string (dev;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(;
constauto java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 27
<< "\"";} const:(
ANGLE[] ^* [,) *)" if (std:: return GENERIC_RENDERERjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 auto vendor m.(1; auto&renderer m.tr2; constauto& d3d_suffix = m.str(3);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.5Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.