summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st/nine: fix formatting in query9 (cosmetic)Axel Davy2014-11-261-3/+3
| | | | | | Cc: "10.4" <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix setting of the shift modifier in nine_shaderAxel Davy2014-11-261-2/+4
| | | | | | | | | | | | It is an sint_4, but it was stored in a uint_8... The code using it was acting as if it was signed. Problem found thanks to Coverity Cc: "10.4" <[email protected]> Tested-by: David Heidelberg <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: remove unused pipe_viewport_state::translate[3] and scale[3]David Heidelberg2014-11-261-2/+0
| | | | | | | | | | | | 2efabd9f5a711a7f6cd1846630244b7814bf25b3 removed them as unused. This caused random memory overwrites (reported by Coverity). Cc: "10.4" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Axel Davy <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* st/nine: fix wrong variable resetAxel Davy2014-11-261-1/+1
| | | | | | | | | Error detected by Coverity (COPY_PASTE_ERROR) Cc: "10.4" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Axel Davy <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* st/nine: return GetAvailableTextureMem in bytes as expected (v2)David Heidelberg2014-11-261-1/+5
| | | | | | | | | | | | | | | PIPE_CAP_VIDEO_MEMORY returns the amount of video memory in megabytes, so need to converted it to bytes. Fixed Warframe memory detection. v2: also prepare for cards with more than 4GB memory Cc: "10.4" <[email protected]> Tested-by: Yaroslav Andrusyak <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Axel Davy <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* st/nine: Add pool check to SetTexture (v2)Axel Davy2014-11-261-1/+9
| | | | | | | | | | | D3DPOOL_SCRATCH is disallowed according to spec. D3DPOOL_SYSTEMMEM should be allowed but we don't handle it right for now. v2: Fixes segfault in SetTexture when unsetting the texture Cc: "10.4" <[email protected]> Tested-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: propertly declare constants (v2)Axel Davy2014-11-261-5/+2
| | | | | | | | | | | | Fixes "Error : CONST[20]: Undeclared source register" when running dx9_alpha_blending_material. Also artifacts on ilo. v2: also remove unused MISC_CONST Cc: "10.4" <[email protected]> Tested-by: David Heidelberg <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: call DBG() at more external entry pointsStanislaw Halik2014-11-2617-0/+171
| | | | | | | | Cc: "10.4" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Stanislaw Halik <[email protected]>
* st/nine: rework the way D3DPOOL_SYSTEMMEM is handledAxel Davy2014-11-268-127/+51
| | | | | | | | | | | | | This patch moves the data field from Resource9 to Surface9 and cleans D3DPOOL_SYSTEMMEM handling in Texture9. This fixes HL2 lost coast. It also removes in Texture9 some code written to support importing and exporting non D3DPOOL_SYSTEMMEM shared buffers. This code hadn't the design required to support the feature and wasn't used. Cc: "10.4" <[email protected]> Tested-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Rework Basetexture9 and Resource9.Axel Davy2014-11-2610-33/+36
| | | | | | | | | Instead of having parts of the structures initialised by the parents, have them initialised by the children. Cc: "10.4" <[email protected]> Tested-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: clean device9ex.Axel Davy2014-11-264-15/+19
| | | | | | | | | Pass ex specific parameters as arguments to device9 ctor instead of passing them by filling the structure. Cc: "10.4" <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* nine: the .pc file should not follow mesa versionEmil Velikov2014-11-263-2/+4
| | | | | | | | | The version provided by it should be the same as the one provided/handled by the module. Add the missing tiny version. Cc: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: David Heidelberg <[email protected]>
* auxiliary/vl: rework the build of the VL codeEmil Velikov2014-11-2614-40/+55
| | | | | | | | | | | | | | | | | | | Rather than shoving all the VL code for non-VL targets, increasing their size, just split it out and use it when needed. This gives us the side effect of building vl_winsys_dri.c once, dropping a few automake warnings, and reducing the size of the dri modules as below text data bss dec hex filename 5850573 187549 1977928 8016050 7a50b2 before/nouveau_dri.so 5508486 187100 391240 6086826 5ce0aa after/nouveau_dri.so The above data is for a nouveau + swrast + kms_swrast 'megadriver'. v2: Do not include the vl sources in the auxiliary library. v3: Rebase. Add nine. Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* auxiliary/vl: split the vl sources list into VL_SOURCESEmil Velikov2014-11-264-2/+8
| | | | | | | | | | | With follow up commit we'll split vl static lib from the auxiliary one, and choose the appropriate vl (galliumvl or galliumvl_stub) for the respective targets to link against. v2: Rebase. Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* auxiliary/vl: add galliumvl_stub.laEmil Velikov2014-11-263-0/+155
| | | | | | | | | | | | | Will be used by the non-VL targets, to stub out the functions called by the drivers. The entry point to those are within the VL state-trackers, yet the compiler cannot determine that at link time. Thus we'll need to stub them out to prevent unresolved symbols in the dri, egl, gbm and pipe-loader targets. v2: Rebase. Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* automake: rework VL dependency trackingEmil Velikov2014-11-269-9/+31
| | | | | | | | | | | | | | | Set a single VL_{CFLAG,LIBS} for xcb and friends, and let each target check for it's relevant library alone. Required as with follow up commits we'll build aux/vl into a separate module, which needs VL_CFLAGS Cleanup add a couple of explicit LIBDRM_LIBS linking, as aux/vl itself requires libdrm, despite that LIBDRM_{RADEON,NOUVEAU...} may provide it as well. v2: Rebase. Make sure st/xvmc programs work. Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* configure: check the package version when auto-detecting the VL targetsEmil Velikov2014-11-261-5/+6
| | | | | | | | Or we might end up where automatically enable the build, only to error out a couple of lines after that. Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* mesa: Permanently enable features supported by target CPU at compile time.Siavash Eliasi2014-11-261-0/+26
| | | | | | | | | | | This will remove the need for unnecessary runtime checks for CPU features if already supported by target CPU, resulting in smaller and less branchy code. V2: - Removed the SSSE3 related part for the not yet merged patch. - Avoiding redefinition of macros. Tested-by: David Heidelberg <[email protected]>
* docs: add relnotes template for 10.5.0Emil Velikov2014-11-261-0/+61
| | | | Signed-off-by: Emil Velikov <[email protected]>
* util: update hash type commentsTimothy Arceri2014-11-261-5/+5
| | | | | Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vec4: Handle destination writemasks in VEC4_OPCODE_PACK_BYTES.Matt Turner2014-11-251-2/+13
| | | | | | | | | | | | | | Since pack_bytes expands to two mov(4) align1 instructions, we can't use swizzles directly. For an instruction like pack_bytes m4.y:UD, vgrf13.xyzw:UD we can write into the .y component by settings the offset based on the swizzle. Also while we're doing this, we can set the dependency control hints properly, so that a series of pack_bytes writing into separate components of a register can issue without blocking.
* i965/vec4: Optimize packSnorm4x8().Matt Turner2014-11-253-4/+29
| | | | | Reduces the number of instructions needed to implement packSnorm4x8() from 13 -> 7.
* i965/vec4: Optimize packUnorm4x8().Matt Turner2014-11-253-4/+27
| | | | | Reduces the number of instructions needed to implement packUnorm4x8() from 11 -> 6.
* i965/vec4: Add VEC4_OPCODE_PACK_4_BYTES.Matt Turner2014-11-254-0/+52
| | | | Will be used by emit_pack_{s,u}norm_4x8().
* i965/vec4: Optimize unpackSnorm4x8().Matt Turner2014-11-253-3/+33
| | | | | | | Reduces the number of instructions needed to implement unpackSnorm4x8() from 16 -> 6. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Optimize unpackUnorm4x8().Matt Turner2014-11-253-3/+31
| | | | | | | Reduces the number of instructions needed to implement unpackUnorm4x8() from 11 -> 4. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Add vector float immediate infrastructure.Matt Turner2014-11-253-0/+23
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add vector float immediate infrastructure.Matt Turner2014-11-253-0/+24
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Disassemble vector float immediates properly.Matt Turner2014-11-251-1/+5
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965: Add unit test for float <-> VF conversions.Matt Turner2014-11-252-0/+105
| | | | | Using Eric's original VF -> float conversion code to initialize the table.
* i965: Add functions to convert float <-> VF.Matt Turner2014-11-253-0/+80
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/Gen6-7: Do not replace texcoords with point coord if not drawing pointsChris Forbes2014-11-252-12/+49
| | | | | | | | | | | | | | | | | | | | | | Fixes broken rendering in Windows-based QtQuick2 apps run through Wine. This library sets all texture units' GL_COORD_REPLACE, leaves point sprite mode enabled, and then draws a triangle fan. Will need a slightly different fix for Gen4-5, but I don't have my old machines in a usable state currently. V2: - Simplify patch -- the real changes are no longer duplicated across the Gen6 and Gen7 atoms. - Also don't clobber attr overrides -- which matters on Haswell too, and fixes the other half of the problem - Fix newly-introduced warnings V3: - Use BRW_NEW_GEOMETRY_PROGRAM and brw->geometry_program rather than core flag and state; keep the state flags in order. Signed-off-by: Chris Forbes <[email protected]> Cc: "10.4" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84651 Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Make lower_constant_arrays_to_uniforms require dereferences.Kenneth Graunke2014-11-241-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ilia noticed that my lowering pass was converting the constant array used by textureGatherOffsets' offsets parameter to a uniform. This broke textureGather for Nouveau, and is generally a horrible plan, since it violates the GLSL constraint that offsets must be an immediate constant. When I wrote this pass, I neglected to consider whole array assignment. I figured opt_array_splitting would handle constant indexing, so this pass was really about fixing variable indexing. textureGatherOffsets is an example of whole array access that we really don't want to touch. Whole array copies don't appear to benefit from this either - they're most likely initializers for temporary arrays which are going to be mutated anyway. Since you're copying, you may as well copy from immediates, not uniforms. This patch makes the pass look for ir_dereference_arrays of ir_constants, rather than looking for any ir_constant directly. This way, it ignores whole array assignment. No shader-db changes or Piglit regressions on Haswell. Some Piglit tests generate different code (fixing textureGatherOffsets on Nouveau). Signed-off-by: Kenneth Graunke <[email protected]> Tested-by: Ilia Mirkin <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "10.4" <[email protected]>
* i965: Precompile ARB programs.Kenneth Graunke2014-11-241-2/+9
| | | | | | | | | | | | We already precompile GLSL programs; it seems logical to precompile ARB programs as well. We just never hooked it up. This also makes the programs compile even if no drawing occurs, which is useful for shader-db. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Make precompile functions accessible from C.Kenneth Graunke2014-11-245-10/+19
| | | | | | | | | | | | | Previously, the prototypes for brw_vs/gs/fs_precompile were scattered between brw_vs.h (C), brw_gs.h (C), and brw_fs.h (C++ only). Also, brw_fs_precompile had C++ linkage, while the others were C. This patch moves all the prototypes to a central location (brw_shader.h) and makes brw_fs_precompile have C linkage. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Pass gl_program pointers into precompile functions.Kenneth Graunke2014-11-247-29/+33
| | | | | | | | | | | | We'd like to do precompiling for ARB vertex and fragment programs, which only have gl_program structures - gl_shader_program is NULL. This patch makes the various precompile functions take a gl_program parameter directly, rather than accessing it via gl_shader_program. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Move brw->precompile checks out a level.Kenneth Graunke2014-11-241-4/+4
| | | | | | | | | brw_shader_precompile should just do a precompile; it makes more sense for the caller to decide whether we should do one. Simpler. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* llvmpipe: (trivial) remove redundant util_cpu_detect() call in lp_test_mainRoland Scheidegger2014-11-251-2/+0
| | | | Already called earlier.
* llvmpipe: fix lp_test_arit denorm handlingRoland Scheidegger2014-11-251-1/+37
| | | | | | | | | | | | | | | | | | llvmpipe disables denorms on purpose (on x86/sse only), because denorms are generally neither required nor desired for graphic apis (and in case of d3d10, they are forbidden). However, this caused some arithmetic tests using denorms to fail on some systems, because the reference did not generate the same results anymore. (It did not fail on all systems - behavior of these math functions is sort of undefined when called with non-standard floating point mode, hence the result differing depending on implementation and in particular the sse capabilities.) So, for the reference, simply flush all (input/output) denorms manually to zero in this case. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=67672. Reviewed-by: Jose Fonseca <[email protected]>
* nouveau: Fix build after STR/BRA opcode dropping.Eric Anholt2014-11-241-2/+0
| | | | | I missed these while git grepping for users of the dead opcodes. Sigh, macros.
* mesa: Drop unused NV_fragment_program opcodes.Eric Anholt2014-11-244-177/+0
| | | | | | | | | The extension itself was deleted 2 years ago. There are still some prog_instruction opcodes from NV_fp that exist because they're used by ir_to_mesa.cpp, though. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Ian Roamnick <[email protected]>
* mesa: Drop unused SFL/STR opcodes.Eric Anholt2014-11-243-16/+0
| | | | | | | | They're part of NV_vertex_program2, which I'm pretty sure we're never going to support. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Ian Roamnick <[email protected]>
* gallium: Drop the unused CND opcode.Eric Anholt2014-11-2411-82/+5
| | | | | | Nothing in the tree generates it. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop unused BRA opcode.Eric Anholt2014-11-2412-37/+5
| | | | | | Never generated, and implemented in only nvfx vertprog. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop the unused SFL/STR opcodes.Eric Anholt2014-11-2413-150/+10
| | | | | | Nothing generated them. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop the unused RFL opcode.Eric Anholt2014-11-2410-98/+5
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop unused X2D opcode.Eric Anholt2014-11-2410-77/+4
| | | | | | Nothing in the tree generates it. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop the unused ARA opcode.Eric Anholt2014-11-2410-28/+5
| | | | | | | | Nothing in the tree generated it. v2: Only drop ARA, not ARR as well. Reviewed-by: Jose Fonseca <[email protected]> (v2)
* gallium: Drop the unused RCC opcode.Eric Anholt2014-11-2411-47/+5
| | | | | | Nothing in the tree generated it. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop the NRM and NRM4 opcodes.Eric Anholt2014-11-2411-347/+10
| | | | | | | They weren't generated in tree, and as far as I know all hardware had to lower it to a DP, RSQ, MUL. Reviewed-by: Jose Fonseca <[email protected]>