Bug 49484 - invalid enum 0x500, invalid value 0x501
Summary: invalid enum 0x500, invalid value 0x501
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: 8.0
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-04 06:14 UTC by Michal Suchanek
Modified: 2012-05-07 11:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Michal Suchanek 2012-05-04 06:14:22 UTC
running D3D application in wine I get lots of

err:d3d_surface:surface_allocate_surface >>>>>>>>>>>>>>>>> GL_INVALID_VALUE (0x501) from glTexImage2D @ surface.c / 2566
err:d3d_surface:surface_upload_data >>>>>>>>>>>>>>>>> GL_INVALID_ENUM (0x500) from glTexSubImage2D @ surface.c / 2349


Needless to say I get pretty much nothing visible.

OpenGL renderer string: Gallium 0.4 on AMD REDWOOD
OpenGL version string: 2.1 Mesa 8.0.2

Maybe wine is using a format/feature without checking it is available here.

However, r600 could implement it I guess.
Comment 1 Michal Suchanek 2012-05-04 09:22:37 UTC
Does not work with recent git either.

Perhaps more useful is this part of the log:

fixme:d3d:debug_d3dformat Unrecognized 0x34324644 (as fourcc: DF24) WINED3DFORMAT!
fixme:d3d:wined3d_get_format Can't find format unrecognized (0x34324644) in the format lookup table
Comment 2 Ian Romanick 2012-05-04 11:21:17 UTC
Can you:

- Run wine (and your app) in GDB.

- Set a breakpoint at _mesa_warning.

- Provide the output of 'bt full'
Comment 3 Michal Suchanek 2012-05-07 09:55:15 UTC
I get no mesa warnings, only warnings from wine about Mesa returning GL_INVALID*
Comment 4 Michal Suchanek 2012-05-07 10:02:05 UTC
invalid value:

Breakpoint 1, _mesa_error (ctx=0xccba90, error=1281, fmtString=0x7ffff4706278 "glTexImage%dD(internalFormat=%s)") at main/errors.c:996
996	main/errors.c: No such file or directory.
(gdb) bt full
#0  _mesa_error (ctx=0xccba90, error=1281, fmtString=0x7ffff4706278 "glTexImage%dD(internalFormat=%s)") at main/errors.c:996
        do_output = 225 '\341'
        do_log = <optimized out>
#1  0x00007ffff45e2a84 in texture_error_check (border=0, depth=1, height=64, width=64, type=0, format=0, internalFormat=0, level=0, 
    target=3553, dimensions=2, ctx=0xccba90) at main/teximage.c:1621
        proxyTarget = <optimized out>
        err = <optimized out>
        indexFormat = 0 '\000'
        isProxy = <optimized out>
        sizeOK = 1 '\001'
        colorFormat = <optimized out>
#2  teximage (ctx=0xccba90, dims=2, target=3553, level=0, internalFormat=0, width=64, height=64, depth=1, border=0, format=0, type=0, 
    pixels=0x0) at main/teximage.c:2501
        error = 1 '\001'
        unpack_no_border = {Alignment = -7152, RowLength = 32767, SkipPixels = 9180912, SkipRows = 0, ImageHeight = -8144, 
          SkipImages = 32767, SwapBytes = 45 '-', LsbFirst = 17 '\021', Invert = 90 'Z', BufferObj = 0x7fffffffe410}
        unpack = 0xcd22e0
#3  0x00007ffff45e2fc4 in _mesa_TexImage2D (target=<optimized out>, level=<optimized out>, internalFormat=<optimized out>, 
    width=<optimized out>, height=<optimized out>, border=<optimized out>, format=0, type=0, pixels=0x0) at main/teximage.c:2639
No locals.
#4  0x0000000000480145 in ?? ()
No symbol table info available.
#5  0x00000000004bbfd6 in ?? ()
No symbol table info available.
#6  0x0000000000440687 in ?? ()
No symbol table info available.
#7  0x000000000043b985 in ?? ()
No symbol table info available.
#8  0x000000000043c092 in ?? ()
No symbol table info available.
#9  0x00007ffff696eead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe408) at libc-start.c:228
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 738182590451561014, 4428032, 140737488348176, 0, 0, -738182590032367050, 
                -738203265834012106}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x5ddb20, 0x7fffffffe418}, data = {prev = 0x0, 
              cleanup = 0x0, canceltype = 6150944}}}
        not_first_call = <optimized out>
#10 0x0000000000439129 in _start ()
No symbol table info available.
(gdb) c
Continuing.
37923 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_ZERO, width = 64, height = 64, border = 0, format = GL_ZERO, type = GL_ZERO, pixels = NULL)
37923: warning: glGetError(glTexImage2D) = GL_INVALID_VALUE
Comment 5 Henri Verbeet 2012-05-07 10:37:29 UTC
That generally happens when an application tries to use a (D3D) format (e.g. DXT/s3tc) even though it's not available. A WINEDEBUG=+d3d,+d3d_surface log should show which format, although typically it's either s3tc or one of the floating point formats.
Comment 6 Michal Suchanek 2012-05-07 11:03:54 UTC
Indeed, it works with the texture compression library installed.

I guess this is something that Wine should report.

Unfortunately, the available messages are very unhelpful.


Sorry about the noise.


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.