Age | Commit message (Collapse) | Author | Files | Lines |
|
glamor_xv.c uses DamageDamageRegion but does not include xorg/damage.h. This
causes the build to fail if 9b8217f9ef6279fff6628631d18497bed0343ef9 is not
present in the X server.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75466
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=499442
Signed-off-by: Chí-Thanh Christopher Nguyễn <chithanh at gentoo.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Keeping the video pixmaps persistent sometimes will lead to video
corruption (shifted chroma planes) for unknown reasons. Possibly
there are some subtle pixmap handling bugs in xv or other parts of
the glamor code. To workaround, simply destroy pixmaps after they
have been used once.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72821
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Assuming it was the first attribute assigned by the GL, it would have
ended up with location 0 anyway.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We don't use fixed function rendering, so there is no need to reset
the program at all. This lets the driver avoid checking for state
changes between draw calls when we rebind the same program.
Improves xephyr x11perf -f8text performance by 6.03062% +/- 1.64928%
(n=20)
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This fixes gtkperf. It seemed to hang forever.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
There is some complicated code to support tweaking the format as we
upload from a SHM pixmap (aka the GTK icon cache), but if we weren't
sourcing from a SHM pixmap we just forgot to check that the formats
matched at all.
We could potentially be a little more discerning here (xRGB source and
ARGB mask would be fine, for example), but this will all change with
texture views anyway, so just get the rendering working for 1.16
release.
Fixes the new rendercheck gtk_argb_xbgr test.
v2: Squash in keithp's fix for checking that we have a non-NULL
pixmap, and reword the comment even more.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This reduces CPU overhead due to buffer orphaning, which results in
a small overall performance improvement.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
29.5361% +/- 2.74092% improvement in x11perf -aa10text (n=489).
Pulled from Eric's xserver glamor tree.
v2: Fix fallback, return correct buffer offset, map whole buffer,
unmap conditionally.
v3: add conditional defines to make it compile with outdated headers.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
context switcher related changes have not been pulled into this tree. This reverts commit 73ab7f4.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
Ported from Eric's glamor xserver tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This path needs to draw to the pixmap using its fbo, while an
in-memory pixmap doesn't have one.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The argument to setup_composte_vbo is the number of verts.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
From the GL_ARB_vertex_buffer_object spec:
After the client has specified the contents of a mapped data store,
and before the data in that store are dereferenced by any GL commands,
the mapping must be relinquished by calling
boolean UnmapBufferARB(enum target);
Our mappings were only getting reaped at PBO destroy time, after the
upload. If the GL implementation wasn't coherent, it would have used
stale data to do the texture upload.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We've got some leaks in the tree.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Using the same idea as the previous PushPixels code, just make points
for each point in the glyph. This is an advantage over the pushpixels
fallback because we can batch the BO mappings and draw calls across
glyphs.
Improves performance of x11perf -f8text by 881.481% +/- 50.5971% (n=6).
Ported from Eric's xserver glamor tree.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Otherwise, mi will fall back to GetSpans()ing the bitmap, walking the
bitmap, computing spans to be filled, and calling FillSpans().
Improves x11perf -f23text16 by 49.8918% +/- 7.81351% (n=4).
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
No difference (n=7)
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
No difference on performance in x11perf -f8text (n=15), but if we ever
get GL_ARB_buffer_storage support, it should be worth a few percent
CPU overhead on Intel.
Ported from Eric's xserver glamor tree.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We had regressions in CopyPlane reported by xts5, because we were
(successfully!) dereferencing the null pixmap->devPrivate.ptr for a
tile or stipple without having done a prepare.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now that the core deals with that for us, we can avoid all this extra
carefulness.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The common pattern is to do nested if statements making calls to
prepare_access() and then popping those mappings back off in each set
of braces. Some cases checked for src == dst to avoid leaking
mapping, but others didn't. Others didn't even do the nested
mappings, so a failure in the outer would result in trying to umap the
inner and failing.
By allowing nested mappings, we can fix both problems by not requiring
the care from the caller, plus we can allow a simpler nesting of all
the prepares in one if statement.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Nothing was using it, and it was going to complicate the
glamor_prepare_access bugfixing I'm going to do next.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This unpacks the bitfield into an int size, but my experience has been
that packing bitfields doesn't matter for performance.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We should be uploading any vertex data using this kind of upload
style, since it saves a bunch of extra copies of our vertex data.
Ported from Eric's glamor xserver tree.
v2: fix composite_vbo_offset init in trapezoid rendering
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now the error path of allocation is more obvious: We leave things in
the a-few-boxes-at-a-time stack memory state.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The "valid_" prefix was used above to describe our allocation that
gets reused multiple times, which is totally unrelated.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Imagine a nbox that was (UINT_MAX + small number) / 4 * 2 *
sizeof(float). We'd malloc a few bytes after the integer overflow,
but glamor_set_normalize_vcoords would write over gigabytes of heap.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
nbox > 4 is actually quite common for spans handling.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We were double-unmapping the VBO, and the second would throw an error.
Ported from Eric's glamor xserver tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We don't need any current contents of the buffer, and this allows an
implementation to make a temporary BO for a streamed upload if it
wants to.
Ported from Eric's glamor xserver tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
They never get reattached to any other program, so saving them to
unreference later is a waste of code.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Assuming it was the first attribute assigned by the GL, it would have
ended up with location 0 anyway.
Ported from Eric's glamor xserver tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
There's no way these should be in a header file, but I'll leave that
cleanup until later.
Ported from Eric's glamor xserver tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
A pair of 150 lines of inlined switch statements in a header file is
crazy.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We only ask for GL_RGB on desktop GL as far as I can see, but now if
GLES2 did happen to ask for GL_RGB it would return a cache index
instead of -1.
Pulled from Eric's glamor xserver tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Pulled from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Those calls are only for enabling texture handling in the fixed
function pipeline, while everything we do is with shaders.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
gl_ModelViewProjection and friends aren't used in our shaders, so this
setup didn't do anything.
Pulled from Eric's xserver glamor port.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Pulled from Eric's xserver glamor.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
There is a missing MakeCurrent before creating the texture
and link it to the EGLImage.
This fixes an X server crash with the piglit test
glx-make-current-multi-process on radeonsi from current Mesa Git.
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The stride parameter is based on bits and is set according to
PixmapBytePad
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74733
Signed-off-by: Anthony Waters <awaters1@gmail.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
|
|
Even when create a pixmap which smaller than the max_fbo_size,
it may fail due to some low level driver limitation. If that is
the case, we don't need to crash the xserver. We just need to
fallback to system memory.
See the related bug at:
https://bugs.freedesktop.org/show_bug.cgi?id=71190
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: Michel Danzer <michel@daenzer.net>
Tested-by: Kai Wasserbach <kai@dev.carbon-project.org>
Tested-by: Erich Seifert <eseifert@error-reports.org>
|
|
This fixes seg fault when running x11perf -aa4trap300.
Signed-off-by: Samuel Li <samuel.li@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
to the destination similar to what EXA did
For instances where the destination has a FBO but the source doesn't,
the code now just puts the data that was in source directly into
destination through glamor_upload_sub_pixmap_to_texture. This is the
same way that EXA works in this case as well.
Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=71813
Signed-off-by: Anthony Waters <awaters1@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The method __glamor_upload_pixmap_to_texture was updated to support a
stride parameter for the data being uploaded to a texture. This
required correctly setting the alignment from 4 to a value based on the
depth of the data and also required setting GL_UNPACK_ROW_LENGTH based
on both the stride and the alignment.
The stride parameter was also updated in glamor_put_image to be
correctly specified, the old values would cause the xserver to crash.
Part of bug:
https://bugs.freedesktop.org/show_bug.cgi?id=71813
Signed-off-by: Anthony Waters <awaters1@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|