Commit Graph

109 Commits

Author SHA1 Message Date
Emma Anholt c7c265892a mesa/arbprog: Stop doing optimization in the ARB program IR.
You'll get all this and more anyway once you're in NIR.  This lets us GC a
bunch more ARB program transformation code.

No effect in shader-db on softpipe.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17528>
2022-07-16 04:08:32 +00:00
Adam Jackson 81b0862642 mesa: Stub out GL_APPLE_object_purgeable
There's slots in the glapi static dispatch table (which is still
arguably ABI) which we need to preserve, but we can stop exposing the
extension string or doing anything in the added functions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17425>
2022-07-11 16:37:34 -04:00
Mike Blumenkrantz a7831c5f6e streaming-memcpy: move to src/util/ and compile unconditionally
this is useful, so make it available for general use

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16732>
2022-06-07 03:33:20 +00:00
Qiang Yu 9b22ab4167 mesa/st: implement hardware accelerated GL_SELECT
Use an internal geometry shader to handle input primitives. Do full
accurate culling and clipping in the shader and output hit result and
min/max depth to a SSBO for final being written to select buffer.

With multiple result slots in SSBO we can left multiple draws on the
fly and wait them done when buffer is full or exit GL_SELECT mode.

This provides quicker selection response compared to software based
solution. Tested on Discovery Studio 2020: some complex model needs
1~2s selection response time originally, now it's almost selected
immidiately.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu 90b34c9184 mapi: add api setup header for hw select mode
Used by GL_SELECT mode dispatch table setup.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15765>
2022-06-06 18:23:49 +00:00
Eric Anholt 6ffdca73d3 mesa/st: Remove TGSI-only shader lowering code.
These are no longer called.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044>
2022-05-05 22:25:03 +00:00
Emma Anholt 214c774ba6 mesa/st: Remove st_glsl_to_tgsi.
It is no longer called, and can be retired.

Fixes: #1924, #822, #6073

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044>
2022-05-05 22:25:03 +00:00
Yonggang Luo a3a43e5fa8 win32: Do not use BUILD_GL32, we use def file to export win32 dll symbols.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14041>
2022-04-19 19:38:47 +00:00
Dave Airlie 9b961b9d1d mesa/st: refactor program translation into one file.
This moves the notify callback into the file where it's all called
from.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14700>
2022-01-26 00:42:59 +00:00
Dave Airlie f74648f912 mesa/st: move last of renderbuffer functionality into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:12 +10:00
Dave Airlie 98df4f7a83 mesa/st: migrate blit code into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:09 +10:00
Dave Airlie 5f675630d9 mesa/st: fixup viewport drawable invalidation
This moves the code into more appropriate places

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:04 +10:00
Dave Airlie 5decf569fc mesa/st: move perf query test to st_context, drop files.
This removes the unused cb perf query files

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:20 +00:00
Dave Airlie ea3e700e35 mesa/st: cleanup last bits of st perfmon code.
Just some small cleanups left to finish perfmon code movement.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
2022-01-20 10:54:01 +10:00
Dave Airlie 0fb946da94 mesa/st: merge transform feedback code from st into mesa
After the objects are merged, this moves the rest of the code
from the state tracker into mesa.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
2022-01-20 10:53:44 +10:00
Dave Airlie b6710b6549 mesa/st: merge condrender code from st into mesa.
This merges conditional render code from state tracker into mesa.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
2022-01-20 10:53:36 +10:00
Dave Airlie 1c73afa462 mesa/st: merge queryobj code from st into mesa.
This merges all the query object code from st into mesa.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
2022-01-20 10:53:33 +10:00
Dave Airlie 0af7c1e385 mesa/st: merge the syncobj code from st into mesa
This merges all the syncobj code into the mesa from the state tracker.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
2022-01-20 10:53:30 +10:00
Dave Airlie adf0dc7801 mesa/st: merge semaphore objects from st into mesa
Take all the semaphore objects code from state tracker and merge it
into mesa.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
2022-01-20 10:53:27 +10:00
Dave Airlie addcc24f77 mesa/st: merge memoryobjects code from st into mesa
This takes all the memory object code from state tracker and
merges it into mesa, cleaning it up on the way.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
2022-01-20 10:53:18 +10:00
Adam Jackson 01f5fffbc6 mesa: Remove unused src/mesa/x86-64
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14545>
2022-01-15 03:14:00 +00:00
Adam Jackson c630408945 mesa/math: Remove unused m_translate.c
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14545>
2022-01-15 03:14:00 +00:00
Dave Airlie 37190ad932 mesa: drop texformat code this isn't used.
v2: dropped comment (Tapani)

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14286>
2021-12-22 20:59:23 +00:00
Dave Airlie d4af7d2519 mesa/st: move st strings handling into mesa
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14257>
2021-12-20 04:35:41 +00:00
Dave Airlie 8956b7f38f mesa/st: migrate barrier code into mesa
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14257>
2021-12-20 04:35:41 +00:00
Dave Airlie 294dc8fa04 mesa/st: move msaa functionality into multisample.c
This moves some state track code into main

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14257>
2021-12-20 04:35:41 +00:00
Dave Airlie 56f5e69497 mesa/st: migrate compute dispatch to mesa
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14256>
2021-12-20 13:40:57 +10:00
Dave Airlie 131efc204d mesa/st: remove st_cb_bufferobjects*
this has all been merged into mesa now

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14133>
2021-12-15 13:29:33 +00:00
Marek Olšák ae4065f0b2 mesa: use nop dispatch for ColorTable/Convolution/Histogram
The nop dispatch generates GL_INVALID_OPERATION too.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
2021-12-14 12:29:00 -05:00
Marek Olšák 7994b6c893 mesa: remove all GL func forward declarations because they are autogenerated
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
2021-12-14 12:28:58 -05:00
Marek Olšák bade2407fa mesa: remove GLvertexformat
Function pointers were first set in GLvertexformat, and then
GLvertexformat was copied to the dispatch.

