| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glGetStringi(GL_EXTENSIONS) failed to respect the context's API, and so
returned all internally enabled GLES extensions from a GL context.
Likewise, glGetIntegerv(GL_NUM_EXTENSIONS) also failed to repsect the
context's API.
Note: This is a candidate for the 8.0 and 9.0 branches.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
(cherry picked from commit f29a4b0157c6a7a31d2a2991a431b4211d01d162)
Conflicts:
src/mesa/main/extensions.c
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Android we want to add only double buffered configs for visuals.
Earlier implementation set the SurfaceType as 0 for single buffered
configs but driver still exposed these configs that were not compatible
with any egl surface type. This caused Khronos conformance test runs to
fail on Android. This patch fixes the issue by skipping single buffered
configs earlier and not exposing them.
Signed-off-by: Tapani Pälli <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
(cherry picked from commit d58ca43b809593314907694e744780ab9b28d590)
|
|
|
|
|
|
|
|
| |
__progname symbol and strrchr are available with bionic.
Signed-off-by: Tapani Pälli <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
(cherry picked from commit 4d02b018f456c447e2c24ebd1460c27d6e5fb385)
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the old backend, we looked at any FS attribute's proj_attrib_mask bits, not
just texcoords. Now that we have _mesa_vert_result_to_frag_attrib(), we can
fill in the other FS inputs with correct proj_attrib_mask info.
NOTE: This is a candidate for stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46644
Signed-off-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The final step of _mesa_unpack_depth_span is to take the temporary
GLfloat depth values and convert them to the desired format. When
converting to GL_UNSIGNED_INTEGER with depthMax > 0xffffff, we use
double-precision math to avoid overflow and precision problems.
Or at least that's the idea. Unfortunately
GLdouble z = depthValues[i] * (GLfloat) depthMax;
actually causes single-precision multiplication, since both operands are
GLfloats. Casting depthMax to GLdouble causes the scaling to be done
with double-precision math.
Fixes a regression in oglconform's depth-stencil basic.read.ds test
since c60ac7b17993d28af65b04f9bbbf3ee74c35358c, where the expected and
actual values differed slightly. For example, 0xcfa7a6 vs. 0xcfa7a4.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49772
Signed-off-by: Kenneth Graunke <[email protected]>
|
|
|
|
| |
Signed-off-by: Brian Paul <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In i965 Gen7, Mesa has for a long time used the "depth coordinate
offset X/Y" settings (in 3DSTATE_DEPTH_BUFFER) to cause the GPU to
render to miplevels other than 0. Unfortunately, this doesn't work,
because these offsets must be aligned to multiples of 8, and miplevels
in the depth buffer are only guaranteed to be aligned to multiples of
4. When the offsets aren't aligned to a multiple of 8, the GPU
sometimes hangs.
As a temporary measure, to avoid GPU hangs, this patch smashes the 3
LSB's of "depth coordinate offset X/Y" to 0. This results in
incorrect rendering to mipmapped depth textures, but that seems like a
reasonable stopgap while we figure out a better solution.
Avoids GPU hangs in piglit test "depthstencil-render-miplevels" at
texture sizes that are not powers of 2.
Reviewed-by: Chad Verace <[email protected]>
Cherry-picked from 714b4f6184db84a738cf2d063980f0e19ab03b4b
Conflicts:
src/mesa/drivers/dri/i965/gen7_misc_state.c
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50271
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In i965 Gen6, Mesa has for a long time used the "depth coordinate
offset X/Y" settings (in 3DSTATE_DEPTH_BUFFER) to cause the GPU to
render to miplevels other than 0. Unfortunately, this doesn't work,
because these offsets must be aligned to multiples of 8, and miplevels
in the depth buffer are only guaranteed to be aligned to multiples of
4. When the offsets aren't aligned to a multiple of 8, the GPU
sometimes hangs.
As a temporary measure, to avoid GPU hangs, this patch smashes the 3
LSB's of "depth coordinate offset X/Y" to 0. This results in
incorrect rendering to mipmapped depth textures, but that seems like a
reasonable stopgap while we figure out a better solution.
(Note that we have only ever observed this GPU hang on Gen6 when HiZ
is enabled, so another possible stopgap would be to disable HiZ).
Avoids GPU hangs in piglit test "depthstencil-render-miplevels" at
texture sizes that are not powers of 2.
Reviewed-by: Chad Verace <[email protected]>
Cherry-picked from a683012a80a3408b3b71f22b2a97d9eaaac11a46
Conflicts:
src/mesa/drivers/dri/i965/brw_misc_state.c
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50271
|
|
|
|
|
|
|
| |
If no format is matched in the loop the value of xconf was undefined.
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit fe2a7b7e7fca599659b1d248e160d480f2b92ba2)
|
|
|
|
|
|
|
| |
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Alex Deucher <[email protected]>
(cherry picked from commit 13b0af721a6ff9e98d47a2c0a740fe843c034016)
|
|
|
|
|
|
|
|
|
|
| |
Since live intervals are based on ip, removing an instruction trashes
the intervals unless we were to go do some surgery. These happen to
usually remove a use of a grf, so it's time to recalculate, anyway.
Reviewed-by: Kenneth Graunke <[email protected]>
NOTE: This is a candidate for the 8.0 release branch.
(cherry picked from commit 2343fe9a5d1786413453e6e8e5c7700143d68a26)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The i965 back-end needs to compile dFdy() differently for FBOs and
window system framebuffers, because Y coordinates are flipped between
the two (see commit 82d2596: i965: Compute dFdy() correctly for FBOs).
This patch avoids unnecessarily recompiling shaders that don't use
dFdy(), by only setting render_to_fbo in the wm program key if the
shader actually uses dFdy().
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
(cherry picked from commit d08fdacd58dfa6b1926e9df4707dd9e8dd5370c5)
Conflicts:
src/mesa/drivers/dri/i965/brw_wm.c
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The i965 back-end needs to compile dFdy() differently for FBOs and
window system framebuffers, because Y coordinates are flipped between
the two (see commit 82d2596: i965: Compute dFdy() correctly for FBOs).
This boolean will allow it to avoid unnecessarily recompiling shaders
that don't use dFdy().
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
(cherry picked from commit 5e310e9f8300a357d6bdaf098c72098518b564f3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On i965, dFdx() and dFdy() are computed by taking advantage of the
fact that each consecutive set of 4 pixels dispatched to the fragment
shader always constitutes a contiguous 2x2 block of pixels in a fixed
arrangement known as a "sub-span". So we calculate dFdx() by taking
the difference between the values computed for the left and right
halves of the sub-span, and we calculate dFdy() by taking the
difference between the values computed for the top and bottom halves
of the sub-span.
However, there's a subtlety when FBOs are in use: since FBOs use a
coordinate system where the origin is at the upper left, and window
system framebuffers use a coordinate system where the origin is at the
lower left, the computation of dFdy() needs to be negated for FBOs.
This patch modifies the fragment shader back-ends to negate the value
of dFdy() when an FBO is in use. It also modifies the code that
populates the program key (brw_wm_populate_key() and
brw_fs_precompile()) so that they always record in the program key
whether we are rendering to an FBO or to a window system framebuffer;
this ensures that the fragment shader will get recompiled when
switching between FBO and non-FBO use.
This will result in unnecessary recompiles of fragment shaders that
don't use dFdy(). To fix that, we will need to adapt the GLSL and
NV_fragment_program front-ends to record whether or not a given shader
uses dFdy(). I plan to implement this in a future patch series; I've
left FIXME comments in the code as a reminder.
Fixes Piglit test "fbo-deriv".
NOTE: This is a candidate for stable release branches.
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit 82d25963a838cfebdeb9b080169979329ee850ea)
|
|
|
|
|
| |
Reviewed-by: Eric Anholt <[email protected]>
(cherry picked from commit 4433b0302d0aa9dc61002e8bb4fd1b752b0be338)
|
|
|
|
|
|
|
| |
Rather than testing the fbo's name against zero.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 36ede89687fe2de213f2637ab7acfb80cfd856cd)
|
|
|
|
|
|
|
| |
Acked-by: Kenneth Graunke <[email protected]>
https://bugs.freedesktop.org/show_bug.cgi?id=52382
(cherry picked from commit fbf86c7f0f1f12e52b927e3870535073879d0a4d)
|
|
|
|
| |
(cherry picked from commit 40742fa6864000d431b81c3769a3136b7ff4a0d1)
|
|
|
|
| |
Signed-off-by: Ian Romanick <[email protected]>
|
|
|
|
| |
Signed-off-by: Ian Romanick <[email protected]>
|
|
|
|
| |
Signed-off-by: Ian Romanick <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This fixes piglit/getteximage-formats on r600g.
NOTE: This is a candidate for stable branches.
Reviewed-by: Brian Paul <[email protected]>
(cherry picked from commit 5e7e7d96b341e937d3b795e94ac4a863c357f724)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without passing the -ldflags parameter before $(LDFLAGS) in some cases
flags will be passed to MKLIB which it does not understand.
This might be -m64, -m32 or similar.
NOTE: This is a candidate for the 8.0 branch.
Signed-off-by: Thomas Gstädtner <[email protected]>
Signed-off-by: Brian Paul <[email protected]>
(cherry picked from commit 93594f38be75227879b835a2037b7466adbd70ef)
|
|
|
|
|
|
|
|
|
|
| |
Fixes uninitialized member defects reported by Coverity.
NOTE: This is a candidate for the 8.0 branch.
Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
(cherry picked from commit 70d038e46eb877ffa922003c78630eb7eb76c0f3)
|
|
|
|
|
|
|
|
|
|
|
| |
This should help to prevent gpu lockups.
See https://bugs.freedesktop.org/show_bug.cgi?id=48472
NOTE: This is a candidate for the stable branches.
Signed-off-by: Vadim Girlin <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
(cherry picked from commit 783e4da72aa203a645737dec81b001341951a942)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the maximum base vertex offset to max_index for computing the
buffer size. Fixes a failed assertion in the u_upload_mgr.c code with
the VMware svga driver.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48141
v2: incorporate Marek's suggestions.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit 299c9052e832712654865af8dbd0ed4bf055d124)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Function calls may have side effects that alter variables used inside
the loop. In the fragment shader, they may even terminate the shader.
This means our analysis about loop-constant or induction variables may
be completely wrong.
In general it's impossible to determine whether they actually do or not
(due to the halting problem), so we'd need to perform conservative
static analysis. For now, it's not worth the complexity: most functions
will be inlined, at which point we can unroll them successfully.
Fixes Piglit tests:
- shaders/glsl-fs-unroll-out-param
- shaders/glsl-fs-unroll-side-effect
NOTE: This is a candidate for release branches.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
(cherry picked from commit 0405bd08ca0e01ebc68891ee1ff47d320983f775)
|
|
|
|
|
|
|
|
|
| |
The function that counts the number of TGSI immediates also needs to
emit the immediates. This fixes assorted failures when using polygon
stipple with fragment shaders that have their own immediates.
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 7f16246acef4089570abca76a59580691ec6cf68)
|
|
|
|
|
|
|
|
|
|
| |
The image height or depth is the array_size for array textures.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47742
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Jakob Bornecrantz <[email protected]>
(cherry picked from commit 318669f196ca922337da02af9d72773e76e70b45)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we failed to allocate a memory resource for the texture we'd crash
when we tried to map it. Now we propogate the NULL back up to the
texstore code and generate GL_OUT_OF_MEMORY.
Fixes a crash with the upcoming piglit max-texture-size test.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 03f8a97d718502f60d16000aead251d88a751149)
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to the previous commit. Also fix incorrect setting of the
sampler view's state after it's created. We need to specify the
first/last_level fields in the template instead.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Jose Fonseca <[email protected]>
(cherry picked from commit 0315cb9f8f3ec38fa9594860754fb53a67cf4c23)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The st_renderbuffer_alloc_storage() function is used to allocate both
window-system buffers and user-created renderbuffers. The later kind
are never directly displayed so don't set PIPE_BIND_DISPLAY_TARGET for
those surfaces.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Jose Fonseca <[email protected]>
(cherry picked from commit 5a70e12fc0897a3178c73b20d99fc0f11b180374)
|
|
|
|
|
|
|
|
|
|
|
| |
Should avoid dangling pointer derreference with
glean --run results --overwrite --quick --tests texSwizzle
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Brian Paul <[email protected]>
(cherry picked from commit 07635a4799b15a7575e1feb8859ecc7734850deb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function releases the buffer that contains user-space vertex data.
The buffer_offset field points into that buffer. So reset the
buffer_offset to zero when we release the buffer so that subsequent
draws don't inadvertantly get a bad offset.
Fixes error messages / failed assertions (in the draw module's bounds/size
checking code) when running piglit's polygon-mode test.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 04341e51cea32d6e54d99019dd00ec56e77e27f9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To fix failed assertions when calling glCopyBufferSubData().
svga_texture() asserts that the resource is a texture. Simply move the
calls to svga_texture() after the code that handles non-texture copies
so that we don't call it with non-texture resources.
Fixes glean bufferObject failure.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 7f2e12812a2208330ef8704e7c4721ececd2aab3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two assignments to num_immediates were missing in
get_pixel_transfer_visitor() and get_bitmap_visitor().
The uninitialized value led to valgrind errors and crashes in some
cases.
Added new assertions to catch future problems in this area. Also
changed num_immediates to unsigned to avoid signed/unsigned
comparison warnings.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit fdae0eaf222f271bfbc7e71d8561eb8b90685ae5)
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we don't find an exact PIPE_FORMAT_x for a GL_(COMPRESSED)_RED/RG format,
try uncompressed formats. We were already doing this for the RGB(A) formats.
Fixes piglit arb_texture_compression-internal-format-query test.
NOTE: This is a candidate for the stable branches.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 75f37ddba7e5a297390299be0dab8377ea40f5c8)
|
|
|
|
|
|
|
|
| |
Otherwise the fence will never arrive.
Also check for a NULL i915->batch.
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 32b07bb1496f5772ca16e719bb87e1702ceff196)
|
|
|
|
|
| |
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 2b4afdba05abe3408f6347be82465b6420f50aab)
|
|
|
|
|
|
|
|
|
|
| |
The legal range for the device is apparently [-16.0, +15.0].
Limiting the range to [-15, +15] fixes piglit's lodbias test.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit a9eda41539bd63ed1835556ad3afc77ee01f6a6a)
|
|
|
|
|
|
|
|
|
|
|
| |
The interaction between the mipmap lod min/max limits and the texture
base/max level limits is kind of tricky. Changing the base level
didn't work as expected before.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit fd890873b20de553078fc96d977fbd858238c7d9)
|
|
|
|
|
|
|
|
|
| |
This makes lod clamping more consistent with other drivers.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
(cherry picked from commit 5abcd198b8e644c0d97c6766c6707e20fe22f0fb)
|
|
|
|
|
|
|
| |
when mapping renderbuffers or texture images.
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 84c7c14697c82fe25586f8186b4f47d80a6f05f9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In single precision, 1.5707963 becomes 1.5707962513 which is too
small. However, 1.5707964 becomes 1.5707963705 which is just right.
The value 1.5707964 is already used in asin.ir.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Olivier Galibert <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
(cherry picked from commit 4bfdc8313592ec8a8794d6b7bc33a5c44df34ed4)
Conflicts:
src/glsl/builtins/ir/acos.ir
|
|
|
|
|
|
|
|
|
| |
This is an array of uniforms, not a single one.
Reviewed-by: Ian Romanick <[email protected]>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit e2e9b4b10fcf3ba6358b9be54638f850523af82e)
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we have multiple shared contexts, and one of them is
long-running, this will lead to never freeing those resources
since they are shared. Instead, free them right away on context
destruction since we know the other context isn't using them.
Reviewed-by: Ian Romanick <[email protected]>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 53feb8ecdc74502c940a749b9ce89e68625c69a5)
|
|
|
|
|
|
|
|
|
| |
Works around crashes when X connections break.
Reviewed-by: Ian Romanick <[email protected]>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 0256edd709d976198d5354fdd88143d8da9e51d5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While ~loop_state() is already freeing the loop_variable_state objects
via ralloc_free(this->mem_ctx), the ~loop_variable_state() destructor
was never getting called, so the hash table inside loop_variable_state
was never getting destroyed.
Fixes a memory leak in any shader with loops.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <[email protected]>
(cherry picked from commit 3603fdcebfa25e2217f1dbfb0a99261be3e84b02)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenGL allows you to declare user-defined fragment shader outputs with
less than four components:
out ivec2 color;
This makes sense if you're rendering to an RG format render target.
Previously, we assumed that all color outputs had four components (like
the built-in gl_FragColor/gl_FragData variables). This caused us to
call emit_color_write for invalid indices, incrementing the output
virtual GRF's reg_offset beyond the size of the register.
This caused cascading failures: split_virtual_grfs would allocate new
size-1 registers based on the virtual GRF size, but then proceed to
rewrite the out-of-bounds accesses assuming that it had allocated enough
new (contiguously numbered) registers. This resulted in instructions
that accessed size-1 GRFs which register numbers beyond
virtual_grf_next (i.e. registers that were never allocated).
Finally, this manifested as live variable analysis and instruction
scheduling accessing their temporary array with an out of bounds index
(as they're all sized based on virtual_grf_next), and the program would
segfault.
It looks like the hardware's Render Target Write message requires you to
send four components, even for RT formats such as RG or RGB. This patch
continues to use all four MRFs, but doesn't bother to fill any data for
the last few, which should be unused.
+2 oglconforms.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
(cherry picked from commit 2f18698220d8b27991fab550c4721590d17278e0)
Conflicts:
src/mesa/drivers/dri/i965/brw_fs.h
Signed-off-by: Ian Romanick <[email protected]>
|