summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glx: Explicitly reject servers that only support GLX 1.0Ian Romanick2011-12-191-4/+6
| | | | | | | | | | | | | __glXInitialize calls AllocAndFetchScreenConfigs. AllocAndFetchScreenConfigs unconditionally sends a glXQuerySeverString request to the server. This request is only supported with GLX 1.1 or later, so we were already implicitly incompatible with GLX 1.0 servers. How many more similar bugs lurk in the code that nobody has noticed in years? Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx: Initialize share_xid in CreateContextIan Romanick2011-12-191-0/+1
| | | | | | | | | | | | | Previously the share_xid was only set in the glXImportContextEXT path, and it was left set to None in all of the other create-context paths. Fixes the piglit test glx-query-context-info-ext. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx: Make parameter types for __glXSendError match protocol typesIan Romanick2011-12-192-4/+6
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: Jeremy Huddleston <[email protected]>
* glx: Make __glXSendError available in non-Apple buildsIan Romanick2011-12-194-1/+2
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: Jeremy Huddleston <[email protected]>
* glx: Send DestroyContext protocol at the correct timesIan Romanick2011-12-196-26/+31
| | | | | | | | | | | | | | | | | | | | | | | Send the DestroyContext protocol immediately when glXDestroyContext is called, and never call it when glXFreeContextEXT is called. In both cases, either destroy the client-side structures or, if the context is current, set xid to None so that the client-side structures will be destroyed later. I believe this restores the behavior of the original SGI code. See src/glx/x11 around commit 5df82c8. The spec doesn't say anything about glXDestroyContext not really destroying imported contexts (it acts like glXFreeContextEXT instead), but that's what the original code did. Note that glXFreeContextEXT on a non-imported context does not destroy it either. Fixes the piglit test glx-free-context. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx: Don't segfault if glXGetContextIDEXT is pased a NULL contextIan Romanick2011-12-191-1/+1
| | | | | | | | | | Fixes the piglit test glx-get-context-id. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx: Fix handling of property list received from the server in ↵Ian Romanick2011-12-191-13/+32
| | | | | | | | | | | | | | | glXImportContextEXT The primary problem was that the number of reply bytes read is clamped to sizeof(propList), but the loop that processes the properties tries to examine all of the properties sent by the server. If the server sends 47,000 properties, we only read 3 but process all 47,000. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx: Don't segfault if xcb_glx_is_direct_reply returns NULLIan Romanick2011-12-191-1/+1
| | | | | | | | NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx: Don't create a shared context if the other context isn't the same kindIan Romanick2011-12-193-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each of the DRI, DRI2, and DRISW backends contain code like the following in their create-context routine: if (shareList) { pcp_shared = (struct dri2_context *) shareList; shared = pcp_shared->driContext; } This assumes that the glx_context *shareList is actually the correct derived type. However, if shareList was created as an indirect-rendering context, it will not be the expected type. As a result, shared will contain garbage. This garbage will be passed to the driver, and the driver will probably segfault. This can be observed with the following GLX code: ctx0 = glXCreateContext(dpy, visinfo, NULL, False); ctx1 = glXCreateContext(dpy, visinfo, ctx0, True); Create-context is the only case where this occurs. All other cases where a context is passed to the backend, it is the 'this' pointer (i.e., we got to the backend by call something from ctx->vtable). To work around this, check that the shareList->vtable->destroy method is the same as the destroy method of the expected type. We could also check that shareList->vtable matches the vtable or by adding a "tag" to glx_context to identify the derived type. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add support for GL_ARB_depth_buffer_float under 3.0 override.Eric Anholt2011-12-194-1/+20
| | | | | | | | This is not exposed generally yet because some of the swrast paths hit in piglit (drawpixels, copypixels, blit) aren't yet converted to MapRenderbuffer. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add separate stencil/HiZ setup for MESA_FORMAT_Z32_FLOAT_X24S8.Eric Anholt2011-12-193-15/+20
| | | | | | | | | This is a little more unusual than the separate MESA_FORMAT_S8_Z24 support, because in addition to storing the real stencil data in a MESA_FORMAT_S8 miptree, we also make the Z miptree be MESA_FORMAT_Z32_FLOAT instead of the requested format. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Use the miptree format for texture surface format choice.Eric Anholt2011-12-192-2/+2
| | | | | | | | With separate stencil GL_DEPTH32F_STENCIL8, the miptree will have a really different format (MESA_FORMAT_Z32_FLOAT) from the teximage (MESA_FORMAT_Z32_FLOAT_X24S8). Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add support for mapping Z32_FLOAT_X24S8 fake packed depth/stencil.Eric Anholt2011-12-191-5/+17
| | | | | | | | The format handling here is tricky, because we're not actually generating a Z32_FLOAT_X24S8 miptree, so we're guessing the format that GL wants based on seeing Z32_FLOAT with a separate stencil. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Stop creating the wrapped depth irb.Eric Anholt2011-12-192-111/+8
| | | | | | | All the operations were just trying to get at irb->wrapped_depth->mt, which is the same as irb->mt now. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Properly demote the depth mt format for fake packed depth/stencil.Eric Anholt2011-12-194-3/+19
| | | | | | | | | | | gen7 only supports the non-packed formats, even if you associate a real separate stencil buffer -- otherwise it's as if the depth test always fails. This requires a little bit of care in the match_texture_image case, since the miptree format no longer matches the texture image format. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Reuse intel_miptree_match_image().Eric Anholt2011-12-191-9/+6
| | | | | | | | This little bit of logic was duplicated, which isn't much, but I was going to need to duplicate a bit of additional logic in the next commit. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Stop creating the wrapped stencil irb.Eric Anholt2011-12-195-78/+67
| | | | | | | | | | | There were only two places it was really used at this point, which was in the batchbuffer emit of the separate stencil packets for gen6/7. Just write in the ->stencil_mt reference in those two places and ditch all this flailing around with allocation and refcounts. v2: Fix separate stencil on gen7. Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi: update documents with some info on texture lookupDave Airlie2011-12-191-0/+11
| | | | | | | this mentions which channels are used for slice and depth comparison values. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix shadow1d tests.Dave Airlie2011-12-191-1/+13
| | | | | | | This fixes the piglit glsl-1.10 shadow1D related tests. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix shadow 2d texture array samplingDave Airlie2011-12-192-6/+22
| | | | | | | | | The 4th texcoord is used in this case for the comparison. This fixes piglit glsl-fs-shadow2DArray* on softpipe. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/draw: fix two side handlingDave Airlie2011-12-191-18/+9
| | | | | | | | | | | | The code didn't handle the case where front wasn't specified in the vertex shader outputs, but back was. In that case we were doing a copy from back to non-existant front, this code checks we have existant front/backs and only does the copy when they both exist. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* osmesa: fix RGB565 renderingAlex Galakhov2011-12-191-0/+4
| | | | Signed-off-by: Brian Paul <[email protected]>
* vdpau: Add background surface supportMaarten Lankhorst2011-12-191-1/+10
| | | | | | | Sets rgba layer as zeroth layer if a custom background_surface is specified. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Christian König <[email protected]>
* vdpau: Add support for mixer attributesMaarten Lankhorst2011-12-193-15/+147
| | | | | | | | | | | It's harmless to add support for attributes we don't support, since they require a feature enabled for them to affect something. As long as they aren't enabled, nothing happens. This enables support for custom colorspaces and background colors. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Christian König <[email protected]>
* vdpau: Add support for parametersMaarten Lankhorst2011-12-193-6/+126
| | | | | | | | | | Currently only validating, since nothing else can be done with it yet Signed-off-by: Maarten Lankhorst <[email protected]> v2: removed check_video_surface Signed-off-by: Christian König <[email protected]>
* softpipe: fix depth sampling for linear vs nearest.Dave Airlie2011-12-191-7/+16
| | | | | | | | | | This sample compare was always doing linear, and this makes the glsl-fs-shadow1DArray test render like the Intel driver. fix wrong 0->j from initial patch Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix texture sampling from 1D texture arrayDave Airlie2011-12-191-0/+13
| | | | | | | | | This is the first part of a fix to piglit glsl-fs-shadow1DArray also fix the passing of unused r[2] in the normal 1D case. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: make _mesa_set_tex_image() static since it's not called anywhere elseBrian Paul2011-12-182-13/+7
|
* nvc0: add NVC0_RESOURCE_FLAG_VIDEOChristoph Bumiller2011-12-182-0/+30
|
* glsl_to_tgsi: make sure copied instructions don't lose texture target. (v2)Dave Airlie2011-12-181-2/+6
| | | | | | | | | | | | | | The piglit draw-pixel-with-texture was asserting in the glsl->tgsi code, due to 0 texture target, this makes sure the texture target is copied over correctly when we copy instructions around. v2: drive-by fix bitmap on the way past. This avoids the assertion, have to contemplate fixing things as per the spec later. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965/vs: Add a new dst_reg constructor for file, number, type, and mask.Kenneth Graunke2011-12-181-0/+10
| | | | | | | | This will be especially useful for loading texturing parameters, where I need to (for example) reference m3.xz<D>. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Add vec4_instruction::is_tex() query.Kenneth Graunke2011-12-182-0/+11
| | | | | | | Copy and pasted from fs_inst::is_tex(), but without TXB. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Rename texturing ops from FS_OPCODE to SHADER_OPCODE, except TXB.Kenneth Graunke2011-12-185-46/+48
| | | | | | | | We'll be reusing most of these for the VS shortly. The one exception is TXB (texturing with LOD bias), which is explicitly forbidden in the VS. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Don't swizzle the results of textureSize().Kenneth Graunke2011-12-181-0/+3
| | | | | | | | | Fixes a regression since d2235b0f4681f75d562131d655a6d7b7033d2d8b, in my new textureSize sampler(1DArrayShadow|2DShadow|2DArrayShadow) piglit tests, though I'm not honestly sure how this ever worked. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* program: fix previous commitnobled2011-12-181-1/+1
| | | | Accidentally an old patch.
* program: fix out of bounds array accesses and other bad thingsnobled2011-12-181-15/+59
| | | | | | | | | | | | | | | | | | | | Noticed a "warning: array subscript is above array bounds" given at one of the existing sanity-check asserts. Turns out all the arrays of strings haven't matched the corresponding enum values in a while, if ever. I didn't know the proper names for any of these and couldn't find them in the base specs aside from "result.pointsize" in ARB_vertex_program, so I just filled in the enum's value as was done with other slots. Also add four STATIC_ASSERT()s to be sure and catch future additions or bumps to MAX_VARYING/etc again, and some more non-static asserts where there weren't any before. (Note, the fragment enum that corresponded to result.color(half) was removed in 8d475822e6e19fa79719c856a2db5b6a205db1b9.) Reviewed-by: Brian Paul <[email protected]>
* gen_matypes: eliminate printf warningsnobled2011-12-181-1/+6
| | | | | The VERT_BIT_* defines are 64-bit values now, but the printf was still expecting a simple int.
* r600g: fix MAX_STREAM_OUTPUT_SEPARATE_ATTRIBS limitMarek Olšák2011-12-171-2/+1
|
* mesa/x86: fix printf warningMarek Olšák2011-12-171-1/+1
|
* drisw: remove unused variableMarek Olšák2011-12-171-1/+2
|
* r600g: handle new capsMarek Olšák2011-12-171-0/+2
|
* r300g: handle new capsMarek Olšák2011-12-171-0/+4
|
* docs: update GL3 statusMarek Olšák2011-12-171-2/+2
|
* r600g: implement transform feedbackMarek Olšák2011-12-1718-13/+873
| | | | | | | | r600: DONE. r700: MOSTLY (done but locks up). Evergreen: MOSTLY (done but doesn't work for an unknown reason). The kernel support will come soon.
* st/mesa: expose conservative_depth if GLSL 1.3 is supportedMarek Olšák2011-12-171-0/+6
| | | | It's not yet, but it can be enabled by the override environment variable.
* gallivm: Fix build with llvm-3.1svn.Vinson Lee2011-12-162-1/+15
| | | | | | | | | llvm-3.1svn r145714 moved global variables into a new TargetOptions class. TargetMachine constructor now needs a TargetOptions object as well. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix memory leak on error path.Vinson Lee2011-12-161-0/+1
| | | | | | | Fixes Coverity resource leak defect. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: Fix memory leak in out-of-memory path.Vinson Lee2011-12-161-0/+1
| | | | | | | Fixes Coverity resource leak defect. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: use _mesa_prepare_mipmap_level() in the mipmap generation codeBrian Paul2011-12-161-35/+12
| | | | | | | See previous commit for more information. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: new _mesa_prepare_mipmap_level() function for mipmap generationBrian Paul2011-12-162-33/+101
| | | | | | | | | | | | | | | | This helper function is used during mipmap generation to prepare space for the destination mipmap levels. This improves/fixes two things: 1. If the texture object was created with glTexStorage2D, calling _mesa_TexImage2D() to allocate the new image would generate INVALID_OPERATION since the texture is marked as immutable. 2. _mesa_TexImage2D() always frees any existing texture image memory before allocating new memory. That's inefficient if the existing image is the right size already. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>