Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL ES CTS rejects legal attribute interpolation for wide lines #273

Closed
kusma opened this issue Jun 11, 2021 · 6 comments
Closed

OpenGL ES CTS rejects legal attribute interpolation for wide lines #273

kusma opened this issue Jun 11, 2021 · 6 comments

Comments

@kusma
Copy link
Contributor

kusma commented Jun 11, 2021

The OpenGL ES 3.2 spec, section 13.6.2.1 ("Wide Lines") says the following:

The preferred method of attribute interpolation for a wide line is to generate the same attribute values for all fragments in the row or column described above, as if the adjusted line were used for interpolation and those values replicated to the other fragments, except for gl_FragCoord which is interpolated as usual. An implementation may instead interpolate each fragment according to the formula in "Basic Line Segment Rasterization", using the original line segment endpoints.

However, the code in verifySinglesampleWideLineGroupInterpolation() (tcuRasterizationVerifier.cpp) only checks for results matching the preferred method, causing valid implementations to fail these tests. This is currently a problem on LLVMpipe in Mesa, and while it's relatively easy to fix in a software rasterizer, it would be great if we could make the CTS not reject things that are allowed by the spec.

Here's a list of tests known to be affected:

  • dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide
  • dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide
  • dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide
  • dEQP-GLES2.functional.rasterization.interpolation.projected.line_loop_wide
  • dEQP-GLES2.functional.rasterization.interpolation.projected.line_strip_wide
  • dEQP-GLES2.functional.rasterization.interpolation.projected.lines_wide
  • dEQP-GLES3.functional.rasterization.fbo.rbo_singlesample.interpolation.lines_wide
  • dEQP-GLES3.functional.rasterization.fbo.texture_2d.interpolation.lines_wide
  • dEQP-GLES3.functional.rasterization.interpolation.basic.line_loop_wide
  • dEQP-GLES3.functional.rasterization.interpolation.basic.line_strip_wide
  • dEQP-GLES3.functional.rasterization.interpolation.basic.lines_wide
  • dEQP-GLES3.functional.rasterization.interpolation.projected.line_loop_wide
  • dEQP-GLES3.functional.rasterization.interpolation.projected.line_strip_wide
  • dEQP-GLES3.functional.rasterization.interpolation.projected.lines_wide
@mnetsch
Copy link
Contributor

mnetsch commented Mar 3, 2022

Hi, could you please try on the latest release 3.2.8.0 and propose a fix that works for Mesa if it still has issues? There's been some changes to relaxing this in CTS and the latest release might have some fixes.

@kusma
Copy link
Contributor Author

kusma commented Mar 3, 2022

I've modified Mesa to use the preferred interpolation instead. I suppose I could revert that change to give it a go, though. But I'm currently out on leave from work, so I won't be looking at this for at least another week or so.

@kusma
Copy link
Contributor Author

kusma commented Mar 24, 2022

Nope, still fails.

@kusma
Copy link
Contributor Author

kusma commented Mar 24, 2022

@mnetsch: Here you go: #309

@mnetsch
Copy link
Contributor

mnetsch commented Mar 24, 2022

I'll bring it in for review, thanks

@mnetsch
Copy link
Contributor

mnetsch commented Apr 14, 2022

Merged in a6cd9c7

@mnetsch mnetsch closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants