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:
Robert Phillips 2021-03-23 13:18:36 -04:00 committed by Skia Commit-Bot
parent bb0ed8e487
commit 84fd1c2dec
6 changed files with 13 additions and 19 deletions

View File

@ -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
*/

View File

@ -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,

View File

@ -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,

View File

@ -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) {

View File

@ -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,

View File

@ -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")