summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove M_PI, M_E, M_LOG2E macro definitionsBrian Paul2015-02-261-13/+0
| | | | | | | Should be defined in math.h. If not, we can add them to c99_math.h Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* meta: In pbo_{Get,}TexSubImage don't repeatedly rebind the source texNeil Roberts2015-02-261-4/+0
| | | | | | | | A layered PBO image is now interpreted as a single tall 2D image so the z argument in _mesa_meta_bind_fbo_image is ignored. Therefore this was just redundantly rebinding the same image repeatedly. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: use fi_type in vertex attribute codeMarius Predut2015-02-2511-97/+117
| | | | | | | | | | | | | | | | | | | | | | | For 32-bit builds, floating point operations use x86 FPU registers, not SSE registers. If we're actually storing an integer in a float variable, the value might get modified when written to memory. This patch changes the VBO code to use the fi_type (float/int union) to store/copy vertex attributes. Also, this can improve performance on x86 because moving floats with integer registers instead of FP registers is faster. Neil Roberts review: - include changes on all places that are storing attribute values. - check with and without -O3 compiler flag. Brian Paul review: - use fi_type type instead gl_constant_value type - fix a bunch of nit-picks. - fix compiler warnings Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82668 Signed-off-by: Marius Predut <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965/gen8: Use HALIGN_16 if MCS is enabled for non-MSRTAnuj Phogat2015-02-251-0/+3
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* i965: Pass pointer to miptree as function parameter in ↵Anuj Phogat2015-02-251-6/+6
| | | | | | | | | intel_horizontal_texture_alignment_unit This will be used by next patch in the series. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* i965: Allocate texture buffer in intelTexImageAnuj Phogat2015-02-251-2/+11
| | | | | | | | | before calling _mesa_meta_pbo_TexSubImage(). This will be used in later patches and will be required in Skylake to get the tile resource mode of miptree before calling _mesa_meta_pbo_TexSubImage(). Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* i965: Make a function to check the conditions to use the blitterAnuj Phogat2015-02-251-11/+29
| | | | | | | No functional changes in the patch. Just makes the code look cleaner. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* i965: Move the comment to the right placeAnuj Phogat2015-02-251-1/+1
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* i965: Fix condition to use Y tiling in blitter in intel_miptree_create()Anuj Phogat2015-02-251-3/+3
| | | | | | | Y tiling is supported in blitter on SNB+. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* meta: Pass null pointer for the pixel data to avoid unnecessary data uploadAnuj Phogat2015-02-251-1/+4
| | | | | | | to a temporary pbo created in _mesa_meta_pbo_GetTexSubImage(). Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* meta: Fix buffer object assignment to account for both pack and unpack bo'sAnuj Phogat2015-02-251-1/+1
| | | | | | | | | create_texture_for_pbo() is shared by _mesa_meta_pbo_GetTexSubImage() and _mesa_meta_pbo_TexSubImage() functions. So, we need to account for both pack and unpack buffer objects. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* meta: Use GL_STREAM_READ for pbo created with GL_PIXEL_PACK_BUFFERAnuj Phogat2015-02-251-1/+7
| | | | | | | | | | create_texture_for_pbo() is used by both _mesa_meta_pbo_GetTexSubImage() and _mesa_meta_pbo_TexSubImage() functions with different PBO targets. Use GL_STREAM_READ with GL_PIXEL_PACK_BUFFER and GL_STREAM_DRAW with GL_PIXEL_UNPACK_BUFFER. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* meta: Add assertion check for ctx->Meta->SaveStackDepthAnuj Phogat2015-02-251-0/+2
| | | | | | | before using it for derefrencing. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* meta: Do power of two samples check only for samples > 0Anuj Phogat2015-02-251-2/+2
| | | | | | | otherwise samples=0 passes the check, which is invalid. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Neil Roberts <[email protected]>
* i965: Don't force x-tiling for 16-bpp formats on Gen>7Neil Roberts2015-02-251-3/+3
| | | | | | | | | | | | Sandybridge doesn't support y-tiling for surface formats with 16 or more bpp. There was previously an override to explicitly allow this for Gen7. However, this restriction is also removed in Gen8+ so we should use y-tiling there too. This is important to do for Skylake which doesn't support x-tiling for 3D surfaces. Reviewed-by: Ben Widawsky <[email protected]>
* dri/common: Update comment about driQueryRendererIntegerCommonAndreas Boll2015-02-251-0/+1
| | | | | | | | | Since 87d3ae0b45b6b6bb50b583dafa55eb109449a005 driQueryRendererIntegerCommon handles __DRI2_RENDERER_PREFFERED_PROFILE too. Signed-off-by: Andreas Boll <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* common: Fix PBOs for 1D_ARRAY.Laura Ekstrand2015-02-241-26/+36
| | | | | | | | | | | Corrects the way that _mesa_meta_pbo_TexSubImage and _mesa_meta_pbo_GetTexSubImage handle 1D_ARRAY textures. Fixes a failure in the Piglit arb_direct_state_access/gettextureimage-targets test. Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Laura Ekstrand <[email protected]> Cc: "10.4, 10.5" <[email protected]>
* common: Correct PBO 2D_ARRAY handling.Laura Ekstrand2015-02-241-9/+17
| | | | | | | | | | | | | | | | | | | Changes PBO uploads and downloads to use a tall (height * depth) 2D texture for blitting. This fixes the bug where 2D_ARRAY, 3D, and CUBE_MAP_ARRAY textures are not properly uploaded and downloaded. Removes the option to use a 2D ARRAY texture for the PBO during upload and download. This option didn't work because the miptree couldn't be set up reliably. v2: Review from Jason Ekstrand and Neil Roberts: -Delete the depth parameter from create_texture_for_pbo -Abandon the option to create a 2D ARRAY texture in create_texture_for_pbo Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "10.4, 10.5" <[email protected]>
* common: Correct texture init for meta pbo uploads and downloads.Laura Ekstrand2015-02-241-1/+4
| | | | | | | | | | | | | | | | | This moves the line setting immutability for the texture to after _mesa_initialize_texture_object so that the initializer function will not cancel it out. Moreover, because of the ARB_texture_view extension, immutable textures must have NumLayers > 0, or depth will equal (0-1)=0xFFFFFFFF during SURFACE_STATE setup, which triggers assertions. v2: Review from Kenneth Graunke: - Include more explanation in the commit message. - Make texture setup bug fixes into a separate patch. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "10.4, 10.5" <[email protected]>
* mesa: remove DEG2RAD macroBrian Paul2015-02-243-11/+3
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove MAX_GLUSHORT, move MAX_GLUINTBrian Paul2015-02-242-3/+5
| | | | | | The later is only used in one place in swrast. Reviewed-by: Matt Turner <[email protected]>
* mesa: move signbit() macro to c99_math.hBrian Paul2015-02-241-8/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused isblank() functionBrian Paul2015-02-241-1/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove sqrtf macroBrian Paul2015-02-241-11/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* i965: Remove redundant discard jumps.Kenneth Graunke2015-02-242-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | With the previous optimization in place, some shaders wind up with multiple discard jumps in a row, or jumps directly to the next instruction. We can remove those. Without NIR on Haswell: total instructions in shared programs: 5777258 -> 5775872 (-0.02%) instructions in affected programs: 20312 -> 18926 (-6.82%) helped: 716 With NIR on Haswell: total instructions in shared programs: 5773163 -> 5771785 (-0.02%) instructions in affected programs: 21040 -> 19662 (-6.55%) helped: 717 v2: Use the CFG rather than the old instructions list. Presumably the placeholder halt will be in the last basic block. v3: Make sure placeholder_halt->prev isn't the head sentinel (caught twice by Eric Anholt). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Handle conditional discards.Kenneth Graunke2015-02-242-17/+26
| | | | | | | | | | | | | The discard condition tells us which channels we want killed. We want to invert that condition to get the channels that should survive (remain live) in f0.1. Emit a CMP to negate it. Nothing generates these today, but that will change shortly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Revert "i965/fs: Remove force_writemask_all assertion for execsize < 8."Matt Turner2015-02-241-0/+1
| | | | | | | | | This reverts commit 0d8f27eab7b7e8b7a16e76aabd3f6a0ab4880497. "This doesn't seem to be necessary." <- I was wrong! Tested-by: Markus Wick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/fs: Emit MOV(1) instructions with force_writemask_all.Matt Turner2015-02-241-0/+1
| | | | | | | Fixes rendering with Dolphin. Tested-by: Markus Wick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.Matt Turner2015-02-242-0/+95
| | | | | | | total instructions in shared programs: 5695356 -> 5689775 (-0.10%) instructions in affected programs: 486231 -> 480650 (-1.15%) helped: 2604 LOST: 1
* i965/fs/nir: Optimize integer multiply by a 16-bit constant.Matt Turner2015-02-241-1/+23
| | | | | | | | | | | | Gen8+ support was just broken, since MUL now consumes 32-bits from both sources. Fixes 986 piglit tests on my BDW. total instructions in shared programs: 7753873 -> 7753522 (-0.00%) instructions in affected programs: 28164 -> 27813 (-1.25%) helped: 77 GAINED: 47 Reviewed-by: Ian Romanick <[email protected]>
* i965/fs/nir: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.Matt Turner2015-02-242-0/+90
| | | | | | | | total instructions in shared programs: 7756214 -> 7753873 (-0.03%) instructions in affected programs: 455452 -> 453111 (-0.51%) helped: 2333 Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: remove unused/broken function st_print_shadersMarek Olšák2015-02-242-49/+0
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: remove struct qualifier from st_src_reg parameterBrian Paul2015-02-241-1/+1
| | | | It's a class. Silences MSVC warning.
* mesa: remove INV_SQRTF() macroBrian Paul2015-02-2410-22/+15
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove ceilf, floorf macrosBrian Paul2015-02-241-2/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove expf macroBrian Paul2015-02-241-1/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove logf macroBrian Paul2015-02-242-1/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove powf macroBrian Paul2015-02-244-2/+3
| | | | | | Use the wrapper in c99_math.h if needed. Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused exp2f, log2f, truncf wrappersBrian Paul2015-02-241-10/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused acosf, asinf, atan2f, etc. macrosBrian Paul2015-02-241-16/+0
| | | | | | | Not used anywhere. If any of these are needed, they should be added to c99_math.h Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FABSF with fabsfBrian Paul2015-02-2411-53/+48
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FLOORF with floorfBrian Paul2015-02-243-13/+11
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused CEILF macroBrian Paul2015-02-241-3/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace LOGF, EXPF with logf, expfBrian Paul2015-02-244-12/+8
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FREXPF, LDEXPF with frexpf, ldexpfBrian Paul2015-02-243-11/+9
| | | | | | Start getting rid of some imports.h macros. Use the c99 functions instead. Reviewed-by: Matt Turner <[email protected]>
* swrast: fix a few release build warningsBrian Paul2015-02-242-0/+2
|
* st/mesa: cleanup st_translate_geometry_programMarek Olšák2015-02-241-102/+30
| | | | | | | | | Mostly dead code or code that didn't do anything. Computing gs_num_outputs at the end was also useless. It's already set correctly. Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: inline st_free_tokensMarek Olšák2015-02-243-17/+3
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: cleanup st_geometry_program structureMarek Olšák2015-02-243-74/+36
| | | | | | | It's full of unused variables and variables only used in st_translate_geometry_program. Reviewed-by: Dave Airlie <[email protected]>
* mesa: add a missing GS support check in GetActiveUniformBlockivMarek Olšák2015-02-241-0/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>