Commit Graph

74184 Commits

Author SHA1 Message Date
Anuj Phogat
63432eb370 mesa: Enable translation between astc 3d gl formats and mesa formats
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
54cac7ad96 mesa: Handle astc 3d formats in _mesa_get_compressed_formats()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
dcfea1d7eb mesa: Handle astc 3d formats in _mesa_base_tex_format()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
cf85ef1618 mesa: Account for astc 3d formats in _mesa_is_astc_format()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
38cd8145a8 mesa: Add a helper function is_astc_3d_format()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
72dfe0242d mesa: Add the missing defines for GL_OES_texture_compression_astc
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
57451e0fc1 mesa: Align the values of #define's in glheader.h
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
0306110fa9 mesa: Add OES_texture_compression_astc to extension table and gl_extensions
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
059f36c671 mesa: Add entries for astc 3d formats initializing struct gl_format_info
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
705216dbed mesa: Add mesa formats for astc 3d formats
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
24bb6ee8b6 glapi: Update dispatch XML files for OES_texture_compression_astc.xml
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
63a7a9d115 mesa: Account for block depth in _mesa_format_image_size()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
87bf66daa9 mesa: Handle 3d block sizes in _mesa_compute_compressed_pixelstore
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
84a44844f2 mesa: Handle 3d block sizes in teximage error checks
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
ec60b3da69 mesa: Handle 3d block sizes in getteximage error checks
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:18 -07:00
Anuj Phogat
5713461ae7 mesa: Add an assert for BlockDepth in _mesa_get_format_block_size()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:17 -07:00
Anuj Phogat
9163c37349 mesa: Add a helper function to query 3D block sizes
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:17 -07:00
Anuj Phogat
6abb1b4984 mesa: Add block depth field in struct gl_format_info
This will be later required for 3D ASTC formats.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-03 03:43:17 -07:00
Dave Airlie
c4a0cd4662 mesa/copyimage: make sure number of samples match.
This fixes
GL43-CTS.copy_image.samples_missmatch
which otherwise asserts in the radeonsi driver.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-05-03 20:13:29 +10:00
Dave Airlie
5989a2937f mesa/objectlabel: don't do memcpy if bufSize is 0 (v2)
This prevents GL43-CTS.khr_debug.labels_non_debug from
memcpying all over the stack and crashing.

v2: actually fix the test.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-05-03 20:12:59 +10:00
Dave Airlie
30823f997b mesa/textureview: move error checks up higher
GL43-CTS.texture_view.errors checks for GL_INVALID_VALUE
here but we catch these problems in the dimensionsOK check
and return the wrong error value.

This fixes:
GL43-CTS.texture_view.errors.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-05-03 20:12:52 +10:00
Marek Olšák
5541e11b9a gallium/radeon: remove stencil_tile_split from metadata
this is a leftover from the days when depth-stencil buffers were
allocated by the DDX

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
20a77397fa gallium/radeon: remove tile_mode_array_valid flags
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
c8aac4fc0d winsys/amdgpu: pass PIPE_CONFIG to addrlib on texture import
This hasn't been needed, but I think we should set it.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
dc970c4f4e winsys/amdgpu: read NUM_BANKS from buffer metadata
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
02f90cef7d radeonsi: remove unused tile mode getters
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
b9e3e87069 radeonsi: just read tile mode arrays in SDMA setup
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
0c2cba1ec6 radeonsi: just read tile mode arrays in SI DMA setup
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
c3ca54aee9 radeonsi: just read tile mode arrays in DB setup
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
ef45825708 gallium/radeon: add radeon_surf::macro_tile_index
for indexing cik_macrotile_mode_array

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
ed4fd542de winsys/radeon: drop support for kernels lacking tile mode array queries
This will allow us to simplify a lot of code around tiling.

Kernel 3.10 is required for SI support.
Kernel 3.13 is required for CIK support.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
3d956b4bc0 st/mesa: fix blit-based GetTexImage for non-finalized textures
This fixes getteximage-depth piglit failures on radeonsi.

