summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-08-06egl: Replace KHR_surfaceless_* extensions with KHR_surfaceless_contextIan Romanick6-38/+9
KHR extension name is reserved for Khronos ratified extensions, and there is no such thing as EGL_KHR_surfaceless_{gles1,gles2,opengl}. Replace these three extensions with EGL_KHR_surfaceless_context since that extension actually exists. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-06egl_dri2: Refactor dereference of dri2_ctx_sharedIan Romanick1-6/+5
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-06egl_dri2: Remove swrast version >= 2 checksIan Romanick1-27/+11
Since support for swrast version 2 was added (f55d027a), it has also been required. In swrast_driver_extensions, version 2 is set for __DRI_SWRAST extension. Remove the spurious version checks sprinked through the code. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-06dri2: Fix bug in attribute handling for non-desktop OpenGL contextsIan Romanick1-6/+17
Previously an error would be generated if any attributes were specified when creating a non-desktop OpenGL context. This was a mistake, and it will prevent old drivers from working with new EGL libraries that add support for the createContextAttribs interface. Instead, match the behavior of EGL_KHR_create_context: allow versions that make sense, reject non-zero flags. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-06i965: Allocate dummy slots for point sprites before computing VUE map.Kenneth Graunke1-2/+2
Commit f0cecd43d6b6d moved the VUE map computation to be only once, at VS compile time. However, it did so in slightly the wrong place: it made the one call to brw_vue_compute_map happen right before the allocation of dummy slots for replaced point sprite coordinates, causing a different VUE map to be generated (at least on Ironlake). Fixes a regression in Piglit's point-sprite test on Ironlake. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46489 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-06i965/vs: Don't clobber sampler message MRFs with subexpressions.Kenneth Graunke1-17/+42
See the preceding commit for a description of the problem. NOTE: This is a candidate for stable release branches. v2: Use a separate dPdx variable rather than reusing the lod src_reg. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52129 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-06i965/fs: Don't clobber sampler message MRFs with subexpressions.Kenneth Graunke2-70/+71
Consider a texture call such as: textureLod(s, coordinate, log2(...)) First, we begin setting up the sampler message by loading the texture coordinates into MRFs, starting with m2. Then, we realize we need the LOD, and go to compute it with: ir->lod_info.lod->accept(this); On Gen4-5, this will generate a SEND instruction to compute log2(), loading the operand into m2, and clobbering our texcoord. Similar issues exist on Gen6+. For example, nested texture calls: textureLod(s1, c1, texture(s2, c2).x) Any texturing call where evaluating the subexpression trees for LOD or shadow comparitor would generate SEND instructions could potentially break. In some cases (like register spilling), we get lucky and avoid the issue by using non-overlapping MRF regions. But we shouldn't count on that. Fixes four Piglit test regressions on Gen4-5: - glsl-fs-shadow2DGradARB-{01,04,07,cumulative} NOTE: This is a candidate for stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52129 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-06i965/fs: Factor out texcoord setup into a helper function.Kenneth Graunke2-11/+28
With the textureRect support and GL_CLAMP workarounds, it's grown sufficiently that it deserves its own function. Separating it out makes the original function much more readable. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-06i965/fs: Move message header and texture offset setup to generate_tex().Kenneth Graunke3-21/+27
Setting the texture offset bits in the message header involves very specific hardware register descriptions. As such, I feel it's better suited for the lower level "generate" layer that has direct access to the weird register layouts, rather than at the fs_inst abstraction layer. This also parallels the approach I took in the VS backend. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-06r600g: atomize sampler state v2Jerome Glisse7-452/+262
Use atom for sampler state. Does not provide new functionality or fix any bug. Just a step toward full atom base r600g. v2: Split seamless on r6xx/r7xx into it's own atom. Make sure it's emited after sampler and with a pipeline flush before otherwise it does not take effect. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-08-06st/mesa: merge fragment/vertex sampler update codeBrian Paul1-56/+50
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06st/mesa: massage update_vertex_samplers() codeBrian Paul1-16/+20
...to look like update_fragment_samplers() code, as with the previous commit. The next step would be to merge the two functions. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06st/mesa: merge fragment/vertex texture update codeBrian Paul1-58/+42
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06st/mesa: massage the update_vertex_textures() codeBrian Paul1-4/+14
...to look like update_fragment_textures() code. The next step would be to merge the two functions. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06st/mesa: rename some vertex/fragment state fields for better consistencyBrian Paul5-25/+34
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06llvmpipe: consolidate the sampler and sampler view setting codeBrian Paul1-68/+56
Less code. And as with softpipe, if/when we consolidate the pipe_context functions for binding sampler state, this will make the llvmpipe changes trivial. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06llvmpipe: combine vertex/fragment sampler state into an arrayBrian Paul8-42/+41
This will allow code consolidation in the next patch. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06softpipe: consolidate vert/frag/geom sampler setting functionsBrian Paul1-112/+54
The functions for setting samplers and sampler views for vertex, fragment and geometry shaders were nearly identical. Now they use shared code. In the future, if the pipe_context functions for setting samplers and sampler views for vert/frag/geom/compute are combined, this will make updating the softpipe driver a snap. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06softpipe: consolidate sampler-related arraysBrian Paul6-121/+99
Combine separate arrays for vertex/fragment/geometry samplers, etc into one array indexed by PIPE_SHADER_x. This allows us to collapse separate code for vertex/fragment/geometry state into loops over the shader stage. More to come. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-06softpipe: combine vert/frag/geom texture caches in an arrayBrian Paul5-91/+60
This lets us consolidate some code now, and more in subsequent patches. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-08-04mesa: Fix off-by-one error in Parse_TextureImageId.Vinson Lee1-1/+1
Fixes out-of-bounds write defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04util: Move dereference after null check in util_resource_copy_region.Vinson Lee1-3/+3
Fixes dereference before null check defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04i915g: silence a const pointer warningBrian Paul1-1/+1
2012-08-04radeonsi: fix build failure after blitter changesMarek Olšák1-1/+1
2012-08-04r600g: precompute color buffer state in pipe_surface and reuse itMarek Olšák5-130/+175
2012-08-04r600g: precompute depth buffer state in pipe_surface and reuse itMarek Olšák3-77/+92
This is done on-demand, because we don't know in advance if a zbuffer will be bound as depth or color.
2012-08-04r600g: simplify create_surfaceMarek Olšák1-20/+8
2012-08-04r600g: drop the old texture allocation codeMarek Olšák7-691/+233
Made obsolete by the libdrm surface allocator.
2012-08-04r600g: make sure copying of all texture formats is acceleratedMarek Olšák2-52/+54
2012-08-04gallium/u_blitter: add a query for checking whether copying is supportedMarek Olšák4-37/+77
v2: add comments
2012-08-04r600g: don't decompress depth or stencil if there isn't anyMarek Olšák4-9/+17
2012-08-04r600g: correct texture memory size for Z32F_S8X24 on evergreenMarek Olšák1-7/+16
2012-08-04gallium/u_blitter: remove fallback for stencil copy that all drivers skippedMarek Olšák4-15/+5
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04gallium/u_blitter: add ability to blit only depth or only stencilMarek Olšák3-14/+17
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04gallium: define PIPE_MASK_RGBAZSMarek Olšák1-0/+1
I need this and it seems like it could be useful. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04gallium/u_blitter: minor cleanupMarek Olšák2-8/+8
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04gallium/tgsi: fixup texture name stringsMarek Olšák1-4/+4
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04gallium/u_blitter: set sample mask to ~0Marek Olšák2-0/+20
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04gallium/u_blit: bail out if src is a multisample textureMarek Olšák1-0/+6
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04gallium/u_blit: check nr_samples before using resource_copy_regionMarek Olšák1-1/+2
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04gallium: set sample mask to ~0 for clear, blit and gen_mipmapMarek Olšák5-2/+26
The sample mask affects single-sampled rendering too (it's orthogonal to the color mask). Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-04r600g: fix F2U opcode translationDave Airlie1-1/+1
Signed-off-by: Marek Olšák <maraeo@gmail.com>
2012-08-03draw: Ensure channel in convert_to_soa is initialized.Vinson Lee1-1/+1
Fixes uninitialized pointer read defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-03u_blitter: Move a pointer dereference after null check.Vinson Lee1-2/+3
Fixes dereference before null check defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-08-03Use C99 NAN and INFINITY macrosMatt Turner1-10/+3
2012-08-03gallium/tests/trivial: updates for CSO interface changesBrian Paul1-2/+2
2012-08-03st/xorg: updates for CSO interface changesBrian Paul2-7/+9
2012-08-03st/xa: updates for CSO interface changesBrian Paul4-9/+9
2012-08-03vega: fix build breakage from cso sampler/view changesBrian Paul1-17/+17
2012-08-03cso: remove unreachable break statementsBrian Paul1-5/+0