Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mesa/piglit
  • gfxstrand/piglit
  • nchery/piglit
  • gerddie/piglit
  • dbaker/piglit
  • sagarghuge/piglit
  • kusma/piglit
  • tpohjola/piglit
  • mvicomoya/piglit
  • rantogno/piglit
  • sima/piglit
  • ajax/piglit
  • anholt/piglit
  • GL/piglit
  • jvesely/piglit
  • jljusten/piglit
  • samuelig/piglit
  • daniels/piglit
  • velurimithun/piglit
  • jameshogan/piglit
  • elongbug/piglit
  • harishkrupo/piglit
  • tpalli/piglit
  • pmoreau/piglit
  • tanty/piglit
  • apinheiro/piglit
  • kwg/piglit
  • andrii-krv/piglit
  • cmarcelo/piglit
  • pepp/piglit
  • austriancoder/piglit
  • pzanoni/piglit
  • idr/piglit
  • y2kenny-amd/piglit
  • apesch/piglit
  • skirk/piglit
  • agoldmints/piglit
  • tarceri/piglit
  • nroberts/piglit
  • abelbriggs1/piglit
  • vlee/piglit
  • itoral/piglit
  • dlehman25/piglit
  • llandwerlin/piglit
  • krzysztof.raszkowski/piglit
  • frkoenig/piglit
  • GyrosGeier/piglit
  • currojerez/piglit
  • pendingchaos/piglit
  • baldurk/piglit
  • rellla/piglit
  • sanguinariojoe/piglit
  • rhyskidd/piglit
  • aphogat/piglit
  • mareko/piglit
  • daenzer/piglit
  • airlied/piglit
  • ruanc/piglit
  • idas/piglit
  • zfigura/piglit
  • chema/piglit
  • zhangjie/piglit
  • arsenm/piglit
  • lskrejci/piglit
  • jasuarez/piglit
  • jzielins/piglit
  • imirkin/piglit
  • antonovitch/piglit
  • edb/piglit
  • jrfonseca/piglit
  • slinder1/piglit
  • zmike/piglit
  • craftyguy/piglit
  • chturne/piglit
  • yogeshmohan/piglit
  • majanes/piglit
  • shadeslayer/piglit
  • bnieuwenhuizen/piglit
  • manu/piglit
  • zhaosl1988/piglit
  • mjkrol/piglit
  • kettenis/piglit
  • Danil/piglit
  • olv/piglit
  • jenatali/piglit
  • mtmkls/piglit
  • cheyang/piglit
  • lcong/piglit
  • marex/piglit
  • ichernev/piglit
  • tomeu/piglit
  • tantan/piglit
  • Fahien/piglit
  • hikiko/piglit
  • tintou/piglit
  • italove/piglit
  • zzyiwei/piglit
  • mrisaacb/piglit
  • bl4ckb0ne/piglit
  • thochstein/piglit
  • jzhums/piglit
  • shannonliu011/piglit
  • rivaldosetiawan135/piglit
  • ffontaine/piglit
  • yuq825/piglit
  • sameer.lattannavar/piglit
  • xexaxo/piglit
  • cristicc/piglit
  • sofiapidlyjna1997/piglit
  • gallo/piglit
  • vliaskov/piglit
  • alex.kanavin/piglit
  • svenny/piglit
  • ilario/piglit
  • mattst88/piglit
  • robclark/piglit
  • preda/piglit
  • dh/piglit
  • sergi/piglit
  • ondracka/piglit
  • gawin/piglit
  • andrescj-chromium/piglit
  • anarsoul/piglit
  • JoniSt/piglit
  • bentiss/piglit
  • Joe_Nash/piglit
  • jxzgithub/piglit-public
  • noblock/piglit
  • Samsuper/piglit
  • kraj/piglit
  • EricGuo/piglit
  • marysaka/piglit
  • vigneshraman/piglit
  • robertfoss/piglit
  • Hazematman/piglit
  • lynxeye/piglit
  • eerii/piglit
  • bhenden/piglit-latest
  • i509VCB/piglit
  • vhorinek/piglit
  • Lurie97/piglit
  • KonstantinSeurer/piglit
  • sarthakbhatt/piglit
  • ericsmith/piglit
  • nanokatze/piglit
  • ibriano/piglit
  • lfrb/piglit
  • GKraats/piglit
  • ngcortes/piglit
  • hakzsam/piglit
  • lumag/piglit
  • jxzgithub/piglit
  • mombasa/piglit
