summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965: Remove "There are probably better ways" comment.Kenneth Graunke2013-07-031-5/+0
| | | | | | | There are always better ways to do things. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Delete brw_print_reg() function.Kenneth Graunke2013-07-033-99/+0
| | | | | | | | | | This wasn't called from anywhere; presumably it was used to examine brw_regs when debugging shader assembly. However, it prints registers in a different notation than brw_disasm.c which everyone is used to...which means I doubt anyone will want to use it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Move contents of intel_clear.h to intel_context.h.Kenneth Graunke2013-07-034-40/+2
| | | | | | | | | Having a header file for a single prototype seems rather excessive. Plus, the actual function is in brw_clear.c, not intel_clear.c, so there isn't even the .c/.h filename symmetry one might expect. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Move contents of intel_extensions.h to intel_context.h.Kenneth Graunke2013-07-034-37/+3
| | | | | | | | Having an entire header file for a single prototype seems a bit excessive. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Remove some dead code.Kenneth Graunke2013-07-0317-228/+0
| | | | | | | A random smattering of things that just aren't used anymore. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Delete dead intel_buffer_object::range_map_size field.Kenneth Graunke2013-07-031-1/+0
| | | | | | | Nothing uses this, apparently. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Remove intel_buffer_object::source.Kenneth Graunke2013-07-032-6/+0
| | | | | | | | | This was only used for BOs backed by system memory on i915. With that gone, there's nothing that even sets source to non-zero, so this is purely dead code. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Fix buffer object segfault since removal of system memory BOs.Kenneth Graunke2013-07-031-0/+3
| | | | | | | | | | | | | | | | | Commit cf31a19300cbcecddb6bd0f878abb9316ebad2a1 removed support for BOs backed by system memory, as it was only useful for i915. However, it removed a little too much code: intel_bufferobj_buffer() used to call intel_bufferobj_alloc_buffer(), and after that commit, it didn't. This led to NULL pointer dereferences in several test cases, such as es3conform's transform_feedback_state_variables test. This commit restores the allocation, preserving the original behavior. It may not be the cleanest approach, but tidying should come later. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66432 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* postprocess: move second temporary assertion into isolated configurationMatthew McClure2013-07-031-2/+2
| | | | | | | | | With this patch we will only assert that the second temporary is allocated, when there are more than two active filters. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66423 Signed-off-by: Brian Paul <[email protected]>
* glsl: Ensure snprintf is defined on MSVC builds.José Fonseca2013-07-031-0/+1
| | | | | | | Should fix: src\glsl\opt_dead_builtin_varyings.cpp(244) : error C3861: 'snprintf': identifier not found ...
* targets/xvmc-nouveau: add in missing nv30 libIlia Mirkin2013-07-031-0/+1
| | | | | | | Currently libXvMCnouveau.so is missing nv30_screen_create. Add it in so that it may be dlopen'd. Signed-off-by: Ilia Mirkin <[email protected]>
* mesa,glsl,gallium: remove GLSLSkipStrictMaxVaryingLimitCheck and dependenciesMarek Olšák2013-07-0216-43/+10
| | | | | | Not needed with do_dead_builtin_varyings. Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: disable EXT_separate_shader_objectsMarek Olšák2013-07-021-1/+8
| | | | | | The extension disallows elimination of set-but-unused varyings. Reviewed-by: Ian Romanick <[email protected]>
* glsl/linker: eliminate unused and set-but-unused built-in varyingsMarek Olšák2013-07-025-2/+496
| | | | | | | | | | | | | This eliminates built-in varyings such as gl_Color, gl_SecondaryColor, gl_TexCoord, and gl_FogFragCoord if they are unused by the next stage or not written at all (e.g. gl_TexCoord elements). The gl_TexCoord array is broken down into separate vec4s if needed. v2: - use a switch statement in varying_info_visitor::visit(ir_variable*) - use snprintf - disable the optimization for GLES2 Reviewed-by: Ian Romanick <[email protected]>
* glsl/linker: check against varying limit after unused varyings are eliminatedMarek Olšák2013-07-023-11/+33
| | | | | | | We counted even the varyings which were later eliminated, which was suboptimal. Reviewed-by: Ian Romanick <[email protected]>
* glsl/linker: link shaders in the opposite order (from fragment to vertex)Marek Olšák2013-07-021-50/+58
| | | | | | | | | | | | | | This ensures that inter-shader outputs and inputs are properly eliminated across 3 or more shader stages. The behavior is unchanged with 2 or less shader stages. For example, elimination of unused FS inputs causes elimination of matching GS outputs, which causes elimination of the GS inputs that were needed for evaluation of the eliminated GS outputs, which causes elimination of matching VS outputs. An unused FS input is all that's needed to trigger this chain reaction. Reviewed-by: Ian Romanick <[email protected]>
* mesa: renumber shader indices according to their placement in pipelineMarek Olšák2013-07-029-44/+32
| | | | | | | | | See my explanation in mtypes.h. v2: don't do this in gallium v3: also updated the comment at the gl_shader_type definition Reviewed-by: Ian Romanick <[email protected]>
* gallivm: Simplify intrinsic name construction.José Fonseca2013-07-021-23/+10
| | | | | | Just noticed this could be slightly shortened when fixing MSVC build. Trivial.
* glsl/builtins: Fix ARB_texture_cube_map_array built-in availability.Kenneth Graunke2013-07-022-1/+8
| | | | | | | | | | | | | | | | | | | | | This patch adds texture() for isamplerCubeArray and usamplerCubeArray, which were entirely missing. It also makes texture() with a LOD bias fragment shader specific. The main GLSL specification explicitly says that texturing with LOD bias should not be allowed for vertex shaders. Affects Piglit's ARB_texture_cube_map_array/compiler/tex_bias-01.vert. which tries to use bias in a vertex shader. Currently, it expects this to pass (so this patch regresses the test), but I've sent a patch to reverse the expected behavior (so this patch would fix the updated test): http://lists.freedesktop.org/archives/piglit/2013-June/006123.html NOTE: This is a candidate for stable branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* gallivm: Fix MSVC build.José Fonseca2013-07-021-8/+7
|
* gallivm: Fix indirect immediate registers.José Fonseca2013-07-021-2/+2
| | | | | | | | | | | If reg->Register.Indirect is true then the immediate is not truly a constant LLVM expression. There is no performance regression in using LLVMBuildBitCast, as it will fallback to LLVMConstBitCast internally when the argument is a constant. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
* gallium/tests: fix the translate testZack Rusin2013-06-281-4/+4
|
* i965: Enable ext_framebuffer_multisample_blit_scaled on intel h/wAnuj Phogat2013-07-011-0/+1
| | | | | | | | | This patch enables ext_framebuffer_multisample_blit_scaled extension on intel h/w >= gen6. Signed-off-by: Anuj Phogat <[email protected]> Acked-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965/blorp: Add bilinear filtering of samples for multisample scaled blitsAnuj Phogat2013-07-012-11/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation of ext_framebuffer_multisample_blit_scaled in i965/blorp uses nearest filtering for multisample scaled blits. Using nearest filtering produces blocky artifacts and negates the benefits of MSAA. That is the reason why extension was not enabled on i965. This patch implements the bilinear filtering of samples in blorp engine. Images generated with this patch are free from blocky artifacts and show big improvement in visual quality. Observed no piglit and gles3 regressions. V3: - Algorithm used for filtering assumes a rectangular grid of samples roughly corresponding to sample locations. - Test the boundary conditions on the edges of texture. V4: - Clip texcoords and use conditional MOVs. - Send texture dimensions as push constants. - Remove the optimization in case of scaled multisample blits. V5: - Move mcs_fetch() inside the 'for' loop after computing pixel coordinates. Signed-off-by: Anuj Phogat <[email protected]> Acked-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* draw/translate: fix instancingZack Rusin2013-06-2817-40/+109
| | | | | | | | | | | | | | | | | | We were incorrectly computing the buffer offset when using the instances. The buffer offset is always equal to: start_instance * stride + (instance_num / instance_divisor) * stride We were completely ignoring the start instance quite often producing instances that completely wrong, e.g. if start instance = 5, instance divisor = 2, then on the first iteration it should be: 5 * stride, not (5/2) * stride as we'd have currently, and if start instance = 1, instance divisor = 3, then on the first iteration it should be: 1 * stride, not 0 as we'd have. This fixes it and adjusts all the code to the changes. Signed-off-by: Zack Rusin <[email protected]>
* draw: fix incorrect clipper invocation statisticsZack Rusin2013-06-281-6/+0
| | | | | | | | clipper invocations are computed earlier (of course before the emittion) so this code was adding bogus numbers to already computed clipper invocations. Signed-off-by: Zack Rusin <[email protected]>
* draw/gallivm: export overflow arithmetic to its own fileZack Rusin2013-06-284-44/+234
| | | | | | | We'll be reusing this code so lets put it in a common file and use it in the draw module. Signed-off-by: Zack Rusin <[email protected]>
* draw: check for integer overflows in instance computationZack Rusin2013-06-282-0/+7
| | | | | | | | | Integers could easily overflow is the starting instance was large enough. Instead of letting bogus counts through set the instance to max if it overflown and let our regular buffer overflow computation handle it. Signed-off-by: Zack Rusin <[email protected]>
* draw: check for an integer overflow when computing strideZack Rusin2013-06-281-10/+43
| | | | | | | | | Our buffer overflow arithmetic was susceptible to integer overflows which was the buffer overflow logic to break. Lets use the llvm overflow intrinsics to check for integer overflows while computing the stride/needed buffer size. Signed-off-by: Zack Rusin <[email protected]>
* draw: account for elem size when computing overflowZack Rusin2013-06-281-7/+23
| | | | | | | | | | | We weren't taking into account the size of element that is to be fetched, which meant that it was possible to overflow the buffer reads if the stride was very close to the end of the buffer, e.g. stride = 3, buffer size = 4, and the element to be read = 4. This should be properly detected as an overflow. Signed-off-by: Zack Rusin <[email protected]>
* i965: Initialize brw_blorp_const_color_program member variables.Vinson Lee2013-07-011-1/+5
| | | | | | | Fixes "Uninitialized scalar field" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* tools/trace: Return dummy fence object to silence warnings.José Fonseca2013-07-011-1/+2
|
* tools/trace: Don't crash if a trace has no timing information.José Fonseca2013-07-012-3/+4
|
* scons: Fix dependencies of enums.c and api_exec.c.José Fonseca2013-07-012-18/+15
|
* nvc0: allow frame dropping in h264Maarten Lankhorst2013-07-011-3/+0
| | | | | | | | The only reason the checks existed were paranoia, when I first wrote the code I wasn't sure it was correct. Now that I am, the asserts triggered when XBMC was dropping frames, so remove it. NOTE: This is a candidate for the 9.1 branch.
* r300g/compiler: Prevent regalloc from swizzling texture operands v2Tom Stellard2013-06-305-0/+124
| | | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=63520 NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r300g/compiler/tests: Add an assembly parserTom Stellard2013-06-305-16/+200
| | | | | | | The assembly parser can be used to load r300 assembly dumps and run them through any of the r300 compiler passes. Reviewed-by: Alex Deucher <[email protected]>
* r300g: Fix make checkTom Stellard2013-06-301-1/+2
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: implement fast color clears for MSAA on evergreen+Grigori Goronzy2013-07-013-2/+79
| | | | | | | | | | | | | | | | | | | | | | Allows MSAA colorbuffers, which have a CMASK automatically and don't need any further special handling, to be fast cleared. Instead of clearing the buffer, set the clear color and the CMASK to the cleared state. Fast clear is used only when all bound colorbuffers fulfill certain conditions: a CMASK is required, we have to be able to create a clear color value for the format and the texture mustn't contain multiple images. Technically, it should be possible to support array textures and cubemaps if all images are attached to the framebuffer, but this does not appear to be common. v2: fix fast clear check v3: Marek: - disable fast clear with 128-bit formats, which are unsupported - set tex->dirty_level_mask in r600_clear, so that the driver knows the resource must be decompressed/expanded - return early from r600_clear if there's nothing else to do Signed-off-by: Marek Olšák <[email protected]>
* r600g/compute: disable unused colorbuffer slotsMarek Olšák2013-07-011-1/+12
| | | | | Reviewed-by: Alex Deucher <[email protected]> Tested-by: Tom Stellard <[email protected]>
* st/mesa: handle SNORM formats in generic CopyPixels pathMarek Olšák2013-06-303-0/+29
| | | | v2: check desc->is_mixed in util_format_is_snorm
* i965: NULL check depth_mt to quiet static analysis.Matt Turner2013-06-291-1/+1
| | | | Reviewed-by: Chad Versace <[email protected]>
* llvmpipe: fix timer query if there's no binsRoland Scheidegger2013-06-291-0/+10
| | | | | | | | | | | | | b04a295a4a0cd2defe352b3193b5fa79ca8fc9fc removed seemingly unnecessary code in get_query. Turns out this code could in fact be reached - while timestamps are always binned, if there are no bins (which happens if fb size is 0) then the rasterization query code filling this in is still never executed. So fix this up by filling in some timestamp, but do it at EndQuery time not GetQuery time which should be more appropriate. Makes piglit arb_timer_query-timestamp-get happy again. Reviewed-by: Jose Fonseca <[email protected]>
* clover: Don't segfault when compiling a program with no kernelTom Stellard2013-06-281-0/+7
|
* mesa: Remove unused allow_large_textures driconf from classic drivers.Eric Anholt2013-06-285-23/+4
| | | | | | This option hasn't been used since the introduction of DRI2. Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Remove GLES 3.0 sRGB workaround.Kenneth Graunke2013-06-281-52/+0
| | | | | | Gen3 doesn't support GLES 3.0, so there's no need for it. Acked-by: Eric Anholt <[email protected]>
* i965: Remove is_945.Kenneth Graunke2013-06-282-3/+0
| | | | | | Only relevant on Gen3. Acked-by: Eric Anholt <[email protected]>
* i965: Delete hw_stencil flag.Kenneth Graunke2013-06-282-3/+0
| | | | | | This was only used by i915. Acked-by: Eric Anholt <[email protected]>
* i965: Remove hw_stipple flag.Kenneth Graunke2013-06-282-2/+0
| | | | | | This was only used by i915. Acked-by: Eric Anholt <[email protected]>
* i965: Remove use_early_z option.Kenneth Graunke2013-06-283-9/+1
| | | | | | | | This was only used by i965+. v2: Also remove the option from the driconf list. (change by anholt) Reviewed-by: Eric Anholt <[email protected]>