Bug 99266

Summary: piglit.spec.ext_framebuffer_object.getteximage-formats init-by-clear-and-render
Product: Mesa Reporter: Mark Janes <mark.a.janes>
Component: Drivers/DRI/i965Assignee: Chad Versace <chadversary>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: chadversary
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 99517    
Attachments: hack to disable dithering in draw pixels

Description Mark Janes 2017-01-04 02:11:20 UTC
Began failing with:

c4b87f129eb036c9615df3adcc1cebd9df10fc84
Author:     Chad Versace <chadversary@chromium.org>

meta: Disable dithering during glGenerateMipmap

Standard Output:
/tmp/build_root/m64/lib/piglit/bin/getteximage-formats init-by-clear-and-render -auto -fbo
The textures will be initialized by rendering to them using glClear and glDrawPixels.
getteximage-formats failure: format: GL_RGB10_A2, level 1 at pixel(369, 103)
 Expected (0.597386, 0.597386, 0.433987, 0.111111)
	 Found (0.792157, 0.792157, 0.466667, 0.443137)
Tolerance (0.015686, 0.015686, 0.015686, 2.000000)
getteximage-formats failure: format: GL_RGB10_A2, level 2 at pixel(421, 71)
 Expected (0.597386, 0.597386, 0.433987, 0.111111)
	 Found (0.788235, 0.788235, 0.466667, 0.443137)
Tolerance (0.015686, 0.015686, 0.015686, 2.000000)


The following test also regressed by the same commit:
piglit.spec.ext_framebuffer_object.getteximage-formats init-by-rendering
Comment 1 Kenneth Graunke 2017-01-04 09:30:10 UTC
Created attachment 128743 [details] [review]
hack to disable dithering in draw pixels

Disabling dithering in drawpixels fixes the test, but I don't know if that's the right thing to do.  I also haven't regression tested it...
Comment 2 Chad Versace 2017-01-30 18:36:33 UTC
I believe meta cannot alter the dither state for glDrawPixels.

From the OpenGL 4.5 Compatibility spec, Section 18.1
Drawing Pixels, p620:

  Once pixels are transferred, DrawPixels performs final conversion on pixel
  values (see section 18.1.1, then converts them to fragments (see section 18.1.2
  which are processed in the same fashion as fragments generated by rasterization
  (see chapters 15 and 16).
Comment 3 Chad Versace 2017-01-30 19:14:24 UTC
Fix submitted.

From: Chad Versace <chadversary@chromium.org>
To: piglit@lists.freedesktop.org
Subject: [PATCH] getteximage-formats: Disable dithering during glDrawPixels
Date: Mon, 30 Jan 2017 11:12:44 -0800
Message-Id: <20170130191244.84541-1-chadversary@chromium.org>
Archived-At: https://lists.freedesktop.org/archives/piglit/2017-January/021708.html
Comment 4 Chad Versace 2017-01-30 19:50:31 UTC
Piglit fix is pushed.

commit be6e9a47c9c74bd508d2b8e193dadc3b6ee387bd
Author: Chad Versace <chadversary@chromium.org>
Date:   Mon Jan 30 10:51:15 2017 -0800

    getteximage-formats: Disable dithering during glDrawPixels

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.