summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radeon: Delete DRI1 screen init code and thus support for !kernel_mm.Eric Anholt2011-10-281-495/+5
| | | | | | | | | | | It's past time, and it was going to get in the way of the renderbuffer mapping refactor. We dropped all the other DRI1 drivers for this release, and I can't imagine anybody supporting DRI1 radeon classic in a new release of Mesa. Cleanup of the resulting dead code to follow. Acked-by: Alex Deucher <[email protected]>
* dri: Drop _dri_texformats that just obfuscate MESA_FORMAT names.Eric Anholt2011-10-283-10/+3
| | | | | The remaining _dri_texformats are the ones that are variable depending on the endianness of the system.
* radeon: Use _mesa_get_format_base_format for winsys renderbuffer setup.Eric Anholt2011-10-281-10/+1
|
* radeon: Remove dead swrast renderbuffer setup code.Eric Anholt2011-10-281-29/+20
| | | | This was from the stub code in the initial commit of this file.
* glsl: Remove pointless uses of glsl_type::get_base_type().Kenneth Graunke2011-10-282-7/+3
| | | | | | | | These are effectively doing type->get_base_type()->base_type, which is equivalent to type->base_type. Just use that, as it's simpler. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* r600g: don't flush before reading query resultsMarek Olšák2011-10-281-5/+0
| | | | Taken care of by the winsys.
* r600g: only maintain the list of active queriesMarek Olšák2011-10-284-32/+19
| | | | | | | | And not all existing queries. The only reason we have that list is to be able to suspend and resume the active ones. This reduces looping over queries when suspending and resuming. The queries no longer have to track some of their states.
* r600g: cleanup r600_query_resultMarek Olšák2011-10-281-9/+6
|
* r600g: don't flush in r600_get_backend_maskMarek Olšák2011-10-281-3/+0
| | | | The winsys does the flush in buffer_map.
* r600g: remove redundant variable r600_query::buffer_sizeMarek Olšák2011-10-282-15/+17
|
* r300g: remove useless codeMarek Olšák2011-10-284-22/+3
|
* gallium/auxiliary/util: Solaris also has standard Unix socketsAlan Coopersmith2011-10-272-4/+8
| | | | | Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r300/compiler: Fix scheduler bug causing texture corruptionTom Stellard2011-10-271-6/+35
| | | | | | | | | | | | | | We weren't setting TEX_SEM_WAIT on instructions that read the value of a TEX instruction and also wrote the same register as the TEX instruction. This is the sequence we were miscompiling: 1: TEX temp[0], input[2].xy__, 2D[0] ... 16: src0.xyz = temp[22], src1.xyz = temp[0], src2.xyz = temp[19] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx https://bugs.freedesktop.org/show_bug.cgi?id=42090
* i965/gen6+: Add support for noperspective interpolation.Paul Berry2011-10-279-39/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This required the following changes: - WM setup now makes the appropriate set of barycentric coordinates (perspective vs. noperspective) available to the fragment shader, based on whether the shader requires perspective interpolation, noperspective interpolation, both, or neither. - The fragment shader backend now uses the appropriate set of barycentric coordiantes when interpolating, based on the interpolation mode returned by ir_variable::determine_interpolation_mode(). - SF setup now uses gl_fragment_program::InterpQualifier to determine which attributes are to be flat shaded (as opposed to the old logic, which only flat shaded colors). - CLIP setup now ensures that the clipper outputs non-perspective barycentric coordinates when they are needed by the fragment shader. Fixes the remaining piglit tests of interpolation qualifiers that were failing: - interpolation-flat-*-smooth-none - interpolation-flat-other-flat-none - interpolation-noperspective-* - interpolation-smooth-gl_*Color-flat-* Reviewed-by: Eric Anholt <[email protected]>
* i965/gen6+: Rename GEN6_CLIP_BARYCENTRIC_ENABLE.Paul Berry2011-10-271-1/+1
| | | | | | | | | | The name was misleading. The actual effect of the bit is to cause the clipper to emit *non-perspective* barycentric coordinate information (which is only needed when doing noperspective interpolation). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: use determine_interpolation_mode().Paul Berry2011-10-271-4/+4
| | | | | | | | | | | | | | This patch changes how fs_visitor::emit_general_interpolation() decides what kind of interpolation to do. Previously, it used the shade model to determine how to interpolate colors, and used smooth interpolation on everything else. Now it uses ir_variable::determine_interpolation_mode(), so that it respects GLSL 1.30 interpolation qualifiers. Fixes piglit tests interpolation-flat-*-smooth-{distance,fixed,vertex} and interpolation-flat-other-flat-{distance,fixed,vertex}. Reviewed-by: Eric Anholt <[email protected]>
* i965/gen6+: Parameterize barycentric interpolation modes.Paul Berry2011-10-2710-38/+103
| | | | | | | | | | | | | | | | | This patch modifies the fragment shader back-end so that instead of using a single delta_x/delta_y register pair to store barycentric coordinates, it uses an array of such register pairs, one for each possible intepolation mode. When setting up the WM, we intstruct it to only provide the barycentric coordinates that are actually needed by the fragment shader--that is computed by brw_compute_barycentric_interp_modes(). Currently this function returns just BRW_WM_PERSPECTIVE_PIXEL_BARYCENTRIC, because this is the only interpolation mode we support. However, that will change in a later patch. Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Fix split_virtual_grfs() when delta_xy not in a virtual register.Paul Berry2011-10-271-1/+1
| | | | | | | | | | | | | | This patch modifies the special case in fs_visitor::split_virtual_grfs() that prevents splitting from being applied to the delta_x/delta_y register pair (this register pair needs to remain contiguous so that it can be used by the PLN instruction). When gen>=6, this register pair is in a fixed location, not a virtual register, so it was in no danger of being split. And split_virtual_grfs' attempt not to split it was preventing some other unrelated register from being split. Reviewed-by: Eric Anholt <[email protected]>
* glsl: add ir_variable::determine_interpolation_mode() function.Paul Berry2011-10-272-0/+26
| | | | | | | | This function determines how a variable should be interpolated based both on interpolation qualifiers and the current shade model. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Distinguish between no interpolation qualifier and 'smooth'Paul Berry2011-10-274-3/+14
| | | | | | | | | | | | | | | Previously, we treated the 'smooth' qualifier as equivalent to no qualifier at all. However, this is incorrect for the built-in color variables (gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor, and gl_BackSecondaryColor). For those variables, if there is no qualifier at all, interpolation should be flat if the shade model is GL_FLAT, and smooth if the shade model is GL_SMOOTH. To make this possible, I added a new value to the glsl_interp_qualifier enum, INTERP_QUALIFIER_NONE. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Expose GLSL interpolation qualifiers in gl_fragment_program.Paul Berry2011-10-278-33/+69
| | | | | | | | | | | | | | | | | This patch makes GLSL interpolation qualifiers visible to drivers via the array InterpQualifier[] in gl_fragment_program, so that they can easily be used by driver back-ends to select the correct interpolation mode. Previous to this patch, the GLSL compiler was using the enum ir_variable_interpolation to represent interpolation types. Rather than make a duplicate enum in core mesa to represent the same thing, I moved the enum into mtypes.h and renamed it to be more consistent with the other enums defined there. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* docs: update GL3 statusMarek Olšák2011-10-271-5/+4
| | | | | | EXT_texture_array has been completed for quite a while. Removing BindBufferBase+Range, because they're part of EXT_transform_feedback.
* r600g: remove redundant variable r600_pipe_context::blitMarek Olšák2011-10-273-4/+2
|
* mesa: initialize ARB_transform_feedback2 dispatchMarek Olšák2011-10-272-1/+10
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: improve EXT_transform_feedback display list supportMarek Olšák2011-10-271-10/+9
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix GL error checking in TransformFeedbackVaryingsMarek Olšák2011-10-271-1/+3
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/glx: fix mixed declarations and code, remove unused varBrian Paul2011-10-261-7/+7
|
* st/mesa: tell VBO module to always unmap buffers before drawingBrian Paul2011-10-261-0/+4
| | | | | | Without this it's possible to wind up in a draw call with the glBegin/End VBO still in a mapped state. This is a problem for the SVGA3D driver and probably not good for other HW drivers.
* glsl: Rename remaining internal builtins from gl_MESA* to gl_*MESA.Eric Anholt2011-10-263-12/+12
| | | | | | This matches the usual convention for extension builtin variables. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Drop texture border support code.Eric Anholt2011-10-265-93/+29
| | | | | | | | | | Now that texture borders are gone, we never need to allocate our textures through non-miptrees, which simplifies some irritating paths. v2: Remove the !mt support case from intel_map_texture_image() Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
* intel: Enable stripping of texture borders.Eric Anholt2011-10-261-0/+2
| | | | | | | | | | | | | | | | | | | This replaces software rendering of textures with the deprecated 1-pixel border (which is always bad, since mipmapping is rather broken in swrast, and GLSL 1.30 is unsupported) with hardware rendering that just pretends there was never a border (so you have potential seams on apps that actually intentionally used the 1-pixel borders, but correct rendering otherwise). This doesn't regress any piglit tests on gen6 (since the texwrap border/bordercolor cases already failed due to broken border color handling), but regresses texwrap border cases on original gen4 since those end up sampling the border color instead of the border pixels. It's a small price to pay for not thinking about texture borders any more. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Apply StripTextureBorder to CopyTexImage as well.Eric Anholt2011-10-261-0/+10
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Fold gallium's texture border stripping into a core Mesa option.Eric Anholt2011-10-264-58/+73
| | | | | | | | | We wanted to reuse this in the Intel driver. v2: Move the flag to ctx->Const Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
* mesa: Skip texstore for 0-sized texture data.Eric Anholt2011-10-261-0/+9
| | | | | | | | | | | The intel driver (and gallium, it looks like, though it doesn't use these texstore functions at this point) doesn't bother making storage for textures with 0 width, height, or depth. This avoids them having to deal with returning a mapping for that nonexistent data. Fixes assertion failures with an upcoming intel driver change. Reviewed-by: Brian Paul <[email protected]>
* r600g: remove redundant assignment of pipe_draw_info in draw_vboMarek Olšák2011-10-261-2/+0
|
* llvmpipe: llvmpipe doesn't support pure integers yet.Dave Airlie2011-10-262-0/+8
| | | | | | Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=42240 Signed-off-by: Dave Airlie <[email protected]>
* r600g: cleanup draw_vbo and add commentsMarek Olšák2011-10-264-93/+71
|
* ralloc: Move declaration before code.Vinson Lee2011-10-251-1/+2
| | | | Fixes build error with MSVC.
* scons: Add link_uniforms.cpp to SConscript.Vinson Lee2011-10-251-0/+1
|
* ir_to_mesa: Use uniform_field_visitor to add all struct fields to parameter listIan Romanick2011-10-251-12/+38
| | | | | | | | | | | | | | Previously the uniform was passed as single, whole structure to _mesa_add_parameter. This was completely bogus and resulted in a DataType of 0 (instead of a valid GLSL type enum). Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980 Tested-by: Brian Paul <[email protected]> Cc: Bryan Cain <[email protected]> Cc: Vinson Lee <[email protected]> Cc: José Fonseca <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* linker: Add uniform_field_visitor class to process leaf fields of a uniformIan Romanick2011-10-253-0/+129
| | | | | Signed-off-by: Ian Romanick <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* ralloc: Add new [v]asprintf_rewrite_tail functions.Kenneth Graunke2011-10-252-4/+80
| | | | | | | | | | | | | | | | | | This can be useful if you want to create a bunch of temporary strings with a common prefix. For example, when iterating over uniform structure fields, one might want to create temporary strings like "pallete.primary", "palette.outline", and "pallette.shadow". This could be done by overwriting the '.' with a null-byte and calling ralloc_asprintf_append, but that incurs the cost of strlen("pallete") every time...when this is already known. These new functions allow you rewrite the tail of the string, given a starting index. If the starting index is the length of the string, this is equivalent to appending. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* linker: Eliminate more dead code after demoting shader inputs and outputsIan Romanick2011-10-251-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following vertex shader and fragment shader: // vertex shader varying vec4 v; uniform vec4 u; void main() { gl_Position = vec4(0.0); v = u; } // fragment shader void main() { gl_FragColor = vec4(0.0); } Since the fragment shader does not use 'v', it is demoted from a varying to a simple global variable. Once that happens, the assignment to 'v' is useless, and it should be removed. In addition, 'u' is no longer active, and it should also be removed. Performing extra dead code elimination after demoting shader inputs and outputs takes care of this. This elimination must occur before assigning uniform locations, or the declaration of 'u' cannot be removed. This change *breaks* the piglit test getuniform-01, but that test is already incorrect. The test uses a vertex shader that assigns to a user-defined varying, but it has no fragment shader. Since Mesa does not support ARB_separate_shader_objects (we only support the EXT version), the linker correctly eliminates the user-defined varying. The cascading effect is that the uniform queried by the C code of the test is also (correctly) eliminated. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980 Tested-by: Brian Paul <[email protected]> Cc: Bryan Cain <[email protected]> Cc: Vinson Lee <[email protected]> Cc: José Fonseca <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* glsl: Add uniform_locations_assigned parameter to do_dead_code opt passIan Romanick2011-10-2510-17/+49
| | | | | | | | | | | | | | | | | Setting this flag prevents declarations of uniforms from being removed from the IR. Since the IR is directly used by several API functions that query uniforms in shaders, uniform declarations cannot be removed after the locations have been set. However, it should still be safe to reorder the declarations (this is not tested). Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980 Tested-by: Brian Paul <[email protected]> Reviewed-by: Bryan Cain <[email protected]> Cc: Vinson Lee <[email protected]> Cc: José Fonseca <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* i965: Add more #defines for Gen6+ 3DSTATE_GS fields.Kenneth Graunke2011-10-251-0/+8
| | | | | | | These should be useful for doing transform feedback on Sandybridge. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add new brw_context::max_gs_threads constant.Kenneth Graunke2011-10-252-0/+8
| | | | | | | | These are correct to the best of my knowledge, gleaned from a variety of internal sources. Sadly, the Sandybridge PRM has incorrect limits. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Rename (vs|wm)_max_threads to max_(vs|wm)_threads for consistency.Kenneth Graunke2011-10-2510-24/+29
| | | | | | | | | The inconsistency between vs_max_threads and max_vs_entries was rather annoying. I could never seem to remember which one was reversed, which made it harder to find quickly. "Max __ Threads" seems more natural. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove "single threaded" INTEL_DEBUG mode.Kenneth Graunke2011-10-255-18/+4
| | | | | | | | | | | | | | | | | According to the docs for 3DSTATE_PS (Gen7+) and 3DSTATE_WM (Gen6), there is a platform dependent value for the minimum number of pixel shader threads. It may also vary based on whether WIZ Hashing is on. For example, Ivybridge requires at least 4 threads if WIZ hashing is disabled, and 8 if it's enabled. Programming it to use less threads is illegal. Sandybridge appears to have similar restrictions. So on newer platforms, INTEL_DEBUG=sing will probably just hang the GPU. Rather than try to patch it up for newer platforms and extend it to support geometry shaders, just remove it as it isn't that useful anyway. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove unnecessary and incorrect TexEnv parameter validation.Kenneth Graunke2011-10-251-6/+0
| | | | | | | | | | | | | | | | | For GL_RGB_SCALE and GL_ALPHA_SCALE targets, the API wrapper code attempts to ensure the parameter is 1.0, 2.0, or 4.0. This is unnecessary: set_combiner_scale in texenv.c (called by _mesa_TexEnvfv) already checks this and raises an appropriate error. It's also incorrect: For glTexEnvx, the API validation code directly compares the GLfixed input parameter with a floating point constant, prior to converting fixed-point to floating point. Fixes an issue in the OpenGL ES 1.1 conformance suite. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/glx: Implement texture_from_pixmap without DRI.Stéphane Marchesin2011-10-253-9/+136
| | | | Makes texture_from_pixmap work with non-DRI llvmpipe.