Clean up remaining NVPR bits & bobs
Bug: skia:11760, skia:11787 Change-Id: Idfedb90576e0484bf32a9002081c0fcb888141eb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388216 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
bb0ed8e487
commit
84fd1c2dec
@ -13,11 +13,8 @@
|
||||
* overlap and create holes. There is not a really great algorithm for this
|
||||
* and several other 2D graphics engines have the same bug.
|
||||
*
|
||||
* If we run this using Nvidia Path Renderer with:
|
||||
* `path/to/dm --match OverStroke -w gm_out --gpu --config nvpr16`
|
||||
* then we get correct results, so that is a possible direction of attack -
|
||||
* use the GPU and a completely different algorithm to get correctness in
|
||||
* Skia.
|
||||
* The old Nvidia Path Renderer used to yield correct results, so a possible
|
||||
* direction of attack is to use the GPU and a completely different algorithm.
|
||||
*
|
||||
* See crbug.com/589769 skbug.com/5405 skbug.com/5406
|
||||
*/
|
||||
|
@ -27,7 +27,7 @@ static DEFINE_int(maxTessellationSegments, 0,
|
||||
|
||||
static DEFINE_string(pr, "",
|
||||
"Set of enabled gpu path renderers. Defined as a list of: "
|
||||
"[~]none [~]dashline [~]nvpr [~]ccpr [~]aahairline [~]aaconvex [~]aalinearizing "
|
||||
"[~]none [~]dashline [~]ccpr [~]aahairline [~]aaconvex [~]aalinearizing "
|
||||
"[~]small [~]tri [~]tess [~]all");
|
||||
|
||||
static DEFINE_int(internalSamples, 4,
|
||||
|
@ -333,10 +333,7 @@ GLXContext GLXGLTestContext::CreateBestContext(bool isES, Display* display, GLXF
|
||||
flags.push_back(GLX_CONTEXT_ES2_PROFILE_BIT_EXT);
|
||||
} else if (versions[i].first > 2) {
|
||||
flags.push_back(GLX_CONTEXT_PROFILE_MASK_ARB);
|
||||
// TODO When Nvidia implements NVPR on Core profiles, we should start
|
||||
// requesting core here - currently Nv Path rendering on Nvidia
|
||||
// requires a compatibility profile.
|
||||
flags.push_back(GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB);
|
||||
flags.push_back(GLX_CONTEXT_CORE_PROFILE_BIT_ARB);
|
||||
}
|
||||
flags.push_back(0);
|
||||
context = glXCreateContextAttribsARB(display, bestFbc, glxShareContext, true,
|
||||
|
@ -96,11 +96,12 @@ WinGLTestContext::WinGLTestContext(GrGLStandard forcedGpuAPI, WinGLTestContext*
|
||||
this->destroyGLContext();
|
||||
return;
|
||||
}
|
||||
// Requesting a Core profile would bar us from using NVPR. So we request
|
||||
// compatibility profile or GL ES.
|
||||
|
||||
// We request a compatibility context since glMultiDrawArraysIndirect, apparently, doesn't
|
||||
// work correctly on Intel Iris GPUs with the core profile (skbug.com/11787).
|
||||
SkWGLContextRequest contextType =
|
||||
kGLES_GrGLStandard == forcedGpuAPI ?
|
||||
kGLES_SkWGLContextRequest : kGLPreferCompatibilityProfile_SkWGLContextRequest;
|
||||
kGLES_GrGLStandard == forcedGpuAPI ? kGLES_SkWGLContextRequest
|
||||
: kGLPreferCompatibilityProfile_SkWGLContextRequest;
|
||||
|
||||
HGLRC winShareContext = nullptr;
|
||||
if (shareContext) {
|
||||
|
@ -79,10 +79,9 @@ sk_sp<const GrGLInterface> GLWindowContext_xlib::onInitializeContext() {
|
||||
// Specifying 3.2 allows an arbitrarily high context version (so long as no 3.2 features
|
||||
// have been removed).
|
||||
for (int minor = 2; minor >= 0 && !fGLContext; --minor) {
|
||||
// Ganesh prefers a compatibility profile for possible NVPR support. However, RenderDoc
|
||||
// requires a core profile. Edit this code to use RenderDoc.
|
||||
for (int profile : {GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
|
||||
GLX_CONTEXT_CORE_PROFILE_BIT_ARB}) {
|
||||
// Ganesh prefers a core profile which incidentally allows RenderDoc to work correctly.
|
||||
for (int profile : {GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||
GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB}) {
|
||||
gCtxErrorOccurred = false;
|
||||
int attribs[] = {
|
||||
GLX_CONTEXT_MAJOR_VERSION_ARB, 3, GLX_CONTEXT_MINOR_VERSION_ARB, minor,
|
||||
|
@ -58,7 +58,7 @@ __argparse.add_argument('--fps',
|
||||
action='store_true', help="use fps instead of ms")
|
||||
__argparse.add_argument('--pr',
|
||||
help="comma- or space-separated list of GPU path renderers, including: "
|
||||
"[[~]all [~]default [~]dashline [~]nvpr [~]msaa [~]aaconvex "
|
||||
"[[~]all [~]default [~]dashline [~]msaa [~]aaconvex "
|
||||
"[~]aalinearizing [~]small [~]tess]")
|
||||
__argparse.add_argument('--cc',
|
||||
action='store_true', help="allow coverage counting shortcuts to render paths")
|
||||
|
Loading…
Reference in New Issue
Block a user