Commit 1b22f28d authored by Fabio Estevam's avatar Fabio Estevam Committed by Eric Engestrom

cube-tex: Handle SMOOTH switch case

In kmscube.c there is the following logic:

	if (mode == SMOOTH) {
		egl = init_cube_smooth(gbm);
	} else {
		egl = init_cube_tex(gbm, mode);

,which makes init_cube_tex() to be never called on the SMOOTH case.

Handle the SMOOTH switch case inside init_tex() to fix the following
build warning:

cube-tex.c: In function 'init_tex':
cube-tex.c:438:2: warning: enumeration value 'SMOOTH' not handled in switch [-Wswitch]
  switch (mode) {
Signed-off-by: 's avatarFabio Estevam <>
Reviewed-by: 's avatarEric Engestrom <>
[Eric: add assert()]
Signed-off-by: 's avatarEric Engestrom <>
parent e877fcb0
......@@ -442,6 +442,9 @@ static int init_tex(enum mode mode)
return init_tex_nv12_2img();
case NV12_1IMG:
return init_tex_nv12_1img();
case SMOOTH:
return -1;
return -1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment