summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965: Drop manual hiz resolves in span rendering.Eric Anholt2012-08-281-10/+0
| | | | | | | | swrast uses MapRenderbuffer, which leads to intel_miptree_map, which does the depth resolve. Reviewed-by: Chad Versace <[email protected]> Acked-by: Ian Romanick <[email protected]>
* radeon/llvm: Handle TGSI KIL opcode for SI.Michel Dänzer2012-08-283-0/+44
| | | | | | | Fixes piglit fp-kil and glBitmap() with radeonsi. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeon/llvm: Basic support for SI EXEC register.Michel Dänzer2012-08-283-2/+23
| | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: Don't write to the PA_SC_RASTER_CONFIG register.Michel Dänzer2012-08-281-1/+0
| | | | | | | It should be initialized by the kernel as necessary. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]>
* r600g: fix relative addressing on RS780 and RS880Marek Olšák2012-08-281-7/+6
| | | | | | They should be treated like RV670. Tested-by: Michel Dänzer <[email protected]>
* docs/helpwanted: add radeonsi todo listAndreas Boll2012-08-281-0/+2
| | | | Signed-off-by: Michel Dänzer <[email protected]>
* configure.ac: add radeonsi to --with-gallium-drivers help stringAndreas Boll2012-08-281-1/+1
| | | | | | the help string is used by ./configure --help Signed-off-by: Michel Dänzer <[email protected]>
* llvmpipe: Bump the maximum texture size (in pixels).José Fonseca2012-08-282-2/+9
| | | | | | | | | | But cap the size in bytes, to avoid depleting the whole system memory, with humongus textures. Tested with max-texture-size piglit test. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* u_vbuf: avoid unnecessary update of the vertex elementsVadim Girlin2012-08-281-1/+3
| | | | | Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: fix invalid flag detection for EGL_KHR_create_contextMatt Turner2012-08-271-1/+1
| | | | | | | | We want to check whether there are bits set outside of the valid flags. Fixes piglit test egl-create-context-invalid-flag-gl Reviewed-by: Ian Romanick <[email protected]>
* i965: Make VS programs obey the shader_precompile driconf option.Kenneth Graunke2012-08-271-1/+1
| | | | | | | | Now that it's on by default, we may as well make it obey the flag, for consistency's sake if nothing else. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Reenable the fragment shader precompile.Kenneth Graunke2012-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Precompiling the shader at link time often allows us to avoid compiling it at the first use. This moves the expensive compilation and optimization process to game or level load time, rather than at draw time, where we really can't avoid any cycles and don't want to risk stalling the GPU. The downside is that we have to guess the non-orthagonal state the program will have set when it draws with the shader. Previously, we guessed wrong for nearly every shader, so it wasn't useful. With the recent SamplerUnits rework and this series, we've either eliminated state or made smarter guesses, and usually get it right now. In the L4D2 time demo, I now have 39 fragment shader recompiles and no vertex shader recompiles. Before this series and the SamplerUnits rework, I had 206 fragment shader recompiles and 192 vertex shader recompiles. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Set swizzle fields in the VS precompile program key.Kenneth Graunke2012-08-271-0/+11
| | | | | | | | | | | | | | | | | This fixes a regression since 76d1301e8e8e50dc962601a9977bc52148798349: I began setting SWIZZLE_XYZW for unused sampler units in the actual program keys, since this matched the FS precompile behavior. However, the VS precompile was expecting zero, so that commit made essentially every vertex shader (even those not using texturing) mismatch and need to be recompiled. Setting them in the VS precompile key solves the issue. It also is an improvement over our old behavior: previously we guessed that vertex shaders didn't use any textures at all. Now we actually look to see if the VS had any sampler uniforms and guess based on that. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Add VS program key dumping to INTEL_DEBUG=perf.Kenneth Graunke2012-08-273-1/+76
| | | | | | | Eric added support for WM key debugging. This adds it for the VS. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Assume shadow sampler swizzling is <X, X, X, 1>.Kenneth Graunke2012-08-271-2/+8
| | | | | | | | | | | | | | | | Our previous assumption, SWIZZLE_XYZW, was completely bogus for depth textures. There are no Y, Z, or W components. DEPTH_TEXTURE_MODE has three options: - GL_LUMINANCE: <X, X, X, 1> - GL_INTENSITY: <X, X, X, X> - GL_ALPHA: <0, 0, 0, X> The default value is GL_LUMINANCE, and most applications don't seem to alter DEPTH_TEXTURE_MODE. Make that our precompile guess. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Index sampler program key data by linker-assigned index.Kenneth Graunke2012-08-276-30/+30
| | | | | | | | | Now that most things are based on the linker-assigned index, it makes sense to convert the arrays in the VS/WM program key as well. It seems silly to leave them indexed by texture unit. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Only set proj_attrib_mask for fixed function.Kenneth Graunke2012-08-272-2/+12
| | | | | | | | | | | | | | brw_wm_prog_key's proj_attrib_mask field is designed to enable an optimization for fixed-function programs, letting us avoid projecting attributes where the divisor is 1.0. However, for shaders, this is not useful, and is pretty much impossible to guess when building the FS precompile key. Turning it off for shaders should allow the precompile to work and not lose much. Signed-off-by: Kenneth Graunke <[email protected]> Suggested-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Don't set stats_wm in the WM program key on Gen6+.Kenneth Graunke2012-08-271-1/+3
| | | | | | | It's only needed for Gen4/5 IZ lookup workarounds. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Don't set vp_outputs_written in the WM program key on Gen6+.Kenneth Graunke2012-08-272-5/+10
| | | | | | | It's only used by on pre-Sandybridge hardware. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Double the size of the state cache.Kenneth Graunke2012-08-271-2/+2
| | | | | | | | We probably want to do something more sophisticated here, but this at least makes it through L4D2 without dumping the program cache. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glapi/glx: call __glEmptyImage if USE_XCB, not memcpy directlyJulien Cristau2012-08-271-10/+25
| | | | | | | | | | | We were stomping on the caller's buffer by ignoring their alignment requests and other pixel store modes. This patch makes the USE_XCB path match the older one more closely. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52059 Signed-off-by: Julien Cristau <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* gallium/util: implement tile code for PIPE_FORMAT_Z32_FLOATBrian Paul2012-08-271-0/+36
| | | | Reviewed-by: José Fonseca <[email protected]>
* st/mesa: use fallback path for glCopyTexSubImage(GL_TEXTURE_1D_ARRAY)Brian Paul2012-08-271-0/+10
| | | | | | Fixes many failing cases in piglit copyteximage test. Reviewed-by: José Fonseca <[email protected]>
* i965: Move hiz resolve to after renderbuffer resizing (v2)Chad Versace2012-08-271-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Do all pre-draw hiz resolves *after* the renderbuffers are resized by intel_prepare_render. Otherwise, we may resolve buffers that are immediately discarded afterwards. Fixes the assertion failure below when resizing windows in KDE and under some unknown circumstance in Chrome OS: intel_resolve_map.c:46: intel_resolve_map_set: Assertion `(*tail)->need == need' failed. Also, remove the comment that "resolves must occur [...] before setting up any hardware state". That was true when resolves were implemented with meta-ops, but no longer with blorp. v2: - Keep brw_predraw_resolve_buffers in its current position, which is before any brw_context bits are modified. Instead, move the call to intel_prepare_render. Note: This is a candiate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52252 Reported-by: Lu Hua <[email protected]> Reviewed-by: Paul Berry <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Remove redundant null checkChad Versace2012-08-271-2/+1
| | | | | | | | intel_renderbuffer_resolve_hiz checks if rb->mt is null, so there is no need for the caller to do so. Reviewed-by: Paul Berry <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* r300g: implement TRUNC correctlyMarek Olšák2012-08-274-1/+42
| | | | This fixes some integer division tests.
* radeonsi: Use FP16 shader export format when necessary / possible.Michel Dänzer2012-08-276-18/+114
| | | | | | | | | Fixes piglit fbo-blending-formats. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: Refactor initialization of shader export intrinsic arguments.Michel Dänzer2012-08-271-36/+48
| | | | | | | | | In preparation for extending this code, which would make it rather unwieldy in its current place. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: Maintain cache of pixel shader variants according to contxt state.Michel Dänzer2012-08-276-59/+210
| | | | | | | | | Mostly inspired by r600g commit 4acf71f01ea1edb253cd38cc059d4af1a2a40bf4 ('r600g: cache shader variants instead of rebuilding v3'). Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: Drop extraneous semicolons from pm4 state macro definitions.Michel Dänzer2012-08-271-3/+3
| | | | | | | | Could cause build failures if trying to use the macros in certain constructs. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: implement compression for MSAA colorbuffers for evergreenMarek Olšák2012-08-2712-19/+529
| | | | | | | | | | | | | | | | This adds the FMASK and CMASK buffers. They share the same resource with color data. COMPRESSION and FAST_CLEAR are always enabled if both FMASK and CMASK are allocated. We initialize the CMASK to a "compressed" state (not "fast cleared"), so that we can keep FAST_CLEAR enabled all the time. Both FMASK and CMASK must be present at the moment. If either one is missing, the other one is not used. v2: add cayman regs in the list Reviewed-by: Jerome Glisse <[email protected]>
* r600g: cleanup names around depth decompressionMarek Olšák2012-08-275-24/+24
| | | | | | for consistency with the upcoming color decompression naming Reviewed-by: Jerome Glisse <[email protected]>
* r600g: fix evergreen 8x MSAA sample positionsMarek Olšák2012-08-271-16/+16
| | | | | | | The original samples positions took samples outside of the pixel boundary, leading to dark pixels on the edge of the colorbuffer, among other things. Reviewed-by: Jerome Glisse <[email protected]>
* r600g: set CB_TARGET_MASK to 0xf and not 0xff for resolve on evergreenMarek Olšák2012-08-271-0/+1
| | | | | | | independent_blend_enable must be true, so that the colormask isn't replicated in all colorbuffers. Reviewed-by: Jerome Glisse <[email protected]>
* gallium/u_blitter: initialize sample mask in resolveMarek Olšák2012-08-271-0/+1
| | | | Reviewed-by: Jerome Glisse <[email protected]>
* r300/compiler: Use variable lists in the rename_regs passTom Stellard2012-08-261-17/+14
|
* i965: Rewrite the comment describing the query object support.Eric Anholt2012-08-261-10/+12
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen6+: Add support for GL_ARB_timer_query.Eric Anholt2012-08-266-2/+64
| | | | | | Needs updated libdrm. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add support for GL_ARB_occlusion_query2.Eric Anholt2012-08-262-1/+2
| | | | | | | This extension is just a bit of core code on top of the GL_ARB_occlusion_query support. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add constants for the GL_QUERY_COUNTER_BITS per target.Eric Anholt2012-08-262-1/+44
| | | | | | | | | | | | Drivers need to be able to communicate their actual number of bits populated in the field in order for applications to be able to properly handle rollover. There's a small behavior change here: Instead of reporting the GL_SAMPLES_PASSED bits for GL_ANY_SAMPLES_PASSED (which would also be valid), just return 1, because more bits don't make any sense. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: Fix accumulator_contains() test to also reject swizzles of the dst.Eric Anholt2012-08-261-1/+1
| | | | | | | | | | | | | | When faced with this sequence: MOV R1, c[1]; MAD R0, R2, R1.x, R1.y; we were concluding that the MOV of R1 set up our accumulator and so we could just use the previous result. Only, it's got R1.xyzw in it instead of the r1.y we're looking for. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46784 NOTE: This is a candidate for the 8.0 branch.
* st/dri: Support width and height gettersJakob Bornecrantz2012-08-261-1/+7
| | | | | Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* st/dri: Claim to support validate_usageJakob Bornecrantz2012-08-261-1/+16
| | | | | | | | Support version 3 as well as 2, since that is only the new format query, which Jesse added support for to st/dri when he added it to dri_inteface.h. Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* dri: Make query image WIDTH and HEIGHT be version 4Jakob Bornecrantz2012-08-262-1/+5
| | | | | Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* dri: Remove image write functionJakob Bornecrantz2012-08-264-40/+1
| | | | | | | | Since its not used by anything anymore and no release has gone out where it was being used. Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* gbm: Use libkms to replace DRI cursor imagesJakob Bornecrantz2012-08-265-12/+67
| | | | | | | | | | | | | | Uses libkms instead of dri image cursor. Since this is the only user of the DRI cursor and write interface we can remove cursor surfaces entirely from the DRI interface and as a consequence also from the Gallium interface as well. Tho to make everybody happy with this it would probably should add a kms_bo_write function, but that is probably wise in anyways. The only downside is that it adds a dependancy on libkms, this could how ever be replaced with the dumb_bo drm ioctl interface. Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* i965: Don't set iz_lookup the FS precompile's program key on Gen6+.Kenneth Graunke2012-08-251-7/+10
| | | | | | | | | We already changed the actual program key builder to only set these bits on gen < 6; this patch just brings the precompile state back in line so it doesn't mismatch every time. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Fix INTEL_DEBUG=perf program key printing.Kenneth Graunke2012-08-251-18/+18
| | | | | | | | | | | | | | | | | | | | When dumping differences in program keys, it printed messages of the format: [Name of thing that changed] [new]->[old] This was terribly confusing: the right arrow implies "the value changed from this to that", when in fact the message conveyed the opposite. Except that some of the time, it didn't, since we accidentally swapped the arguments to brw_debug_recompile_sampler_key. With two swaps, it would often come out in the expected format. This patch fixes it to properly print: [Name of thing that changed] [old]->[new] Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Use a new, more specific hook for shader uniform changes.Kenneth Graunke2012-08-254-2/+19
| | | | | | | | | | | | | | | Gallium drivers and i965 don't require special notification when sampler uniforms change. They simply see the _NEW_TEXTURE and adjust their indirection tables. These drivers don't want ProgramStringNotify: it simply causes pointless recompiles. Unfortunately, i915 still requires shader recompiles and needs ProgramStringNotify. Rather than trying to fix that, simply change the hook to a new, more specific one: ShaderUniformChange. On i915, this translates to ProgramStringNotify; others simply ignore it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Use linker-assigned sampler IDs in instruction encoding.Kenneth Graunke2012-08-255-35/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assigning uniform locations, the linker assigns each sampler uniform a sequential numerical ID. gl_shader_program::SamplerUnits maps these sampler variable IDs to the actual texture units they reference (specified via glUniform1i). Previously, we encoded this mapping in the SEND instruction encoding: the "sampler" was the texture unit number, and the binding table index was SURF_INDEX_TEXTURE(the texture unit number). This unfortunately meant that whenever the application changed the value of a sampler uniform, we had to recompile the shader to change the SEND instructions. This was horrible for the game Cogs, which repeatedly switches between using texture unit 0 and 1. It also made fragment shader precompiles useless: we'd do the precompile at glLinkShader() time, before the application called glUniform1i to set the sampler values. As soon as it did that, we'd have to recompile, wasting time and space in the program cache. This patch encodes the SamplerUnits indirection in the binding table, sampler state, and sampler default color tables. Instead of baking the texture unit number into the shader, we bake in the sampler variable ID assigned by the linker. Since those never change, we don't need to recompile programs on uniform changes. This does mean that the tables now depend on the linked shader program being used for rendering, rather than simply representing all available texture units. This could cause an increase in state emission. Another plus is that the sampler state and sampler default color tables are now compact: we only emit as many entries as there are sampler uniforms, with no holes in the table since the new sampler IDs are sequential. Previously we had to emit a full 16 entries every time, since the tables tracked the state of all active texture units. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>