153 results
Show changes
Commits on Source (3)
......@@ -51,9 +51,14 @@ except ImportError:
def find_draw_with_event_id(controller, event_id):
for d in controller.GetDrawcalls():
if d.eventId == event_id:
return d
try:
for root_action in controller.GetRootActions():
if root_action.eventId == event_id:
return root_action
except AttributeError:
for root_drawcall in controller.GetDrawcalls():
if root_drawcall.eventId == event_id:
return root_drawcall
return None
......@@ -78,8 +83,12 @@ def dump_image(controller, event_id, output_dir, tracefile):
filepath.mkdir(parents=True, exist_ok=True)
filepath = filepath / (tracefile + "-" + str(int(draw.eventId)) + ".png")
print("Saving image at event ID %d: %s to %s" % (draw.eventId,
draw.name, filepath))
try:
filename: str = draw.GetName(controller.GetStructuredFile())
except AttributeError:
filename: str = draw.name
print(f"Saving image at event ID {draw.eventId}: {filename} to {filepath}")
# Most formats can only display a single image per file, so we select the
# first mip and first slice
......@@ -122,7 +131,10 @@ def renderdoc_dump_images(filename, event_ids, output_dir):
tracefile = Path(filename).name
if not event_ids:
event_ids.append(controller.GetDrawcalls()[-1].eventId)
try:
event_ids.append(controller.GetRootActions()[-1].eventId)
except AttributeError:
event_ids.append(controller.GetDrawcalls()[-1].eventId)
for event_id in event_ids:
dump_image(controller, event_id, output_dir, tracefile)
......
......@@ -12,6 +12,7 @@ endif(PIGLIT_BUILD_GLX_TESTS)
link_libraries (
${OPENGL_gl_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
)
IF(PIGLIT_BUILD_GLX_TESTS)
......@@ -56,6 +57,8 @@ IF(PIGLIT_BUILD_GLX_TESTS)
piglit_add_executable (glx-multithread-shader-compile glx-multithread-shader-compile.c)
target_link_libraries(glx-multithread-shader-compile pthread)
piglit_add_executable (glx-make-current glx-make-current.c)
piglit_add_executable (glx-make-current-other-thread glx-make-current-other-thread.c)
piglit_add_executable (glx-copy-context-dest-current glx-copy-context-dest-current.c)
piglit_add_executable (glx-swap-event glx-swap-event.c)
piglit_add_executable (glx-make-glxdrawable-current glx-make-glxdrawable-current.c)
piglit_add_executable (glx-swap-exchange glx-swap-exchange.c)
......
/*
* Copyright (c) 2023 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/** @file glx-copy-context-dest-current.c
*
* BadAccess is generated if dst is current to any thread (including the
* calling thread) at the time glXCopyContext is called.
*/
#include <unistd.h>
#include "piglit-util-gl.h"
#include "piglit-glx-util.h"
static Display *dpy;
static Window win;
static XVisualInfo *visinfo;
unsigned char glx_error = Success;
int
expect_badvalue(Display *dpy, XErrorEvent *e)
{
glx_error = e->error_code;
return 0;
}
int
main(int argc, char **argv)
{
int i;
int ret;
int (*old_handler)(Display *, XErrorEvent *);
for (i = 1; i < argc; ++i) {
if (!strcmp(argv[i], "-auto"))
piglit_automatic = 1;
else
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
piglit_report_result(PIGLIT_FAIL);
}
visinfo = piglit_get_glx_visual(dpy);
win = piglit_get_glx_window(dpy, visinfo);
old_handler = XSetErrorHandler(expect_badvalue);
GLXContext ctx1, ctx2;
ctx1 = piglit_get_glx_context(dpy, visinfo);
ctx2 = piglit_get_glx_context(dpy, visinfo);
ret = glXMakeCurrent(dpy, win, ctx1);
if (ret != True) {
printf("glXMakeCurrent ctx1 has failed.\n");
piglit_report_result(PIGLIT_FAIL);
}
ret = glXMakeCurrent(dpy, win, ctx2);
if (ret != True) {
printf("glXMakeCurrent ctx2 has failed.\n");
piglit_report_result(PIGLIT_FAIL);
}
glXCopyContext(dpy, ctx1, ctx2, ULONG_MAX);
XSync(dpy, False);
if (glx_error != BadAccess) {
printf("Failed to get BadAccess from glXCopyContext with already "
"current dest.\n");
piglit_report_result(PIGLIT_FAIL);
}
/* Free our resources when we're done. */
XSetErrorHandler(old_handler);
glXMakeCurrent(dpy, None, NULL);
glXDestroyContext(dpy, ctx1);
glXDestroyContext(dpy, ctx2);
if (glx_error == BadAccess)
piglit_report_result(PIGLIT_PASS);
else
piglit_report_result(PIGLIT_FAIL);
return 0;
}
/*
* Copyright (c) 2023 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/** @file glx-make-current-other-thread.c
*
* According to GLX spec BadAccess is generated if ctx was current
* to another thread at the time glXMakeCurrent was called.
*/
#include <unistd.h>
#include "piglit-util-gl.h"
#include "piglit-glx-util.h"
#include "pthread.h"
static Display *dpy;
static Window win;
static XVisualInfo *visinfo;
unsigned char glx_error = Success;
int
expect_badvalue(Display *dpy, XErrorEvent *e)
{
glx_error = e->error_code;
return 0;
}
static void *
thread_func(void *arg)
{
GLXContext ctx = arg;
int ret = glXMakeCurrent(dpy, win, ctx);
glXDestroyContext(dpy, ctx);
return (void *)(intptr_t)ret;
}
int
main(int argc, char **argv)
{
int i;
int ret;
void *retval;
pthread_t thread;
int (*old_handler)(Display *, XErrorEvent *);
for (i = 1; i < argc; ++i) {
if (!strcmp(argv[i], "-auto"))
piglit_automatic = 1;
else
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");
piglit_report_result(PIGLIT_FAIL);
}
visinfo = piglit_get_glx_visual(dpy);
win = piglit_get_glx_window(dpy, visinfo);
old_handler = XSetErrorHandler(expect_badvalue);
GLXContext ctx;
ctx = piglit_get_glx_context(dpy, visinfo);
ret = glXMakeCurrent(dpy, win, ctx);
if (ret != True) {
printf("First glXMakeCurrent has failed.\n");
piglit_report_result(PIGLIT_FAIL);
}
ret = glXMakeCurrent(dpy, win, ctx);
if (ret != True) {
printf("Second glXMakeCurrent in same thread has failed.\n");
piglit_report_result(PIGLIT_FAIL);
}
pthread_create(&thread, NULL, thread_func, ctx);
ret = pthread_join(thread, &retval);
if (retval != False) {
printf("Second glXMakeCurrent in other thread has NOT failed.\n");
piglit_report_result(PIGLIT_FAIL);
}
if (glx_error != BadAccess) {
printf(
"Failed to get BadAccess from glXMakeCurrent() in other thread.\n");
piglit_report_result(PIGLIT_FAIL);
}
/* Free our resources when we're done. */
XSetErrorHandler(old_handler);
glXMakeCurrent(dpy, None, NULL);
if (glx_error == BadAccess)
piglit_report_result(PIGLIT_PASS);
else
piglit_report_result(PIGLIT_FAIL);
return 0;
}
......@@ -389,7 +389,9 @@ with profile.test_list.group_manager(
g(['glx-swap-pixmap-bad'], run_concurrent=False)
g(['glx-swap-singlebuffer'], run_concurrent=False)
g(['glx-swap-copy'], run_concurrent=False)
g(['glx-make-current'], run_concurrent=False)
g(['glx-make-current'])
g(['glx-make-current-other-thread'])
g(['glx-copy-context-dest-current'])
g(['glx-make-glxdrawable-current'], run_concurrent=False)
g(['glx-context-flush-control'], run_concurrent=False)
g(['glx-buffer-age'], run_concurrent=False)
......
......@@ -30,6 +30,7 @@ deps =
{accel,noaccel,streams}: jsonschema
streams: jsonstreams>=0.4.1
{accel,noaccel,functional}: pyyaml
{accel,noaccel,functional}: urllib3<2
{accel,noaccel,functional}: requests
{accel,noaccel,functional}: Pillow
commands =
......