This just sets the function pointers in the dispatch directly,
skipping the intermediate GLvertexformat structure.

The code with SET_* calls is autogenerated by api_vtxfmt_init_h.py.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
2021-12-14 12:00:35 -05:00
Marek Olšák a87e5d437e glapi: autogenerate install_vtxfmt with python
This is a prerequisite for the GLvertexformat removal.

The autogenerated file looks like this:

if (_mesa_is_desktop_gl(ctx) || (ctx->API == API_OPENGLES2 && ctx->Version >= 30)) {
   SET_VertexAttribI4iEXT(tab, NAME(VertexAttribI4iEXT));
   SET_VertexAttribI4ivEXT(tab, NAME(VertexAttribI4ivEXT));
   SET_VertexAttribI4uiEXT(tab, NAME(VertexAttribI4uiEXT));
   SET_VertexAttribI4uivEXT(tab, NAME(VertexAttribI4uivEXT));
}
if (ctx->API == API_OPENGLES2) {
   SET_VertexAttrib1fARB(tab, NAME_ES(VertexAttrib1fARB));
   SET_VertexAttrib1fvARB(tab, NAME_ES(VertexAttrib1fvARB));
   SET_VertexAttrib2fARB(tab, NAME_ES(VertexAttrib2fARB));
   SET_VertexAttrib2fvARB(tab, NAME_ES(VertexAttrib2fvARB));
   SET_VertexAttrib3fARB(tab, NAME_ES(VertexAttrib3fARB));
   SET_VertexAttrib3fvARB(tab, NAME_ES(VertexAttrib3fvARB));
   SET_VertexAttrib4fARB(tab, NAME_ES(VertexAttrib4fARB));
   SET_VertexAttrib4fvARB(tab, NAME_ES(VertexAttrib4fvARB));
}
if (ctx->API == API_OPENGL_COMPAT) {
   SET_ArrayElement(tab, NAME_AE(ArrayElement));
   SET_Begin(tab, NAME(Begin));
   SET_CallList(tab, NAME_CALLLIST(CallList));
   SET_CallLists(tab, NAME_CALLLIST(CallLists));
   SET_Color3b(tab, NAME(Color3b));
   SET_Color3bv(tab, NAME(Color3bv));
   ...

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
2021-12-14 12:00:29 -05:00
Marek Olšák 1f33948733 glapi: autogenerate all _mesa_* forward declarations in api_exec_decl.h
We could remove them from other header files now.

This purposefully omits "_exec" in _mesa_exec such as _mesa_exec_Begin
to make it pretty. Later commits will remove _exec from names, e.g. it
will become _mesa_Begin. The only other variants are really just
save_Begin (dlist) and _save_Begin (vbo).

The autogenerated file looks like this:

void GLAPIENTRY _mesa_NewList(GLuint list, GLenum mode);
void GLAPIENTRY _mesa_EndList(void);
void GLAPIENTRY _mesa_CallList(GLuint list);
void GLAPIENTRY _mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists);
void GLAPIENTRY _mesa_DeleteLists(GLuint list, GLsizei range);
GLuint GLAPIENTRY _mesa_GenLists(GLsizei range);
void GLAPIENTRY _mesa_ListBase(GLuint base);
void GLAPIENTRY _mesa_Begin(GLenum mode);
void GLAPIENTRY _mesa_Bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap);
void GLAPIENTRY _mesa_Color3b(GLbyte red, GLbyte green, GLbyte blue);
void GLAPIENTRY _mesa_Color3bv(const GLbyte * v);
...

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
2021-12-14 12:00:25 -05:00
Marek Olšák 5603d3e42c mesa: remove api_exec.h and move its contents into context.h
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
2021-12-14 12:00:24 -05:00
Marek Olšák 898649c145 glapi: autogenerate api_save.h with save_* function declarations
This is planned to be used by glthread for its own dispatch mechanism.

The autogenerated file looks like this:

