Smooth convex extensibility of combination of two line segments This is a refined version of my earlier question Convex extensibility of combination of two lines.

Is there a smooth function $f:[0,1]\times [0,1]\rightarrow\mathbb R$ such
  that for all $x\in [0,1]$, $$ f(x,1)=x,\qquad f(x,0)=0, $$ and $f$ is convex or concave?

If yes, is there a "nice" example?
 A: A cheap convex solution on $\mathbb{R}^2$  is
$$f_0(x,y):= \big(x+3y-2\big)_+ -y \, ,$$
which also verifies $f_0(x,y)=-y$ for all $(x,y)$ in the rectangle   $$[-1/4, 5/4]\times [-1/4,1/4]=\big([0,1]\times\{0 \}\big)\;{\bf +}\; [-1/4,1/4]^2 \subset\{x+3y-2\le0\} \, , $$ 
and $f_0(x,y)=x+2(y-1)$ in the rectangle   $$[-1/4, 5/4]\times [3/4,5/4]=\big([0,1]\times\{1 \}\big)\big)\;{\bf +}\; [-1/4,1/4]^2 \subset\{x+3y-2\ge0\} \, .$$ As a consequence,  if $\phi$ is a symmetric $C^\infty$ convolution kernel with support in $[-1/4,1/4]^2$, the function $f:=f_0*\phi$ is a $C^\infty$ convex function on $\mathbb{R}^2$ satisfying $f(x,0)=0$ and $f(x,1)=x$. 
(We can take e.g. $\phi(x,y):=\psi(x)\psi(y)$ with $\psi\in C^\infty(\mathbb{R})$, $\psi\ge0$, $\psi(-t)=\psi(t)$, $\operatorname{supp}(\psi)\subset[-1/4,1/4]$, $\int_\mathbb{R}\psi(t)dt=1$ ).
For a concave $C^\infty$ solution, the same construction works with $$f_0(x,y):=2y-\big(3y-x-1\big)_+\;    $$
and in fact it can be adapted to a more general situation, as the main point of it is just, that  convolution with a non-negative mollifier with compact support preserves convexity, and also fixes any affine function, if the mollifier is symmetric (meaning  $\phi(x)=-\phi(x)$ for all $x$).
A: Here is a partly baked idea: Hang a sheet--a light cloth--from the segment
$(0,0,0)-(1,0,0)$ along the bottom of your square,
and from the segment $(0,1,0)-(1,1,1)$ slanting above the top of your square,
and let it sag under gravity
below the $xy$-plane, pinned to these two segments.
There are very nice cloth simulation algorithms implemented,
e.g., in Blender below. It seems you could approximate the shape
of the sheet by
hanging a catenary between the points $(x,0,0)$ and $(x,1,x)$.
By increasing the lengths of the catenaries as a function of $x$,
it seems you should be able to make the surface concave throughout.
Likely the catenaries could be replaced by parabolas.

 
 
 


Addendum. I defer to Pietro's more precise analysis,
but just to hint toward the idea I suggested, here is a
(substantially imperfect) rendition of the sagging sheet
that (nearly) matches the boundary conditions:

 
 
 