Cc: 11.1 11.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
77af6bcc26 winsys/radeon: count buffer size only once
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
3e3c43418e winsys/amdgpu: count buffer size only once
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
f98ba4123c winsys/amdgpu: loosen up requirements for how much memory IBs can use
ported from winsys/radeon.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
9ec00c23c2 radeonsi: when parsing dmesg, skip empty lines
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-02 22:49:25 +02:00
Marek Olšák
9983efca76 radeonsi: use the hw MSAA resolving if formats are compatible
This allows resolving RGBA into RGBX.
This should improve HL2 Lost Coast performance.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-05-02 22:49:25 +02:00
Samuel Pitoiset
819836d240 nv50,nvc0: re-bind old compute state after reading MP perf counters
This might be useful to avoid breaking the current compute state when
monitoring MP perf counters because we use a compute kernel to read out
those counters. This has been initially suggested by Ilia Mirkin.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-05-02 22:30:48 +02:00
Rob Clark
dcf8c4425a nir: make lower_clamp_color pass work after lower i/o
Kinda important to work with tgsi_to_nir, which generates nir which
already has i/o lowered.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-05-02 14:25:38 -04:00
Eric Anholt
226bd92945 vc4: Use NIR lowering for sRGB decode.
This should get us the same decode code generated, but with a lot less
custom code in the driver.
2016-05-02 11:06:29 -07:00
Eric Anholt
4b326341f3 vc4: Just use NIR lowering for texture projection.
This means doing Newton-Raphson on the RCP, but it's probably actually a
good thing to be accurate on.
2016-05-02 11:06:29 -07:00
Eric Anholt
2f98bc100d vc4: Scalarize phi nodes as well.
This makes fewer programs with loops assertion fail, replacing them with
the rendering failure warning.
2016-05-02 11:06:29 -07:00
Eric Anholt
4a2ad8500d vc4: Add whitespace after each program stage dump.
In particular it's been hard to find the point where we switch from
dumping pre-optimization QIR and post-optimization QIR.
2016-05-02 11:06:29 -07:00
Eric Anholt
84322b2f31 vc4: Remove the CSE pass.
It's not doing anything according to shader-db now that we're using NIR.
It would have had to be reworked significantly anyway, to handle control
flow.
2016-05-02 11:06:29 -07:00
Eric Anholt
b145b731ab vc4: Emit only one FRAG_Z or FRAG_W QIR opcode.
We were generating piles of FRAG_W for interpolation, only to CSE them
away immediately.  Since this is the only thing that CSE is doing for us
any more, just avoid making the CSE work necessary.
2016-05-02 11:06:29 -07:00
Eric Anholt
e138716d8d vc4: Use the NIR cubemap normalization instead of our own.
This is one of two uses of the current QIR CSE pass according to
shader-db.  The NIR pass means that we'll end up doing Newton-Raphson on
our RCP, which we weren't doing before, but that's probably actually a
good thing.
2016-05-02 11:06:29 -07:00
Eric Anholt
3bee7581e6 vc4: Drop the support for DCE of texture instructions.
Now that we're using NIR for our optimization, there's no need for this
tricky code.
2016-05-02 11:06:29 -07:00
Nicolai Hähnle
155ce49603 radeonsi: fix PIPE_FORMAT_R11G11B10_FLOAT handling
That format has first_non_void < 0. This fixes a regression in piglit
arb_shader_image_load_store-semantics that was introduced by commit 76b8c5cc60,
while hopefully still shutting Coverity up (and failing in a more obvious way
if a similar error should re-appear).

Reviewed-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-05-02 11:38:23 -05:00
Nicolai Hähnle
169ace5636 radeonsi: correct NULL-pointer check in si_upload_const_buffer
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-05-02 11:37:55 -05:00
Dave Airlie
cf6dadb00b softpipe: bump 3D texture limit to 2048
The GL4.1 spec bumps this to 2048, so we should do so.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-05-02 07:29:02 +10:00