void GLAPIENTRY save_NewList(GLuint list, GLenum mode);
void GLAPIENTRY save_ListBase(GLuint base);
void GLAPIENTRY save_Bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap);
void GLAPIENTRY save_RasterPos2d(GLdouble x, GLdouble y);
void GLAPIENTRY save_RasterPos2dv(const GLdouble * v);
void GLAPIENTRY save_RasterPos2f(GLfloat x, GLfloat y);
void GLAPIENTRY save_RasterPos2fv(const GLfloat * v);
void GLAPIENTRY save_RasterPos2i(GLint x, GLint y);
void GLAPIENTRY save_RasterPos2iv(const GLint * v);
...

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
2021-12-14 12:00:20 -05:00
Marek Olšák df3447c331 glapi: autogenerate _mesa_initialize_save_table with python
The generated file looks like this:

SET_NewList(table, save_NewList);
SET_ListBase(table, save_ListBase);
SET_Bitmap(table, save_Bitmap);
SET_RasterPos2d(table, save_RasterPos2d);
SET_RasterPos2dv(table, save_RasterPos2dv);
SET_RasterPos2f(table, save_RasterPos2f);
SET_RasterPos2fv(table, save_RasterPos2fv);
SET_RasterPos2i(table, save_RasterPos2i);
SET_RasterPos2iv(table, save_RasterPos2iv);
SET_RasterPos2s(table, save_RasterPos2s);
...

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
2021-12-14 12:00:19 -05:00
Adam Jackson 3731d21c68 mesa: Remove unused execmem code
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 68b7fabbe2 mesa/program: Dead code cleanup
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Dave Airlie b03db92720 meson: make mesa/tests/glx depend on gallium
If I start direct linking the state tracker to mesa, the tests fail
to build because they don't have gallium linked.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
2021-12-07 13:03:53 +00:00
Emma Anholt 9b2600da87 mesa/st: Remove GL_ARB_depth_clamp emulation support.
This was useful for emulating GL 3.2 in virgl on a GLES3 host renderer,
before GL_EXT_depth_clamp introduced the ability for hardware drivers to
expose the feature on GLES.  Now that we have that, the desktop-GL-capable
HW that virgl cares about can expose desktop GL even on its GLES renderer
on the host without this emulation.  I don't think anyone particularly
cares about hitting higher GL versions on actually-core-GLES hosts with
virgl.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13729>
2021-12-06 18:17:25 +00:00
Timothy Arceri bf1f809d7f mesa: rename ir_to_mesa.{cpp,h} -> link_program.{cpp,h}
The only code now left in this file is the linking function.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14066>
2021-12-06 10:15:08 +00:00
Dylan Baker ea8fa10edd mesa: move common/dri into gallium
There are no other consumers, so we can just move this into gallium and
out of mesa.

Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10153>
2021-12-03 23:53:06 +00:00
Dylan Baker 01b44d66b1 mesa: Merge libmesa_gallium and libmesa_common
Since we don't have libmesa_classic anymore, we don't nee to split
these, and can save a target/ar invocation by not having two targets.
Plus it's just conceptually simpler

Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10153>
2021-12-03 23:53:06 +00:00
Dylan Baker e030d5ba8a mesa: Delete libmesa_classic
We no longer have any classic drivers, so we no longer need
libmesa_classic

Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10153>
2021-12-03 23:53:06 +00:00
Adam Jackson 76791db088 mesa/x11: Remove the swrast-classic-based fake libGL
If you want this you will almost certainly be happier with the gallium
version, giving you llvmpipe instead of swrast-classic.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10153>
2021-12-03 23:53:06 +00:00
Mike Blumenkrantz e7b9561959 gallium: implement compute pbo download
this reworks PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER into an
enum as PIPE_CAP_TEXTURE_TRANSFER_MODES, enabling drivers to choose
a (sometimes) faster, compute-based download mechanism based on a new
pipe_screen hook

compute pbo download is implemented using shaders with a prolog to convert
the input format to generic rgb float values, then an epilog to convert
to the output value. the prolog and epilog are determined based on a vec4
of packed ubo data which is dynamically updated based on the API usage

currently, the only known limitations are:
* GL_ARB_texture_cube_map_array is broken somehow (and disabled)
* AMD hardware somehow can't do depth readback?

otherwise it should work for every possible case

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984>
2021-11-18 08:00:07 -05:00
Marek Olšák 5b8b34825f st/mesa: change st_atom_array.c to cpp
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13512>
2021-11-03 23:22:31 +00:00
Pierre-Eric Pelloux-Prayer b0536119f2 glthread: use custom marshal/unmarshal for CallList
Will be used in the next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
2021-07-09 10:05:46 +00:00
Eric Anholt 839af6545b mesa: Replace _mesa_pack_ubyte_rgba_row() with pack_ubyte_rgba_8unorm().
The major thing that the codegen had was support for expanding integers
from byte-per-channel to the target format's channel size.  However, the
format_utils.c caller never did that for integers, and swrast doesn't have
support for integers, so that appears to be dead code.  With this done,
format_pack.py goes away entirely.

I slightly changed the prototype of _mesa_pack_ubyte_rgba_row() to match
up with the new function, which involved (mostly) dropping some manual
casts from the callers to make their data match the old prototype.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
Pierre-Eric Pelloux-Prayer fd0480957b vbo: inline vbo_primitive_restart in brw_primitive_restart
This is the only user of this code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10066>
2021-04-12 07:36:36 +02:00