[Mesa-dev] FPE Invalid Operation
Ilia Mirkin
imirkin at alum.mit.edu
Mon Sep 5 17:19:41 UTC 2016
On Mon, Sep 5, 2016 at 12:55 PM, Bram Stolk <b.stolk at gmail.com> wrote:
> Hey,
>
> Do you guys test with Floating-Point-Exceptions enabled?
I think most people just test with whatever is the default.
> Because on Intel-Haswell, I can trigger a FPE with a simple glClearColor and
> glClear.
> I think glClear is doing bad FP math on Haswell.
>
> https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/681580
Unfortunately you don't have any debug info for your mesa build.
>
> I recommend doing a:
>
> feenableexcept( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
>
> In your test-suite.
I did that but was unable to trigger the error on a i7-920 CPU and an
NVIDIA GPU (driven by nouveau) in some simple tests. Perhaps a change
in how HSW reports errors, or could be a HSW- (or gen7+) specific code
path.
If you're able to, make a local build, adding -O0 to cflags, and don't
strip the debug info. That should show you exactly where the issue
lies.
Separately, if you can make a small program that reproduces the issue
for you (e.g. with glut + epoxy), that would help others test and
figure out what's going on.
-ilia
P.S. for reference, this is the (whitespace-damaged) patch I applied
to piglit for my testing:
diff --git a/tests/util/piglit-framework-gl.h b/tests/util/piglit-framework-gl.h
index 81c1a5e..1510fc1 100644
--- a/tests/util/piglit-framework-gl.h
+++ b/tests/util/piglit-framework-gl.h
@@ -235,6 +235,7 @@ void
piglit_gl_test_run(int argc, char *argv[],
const struct piglit_gl_test_config *config);
+#include <fenv.h>
#ifdef __cplusplus
# define PIGLIT_EXTERN_C_BEGIN extern "C" {
# define PIGLIT_EXTERN_C_END }
@@ -263,6 +264,7 @@ piglit_gl_test_run(int argc, char *argv[],
piglit_disable_error_message_boxes(); \
\
piglit_gl_test_config_init(&config); \
+ feenableexcept( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW ); \
\
config.init = piglit_init; \
config.display = piglit_display; \
More information about the mesa-dev
mailing list