Use a const arrays with the extensions, and use the correct one at
runtime. This removes the assumption that the dri2_screen has a
fixed size dri extension list and avoids the individual assignment
of each extension at runtime.
While we're here make sure that the DRI*Extensions report the
version
Hi all,
Here is the third iteration of some DRI*extension cleanup patches.
This revision adds some minor updates and squashes the patches into
a shorter patchset.
The previous revision can be found at
http://lists.freedesktop.org/archives/mesa-dev/2014-February/054327.html
For people interested
Explicitly set the version that is implemented, as that may differ
from the one defined in dri_interface.h. Use designated initialisers
and constify whereever possible.
Note: __DRIimageExtension should not be made const as it's modified
at runtime. This patch should have no side effects on compile
Uniformly use the typecasted extension name, constify extension instances
and use designated initialisers. Set the implemented version of the
extension, over the one defined in dri_infertace.h. Patch covers the
following extensions:
__DRItexBufferExtension
__DRIimageExtension
__DRIrobustnessExtens
Explicitly set the version that is implemented, as that may differ from
the one defined in dri_interface.h. The remaining __DRI*Extensions are
treated as constants, so got ahead and declare them as such.
Signed-off-by: Emil Velikov
---
src/mesa/drivers/dri/common/dri_util.c | 2 +-
src/mesa/driv
Use designated initialisers, and store the extensions pointers as const.
The loader extensions __DRIdri2LoaderExtension and __DRIswrastLoaderExtension
are setup by the platform backends so they should not be constified.
Signed-off-by: Emil Velikov
---
src/egl/drivers/dri2/egl_dri2.c | 7 --
With commit e59fa4c46c8("dri2: release texture image.") we updated the
extension without bumping the version number. The patch itself added an
interface required to enable texture_from_pixmap on certain platforms.
The new code was effectively never build, as it depended on
__DRI_TEX_BUFFER_VERSION
While we're here use the typcast'ed name and constify.
Signed-off-by: Emil Velikov
---
src/glx/tests/query_renderer_implementation_unittest.cpp | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/glx/tests/query_renderer_implementation_unittest.cpp
b/src/glx/tests/qu
... to improve readability of code. Set applegl_screen_vtable as a static const.
Signed-off-by: Emil Velikov
---
src/glx/applegl_glx.c | 25 ++---
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c
index a67416e..4e2d
Use designated initialisers, store all extension pointers as const and use
a const __DRIextensions array over assigning each element individually.
Signed-off-by: Emil Velikov
---
src/gbm/backends/dri/gbm_dri.c| 20
src/gbm/backends/dri/gbm_driint.h | 12 ++--
2 f
... to improve readability of code.
Signed-off-by: Emil Velikov
---
src/glx/drisw_glx.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index a77be4e..751626b 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/d
Rather than keeping a separate and unused copy of the screen extensions
within the radeon screen, use a constant array that can be used directly
with __DRIscreen.
Signed-off-by: Emil Velikov
---
src/mesa/drivers/dri/radeon/radeon_screen.c | 29 ++---
src/mesa/drivers/dri/
... to improve readability of code. Set indirect_screen_vtable as a static
const.
Signed-off-by: Emil Velikov
---
src/glx/indirect_glx.c | 26 ++
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c
index 28b8cd0
... to improve readability of code.
Signed-off-by: Emil Velikov
---
src/glx/dri_glx.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 3b7502d..04a0847 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx
Use a const array with the extensions, rather than assigning each
one to a fixed size array at runtime.
Signed-off-by: Emil Velikov
---
src/glx/dri3_glx.c | 17 -
src/glx/dri3_priv.h | 2 +-
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/glx/dri3_glx.c b/sr
... to improve readability of code.
Signed-off-by: Emil Velikov
---
src/glx/dri2_glx.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 84ae875..298e771 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri
... to improve readability of code.
Signed-off-by: Emil Velikov
---
src/glx/dri3_glx.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 2a178d5..4cde9ef 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_
Hello list,
A couple of patches - first one cleans the glXInitialize error path
as currently we can call unlock_mutex on an already unlocked mutex.
The second patch cleans up glXInitialize handling by always checking
its return value, and drops a few cases where it's not needed.
IMHO the checks
With commit 1f1928db001(glx: Drop _Xglobal_lock while we create and
initialize glx display) we've split the big _Xglobal_lock handling in
a more fine grained manner.
Unfortunatelly we forgot to drop the unlock_mutex on the error paths,
leading to undefined behaviour as the mutex is already unlocke
Consistently check for the function return status to prevent
null ptr deref, and stop calling it without a purpose.
Signed-off-by: Emil Velikov
---
src/glx/dri2_glx.c | 21 +++--
src/glx/dri3_glx.c | 8
src/glx/drisw_glx.c | 5 +
3 files changed, 20 insertions(+)
From: Marek Olšák
It may cause issues with mipmap generation.
I think it was used to make some piglit tests pass on r300g.
---
src/gallium/auxiliary/util/u_blitter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/util/u_blitter.c
b/src/gallium/auxiliar
From: Marek Olšák
This replaces u_gen_mipmap with an extremely simple implementation based
on pipe->blit. The diff speaks for itself. st/mesa is also cleaned up.
Pros:
- less code
- correct mipmap generation for NPOT 3D textures (u_blitter uses a better
formula)
- queries are not affected by m
From: Marek Olšák
So that pipe->blit can be used for 3D mipmap generation.
---
src/gallium/auxiliary/util/u_blitter.c | 40 ++
1 file changed, 31 insertions(+), 9 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_blitter.c
b/src/gallium/auxiliary/util/u_bli
From: Marek Olšák
Also rewrite the comment for it to be readable and reorder the code.
---
src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 23 +--
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
b/src/gallium/wins
On Sun, Mar 16, 2014 at 12:46 PM, Marek Olšák wrote:
> From: Marek Olšák
>
> Also rewrite the comment for it to be readable and reorder the code.
Reviewed-by: Alex Deucher
> ---
> src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 23 +--
> 1 file changed, 13 insertions(+), 1
From: Marek Olšák
---
src/gallium/include/pipe/p_context.h | 14 ++
src/mesa/state_tracker/st_cb_bufferobjects.c | 21 +
2 files changed, 35 insertions(+)
diff --git a/src/gallium/include/pipe/p_context.h
b/src/gallium/include/pipe/p_context.h
index fe30
From: Marek Olšák
---
src/mesa/main/bufferobj.c | 14 ++
src/mesa/main/dd.h| 8 +++-
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 2e9e059..e7b6382 100644
--- a/src/mesa/main/bufferobj.c
+++ b/
From: Marek Olšák
The invalidation is already implemented by the driver.
---
src/gallium/drivers/radeon/r600_pipe_common.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5f6e0
Please disregard this series. The extension is not about reallocating
a buffer as I thought, it's actually about freeing a buffer and
allocating it later when it's used again.
Marek
On Sun, Mar 16, 2014 at 6:00 PM, Marek Olšák wrote:
> From: Marek Olšák
>
> ---
> src/mesa/main/bufferobj.c | 14
On 01/10/2014 07:40 PM, Ian Romanick wrote:
> From: Ian Romanick
>
> No driver uses them. They will just be annoying in future patches.
>
> Signed-off-by: Ian Romanick
> ---
> src/mesa/drivers/dri/i915/intel_context.c | 15 ++-
> src/mesa/drivers/dri/i965/brw_context.c| 7 +-
Hi,
My name is Marek Skalický. I am 20 years old and I study Applied
informatics at Masaryk university in Brno.
And I am interested in GSoC project about implementing OpenCL Image
Support into r600g/radeonsi.
I would like to ask what to do except of writing proposal. Should I
close some example bu
EGL 1.4 Specification says that
eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) can be
used to release the
current thread's ownership on the surfaces and context.
MESA's egl implementation was only accepting the parameters when the
KHR_surfaceless_context
extension is sup
From: Marek Olšák
It's flushed by calling r600_context_bo_reloc.
---
src/gallium/drivers/r600/evergreen_hw_context.c | 2 --
src/gallium/drivers/r600/evergreen_state.c | 3 ---
src/gallium/drivers/r600/r600_hw_context.c | 3 ---
src/gallium/drivers/r600/r600_state.c | 3 ---
From: Marek Olšák
*_dma_copy calls either *_dma_copy_buffer or *_dma_copy_tile.
---
src/gallium/drivers/r600/evergreen_hw_context.c | 12 ++--
src/gallium/drivers/r600/evergreen_state.c | 8
src/gallium/drivers/r600/r600_hw_context.c | 12 ++--
src/gallium/dri
From: Marek Olšák
---
src/gallium/drivers/r600/evergreen_hw_context.c | 10 +-
src/gallium/drivers/r600/evergreen_state.c | 20 ++--
src/gallium/drivers/r600/evergreend.h | 4
src/gallium/drivers/r600/r600_hw_context.c | 13 ++---
src/gal
The series is
Reviewed-by: Michel Dänzer
--
Earthling Michel Dänzer| http://www.amd.com
Libre software enthusiast |Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
h
Thanks for doing this! I have some comments...
1) As of SI, the maximum supported size for dword-aligned L2L, L2T,
and T2L copies is 0x8. The maximum supported size for byte-aligned
L2L copies is 0xfffe0. I'd like to have proper definitions for this,
e.g. SI_DMA_COPY_MAX_SIZE and SI_DMA_COPY_M
On Sun, Mar 16, 2014 at 5:20 AM, Beren Minor wrote:
> EGL 1.4 Specification says that
> eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) can
> be used to release the
> current thread's ownership on the surfaces and context.
>
> MESA's egl implementation was only accepting t
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75699
Signed-off-by: Kusanagi Kouichi
---
src/gallium/state_trackers/vdpau/surface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/vdpau/surface.c
b/src/gallium/state_trackers/vdpau/surface.c
39 matches
Mail list logo