summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Remove support for NV_vertex_program's special attributes aliasingEric Anholt2012-10-159-74/+12
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix NV_fragment_program's display list opcode for RequestResident.Eric Anholt2012-10-151-1/+1
| | | | | | | While nuking NV_vertex_program, I noticed that one of my opcodes was used in a strange place. Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove support for NV_vertex_program's tracked matrices.Eric Anholt2012-10-1511-274/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove Mesa IR opcodes that existed only for NV_vertex_program.Eric Anholt2012-10-156-85/+0
| | | | | | v2: Remove dead positive() function, caught by Matt. Reviewed-by: Brian Paul <[email protected]> (v1)
* mesa: Remove support for parsing NV vertex programs.Eric Anholt2012-10-157-1562/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* swrast: Remove support for GL_NV_vertex_program.Eric Anholt2012-10-152-3/+0
| | | | | | | It's not supported in any hardware drivers, and doesn't appear to be useful on Linux. Reviewed-by: Brian Paul <[email protected]>
* gallium: Remove #if 0-ed enable of NV_vp. It's going away.Eric Anholt2012-10-151-5/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* r200: Remove support for software-only NV_vertex_program.Eric Anholt2012-10-154-18/+1
| | | | | | | | It wasn't supported in hardware, and the comments in the code indicated no known uses (similar to my experience on Intel) and a possible intent to remove it. Reviewed-by: Brian Paul <[email protected]>
* intel: Remove NV_vertex_program support.Eric Anholt2012-10-153-9/+0
| | | | | | | | | | | | We were holding on to this code because we were aware that NWN 1 had some support for vertex programs -- no other linux programs I've come across would use it (since other software also has ARB_vp or GLSL support). Only, it turns out that NWN doesn't even give us any vertex programs. Given that we have known issues where the extension has never been fully supported, just give up on it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46795 Reviewed-by: Brian Paul <[email protected]>
* i965/vp: Remove more code for unused opcodes.Eric Anholt2012-10-151-55/+1
| | | | | | | These don't appear in ARB_vp or NV_vp and I missed that fact on the first pass of removing dead opcodes. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix integer texture border color for some formats (v2)Marek Olšák2012-10-154-48/+112
| | | | | | | | | | | | And the clear color too, though that may be an issue only with GL_RGB if it's actually RGBA in the driver. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> v2: The types of st_translate_color parameters were changed to gl_color_union and pipe_color_union as per Brian's comment.
* mesa: Fix a crash in update_texture_state() for external texture typeAbdiel Janulgue2012-10-152-0/+10
| | | | | | | NOTE: This is a candidate for the stable branch. Signed-off-by: Abdiel <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* android: generate matching remap_helper to dispatch tableTapani Pälli2012-10-121-1/+1
| | | | | | | | | | | commit a010215463c63680c69e90202fe3fcd2e5b25fa6 removed ES2 specific dispatch table and remap_helper, since now we are using dispatch.h which is generated from gl_and_es_API.xml we need to generate a matching remap_helper using the same xml. Note: This is a candidate for the 9.0 branch. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa/st: Fix assertions.José Fonseca2012-10-121-2/+2
| | | | Can't access ptDraw before it is written.
* intel: print debug either to stdout or `logcat' depending on platform.Oliver McFadden2012-10-122-4/+16
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-117-100/+80
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
* st/mesa: use the renderbuffer chosen by core Mesa in CopyTexSubImageMarek Olšák2012-10-111-12/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use transfer_inline_write in st_texture_image_dataMarek Olšák2012-10-111-46/+8
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: remove useless checking in reset_cacheMarek Olšák2012-10-111-6/+0
| | | | | | It's always NULL here. Reviewed-by: Brian Paul <[email protected]>
* i965/vs: Add support for splitting virtual GRFs.Eric Anholt2012-10-103-0/+62
| | | | | | | | | | This should improve our ability to register allocate without spilling. Unfortuantely, due to the live variable analysis being ignorant of loops, we still have register allocation failures on some programs. v2: Add more context to the comment explaining the function. Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* i965/vs: Try again when we've successfully spilled a reg.Eric Anholt2012-10-103-10/+16
| | | | | | | | Before, we'd spill one reg, then continue on without actually register allocating, then assertion fail when we tried to use a vgrf number as a register number. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Implement register spilling.Kenneth Graunke2012-10-103-1/+144
| | | | | | | | | | | | | | To validate this code, I ran piglit -t vs quick.tests with the "go spill everything" debugging code enabled. There was only one regression: glsl-vs-unroll-explosion simply ran out of registers. This should be fine in the real world, since no one actually spills every single register. NOTE: This is a candidate for the 9.0 branch. Even if it proves to have bugs, it's likely better than simply failing to compile. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Fix unit mismatch in scratch base_offset parameter.Kenneth Graunke2012-10-103-4/+8
| | | | | | | | | | | | | | | | | | | | | move_grf_array_access_to_scratch() calculates scratch buffer offsets in bytes. However, emit_scratch_read/write() expects the base_offset parameter to be measured in OWords. As a result, a shader using a scratch read/write offset greater than zero (in practice, a shader containing more than one variable in scratch) would use too large an offset, frequently exceeding the available scratch space. This patch corrects the mismatch by removing spurious conversion from OWords to bytes in move_grf_array_access_to_scratch(). This is based on a patch by Paul Berry. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Avoid C99 indexed initializers.José Fonseca2012-10-102-5/+29
| | | | | | Not supported by MSVC. Reviewed-by: Imre Deak <[email protected]>
* mesa: Prevent CONST macro re-definition.José Fonseca2012-10-101-0/+1
| | | | | | | Should fix MSVC build, as windows.h also defines CONST. CONST usage in get.c is not new, so probably this just appeared now due to changes in the includes.
* mesa: Silence 'assignment makes integer from pointer without a cast' warnings.José Fonseca2012-10-101-2/+2
|
* glget: fix make check for glGet GL_POLYGON_OFFSET_BIASImre Deak2012-10-101-1/+1
| | | | | | | | | | | This got broken by: 7182a1f glapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension section Fix it by appending the _EXT suffix to the enum in the test too. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: remove the unused TYPE_API_MASK flagsImre Deak2012-10-101-6/+0
| | | | | | | | | Since we generate the hash tables in build time, these flags aren't used any more, remove them. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: use the build time generated hash tablesImre Deak2012-10-102-1015/+13
| | | | | | Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: add script to generate hash tables in build timeImre Deak2012-10-106-2/+984
| | | | | | | | | | | | | | | This will be needed by the next patch, which will switch to using the parameter descriptor- and hash tables generated by the script. The hash algorithm remains the same, the output parameter descriptor table format changes slightly. There the TYPE_API_MASK entries are removed and an invalid NULL entry is inserted at the beginning. This is ok, as get.c:find_value() doesn't rely on TYPE_API_MASK any more to detect an invalid enum. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* scons/android: add flag to check for enabled GL APIsImre Deak2012-10-102-9/+9
| | | | | | | | Needed by the next patch. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: rename *{_EXT,_ARB} enums missing from the XML specImre Deak2012-10-101-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following enums used to be extensions but later became part of the core specification. The _EXT/_ARB versions of these are not present in in the current XML spec files, only defined in GL/glext.h Later we'll need to look up these in a python script using the XML spec. As a preparation for that remove the _EXT,_ARB suffix from these enums and rename GL_DISTANCE_ATTENUATION_EXT to GL_POINT_DISTANCE_ATTENUATION. Naturally, all enums keep their numerical values. Note that similar renames shouldn't be necessary in the future: in case of a new extension the XML spec is updated with the new _EXT/_ARB etc. name and this name is added to the enum table in get.c. Later the extension may become part of the core spec, at which point the name w/o the _EXT/_ARB suffix is added to the XML spec and the table in get.c remains the same. GL_BLEND_DST_ALPHA_EXT GL_BLEND_DST_RGB_EXT GL_BLEND_SRC_ALPHA_EXT GL_BLEND_SRC_RGB_EXT GL_COLOR_SUM_EXT GL_COMPRESSED_TEXTURE_FORMATS_ARB GL_CURRENT_FOG_COORDINATE_EXT GL_CURRENT_SECONDARY_COLOR_EXT GL_DISTANCE_ATTENUATION_EXT GL_FOG_COORDINATE_ARRAY_EXT GL_FOG_COORDINATE_ARRAY_STRIDE_EXT GL_FOG_COORDINATE_ARRAY_TYPE_EXT GL_FOG_COORDINATE_SOURCE_EXT GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB GL_PACK_IMAGE_HEIGHT_EXT GL_PACK_SKIP_IMAGES_EXT GL_SECONDARY_COLOR_ARRAY_EXT GL_SECONDARY_COLOR_ARRAY_SIZE_EXT GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT GL_SECONDARY_COLOR_ARRAY_TYPE_EXT GL_UNPACK_IMAGE_HEIGHT_EXT GL_UNPACK_SKIP_IMAGES_EXT Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: simplify the 'enum not found' conditionImre Deak2012-10-101-3/+5
| | | | | | | | | | | | | | | | | When traversing the hash table looking up an enum that is invalid we eventually reach the first element in the descriptor array. By looking at the type of that element, which is always TYPE_API_MASK, we know that we can stop the search and return error. Since this element is always the first it's enough to check for its index being 0 without looking at its type. Later in this patchset, when we generate the hash tables during build time, this will allow us to remove the TYPE_API_MASK and related flags completly. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: fix parameter lookup for apps using multiple APIsImre Deak2012-10-103-18/+33
| | | | | | | | | | | | | The glGet hash was initialized only once for a single GL API, even if the application later created a context for a different API. This resulted in glGet failing for otherwise valid parameters in a context if that parameter was invalid in another context created earlier. Fix this by using a separate hash table for each API. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa/tests: Remove driverCtx parameter from call to _mesa_initialize_contextIan Romanick2012-10-091-2/+1
| | | | | | Fixes 'make check' breakage since 733dba2. Signed-off-by: Ian Romanick <[email protected]>
* intel: Add missing #include <time.h>Quentin Glidic2012-10-091-0/+1
| | | | | | | | Commit 006c1a3c652803e2ff8d5f7ea55c9cb5d8353279 introduced a call to clock_gettime, but failed to include <time.h>, breaking the build in some cases. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Delete some dead code from brw_eu_emit.c.Kenneth Graunke2012-10-092-120/+0
| | | | Presumably some of this was used by the old fragment shader backend.
* mesa: remove unused _mesa_cpal_compressed_format_type() functionBrian Paul2012-10-092-18/+0
| | | | Reviewed-by: Ian Romanick <[email protected]>
* teximage: Remove unnecessary compressed format checkDaniel Stone2012-10-091-4/+0
| | | | | | | | | Ever since df4a88ac, the check for compressed formats has been unnecessary. And ever since cb72ec5f, the build has been broken with FEATURE_ES. Remove it, as it does nothing. Signed-off-by: Daniel Stone <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* Revert "st/mesa: remove unused variables to fix compile warnings"Brian Paul2012-10-081-0/+2
| | | | | | | This reverts commit 810d2e167c5a507084d1865a260809b847ca3201. The pscreen variable is used in an assertion. Use "(void) pscreen;" to silence the warning.
* mesa: minor whitespace fixes in teximage.cBrian Paul2012-10-081-2/+2
|
* st/mesa: remove unused variables to fix compile warningsMarek Olšák2012-10-091-1/+0
|
* mesa: remove unused variables to fix compile warningsMarek Olšák2012-10-091-7/+0
|
* i965/fs: Improve performance of copy/constant propagation.Eric Anholt2012-10-082-18/+30
| | | | | | | | Use a simple chaining hash table for the ACP. This is not really very good, because we still do a full walk of the tree per destination write, but it still reduces fp-long-alu runtime from 5.3 to 3.9s. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Move constant propagation to the same codebase as copy prop.Eric Anholt2012-10-083-165/+124
| | | | | | | | | | This means that we don't get constant prop across into the first block after a BRW_OPCODE_IF or a BRW_OPCODE_DO, but we have hope for properly doing it across control flow at some point. More importantly, with the next commit it will help avoid O(n^2) with instruction count runtime for shaders that have many constant moves. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove the old ARB_fragment_program backend.Eric Anholt2012-10-089-4810/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Replace brw_wm_* with dumping code into the fs_visitor.Eric Anholt2012-10-0810-109/+860
| | | | | | | | | | | This makes a giant pile of code newly dead. It also fixes TXB on newer chipsets, which has been totally broken (I now have a piglit test for that). It passes the same set of Ian's ARB_fragment_program tests. It also improves high-settings ETQW performance by 3.2 +/- 1.9% (n=3), thanks to better optimization and having 8-wide along with 16-wide shaders. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=24355 Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Reduce maximum GL_ARB_fragment_program instruction count to 1024.Eric Anholt2012-10-081-4/+4
| | | | | | | | | I don't know of any programs that would need more than this. The larger programs I've seen have neared 100 instructions. This prevent excessive runtimes of automatic tests that attempt to test up to the exposed maximums (like fp-long-alu). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add a couple more algebraic cases that help some ARB_fp patterns.Eric Anholt2012-10-081-0/+23
| | | | | | | ARB_fp doesn't go through the GLSL optimizer, and these were things you see frequently thanks to conditionals being lowered to SLT/SGE and MUL. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Pull ir_binop_min/ir_binop_max handling to a separate function.Eric Anholt2012-10-082-31/+23
| | | | | | | | | | | | | This will be reused from the ARB_fp compiler. I touched up the pre-gen6 path to not overwrite dst in the first instruction, which prevents the need for aliasing checks (we'll need that in the ARB_fp compiler, but it actually hasn't been needed in this codebase since the revert of the nasty old MOV-avoidance code). I also made the conditional_mod between gen6 and pre-gen6 consistent, which shouldn't matter except for denorm/(+/-)0 comparisons where the choice between left and right hand side of the comparison changes. Reviewed-by: Kenneth Graunke <[email protected]>