summaryrefslogtreecommitdiff
path: root/NewbieProjects.mdwn
diff options
context:
space:
mode:
authorEricAnholt <EricAnholt@web>2014-01-27 14:06:39 -0800
committerdri <iki-dri@freedesktop.org>2014-01-27 14:06:39 -0800
commitd2562e879aa534fa4e115a1f0b7c390704ce03cb (patch)
tree189e35f5089a5e0b23b415a200c0f64d11db3639 /NewbieProjects.mdwn
parent626078a8c6288cdc3248714321d3b6e22d58fb1d (diff)
Remove text for a bunch of finished things, add a link to the i965-specific list.
Diffstat (limited to 'NewbieProjects.mdwn')
-rw-r--r--NewbieProjects.mdwn161
1 files changed, 6 insertions, 155 deletions
diff --git a/NewbieProjects.mdwn b/NewbieProjects.mdwn
index e97bcf2..cfe1fc4 100644
--- a/NewbieProjects.mdwn
+++ b/NewbieProjects.mdwn
@@ -9,121 +9,12 @@ mesa-dev mailing list you __must__ use
[[`git-send-email`|https://www.kernel.org/pub/software/scm/git/docs/git-send-email.html]]
and __NO OTHER METHOD__.
-### Enable [[`ARB_map_buffer_alignment`|http://www.opengl.org/registry/specs/ARB/map_buffer_alignment.txt]] in all drivers
-
-ARB_map_buffer_alignment provides some additional guarantees about the address
-returned by
-[[`glMapBuffer`|http://www.opengl.org/sdk/docs/man/xhtml/glMapBuffer.xml]] and
-related functions. Applications can query a new value,
-`GL_MIN_MAP_BUFFER_ALIGNMENT`, and the value returned by the driver is the
-minimum alignment of a pointer returned by `glMapBuffer`. The minimum
-alignment required by the specification is 64 bytes.
-
-Currently, this extension is only supported in Gallium drivers that never use
-buffers allocated by various software allocators. Several of these allocators
-simply use `malloc`, and the ones that don't, use `aligned_malloc` with an
-alignment of only 16 bytes. There are several additional drivers, such as
-`r200` and `i965`, that use the kernel for memory allocation of buffer
-objects. These drivers could advertise this extension, but they currently do
-not.
-
-The patch series to implement this functionality would likely consist of the
-following patches:
-
-* Modify the allocation routines in
- `src/gallium/drivers/softpipe/sp_texture.c` to use an alignment of 64
- instead of 16.
-* Modify softpipe (in `src/gallium/drivers/softpipe/sp_screen.c`) to return 64
- for `PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT`.
-* Modify the allocation routines in
- `src/gallium/drivers/llvmpipe/lp_texture.c` to use an alignment of 64
- instead of 16.
-* Modify llvmpipe (in `src/gallium/drivers/llvmpipe/lp_screen.c`) to return 64
- for `PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT`.
-* Modify `i915_buffer_create` to use an alignment of 64 instead of 16.
-* Modify i915g (in `src/gallium/drivers/i915/i915_screen.c`) to return 64 for
- `PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT`.
-* Modify svga (in `src/gallium/drivers/svga/svga_screen.c`) to return 64 for
- `PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT`. The allocation routine,
- `svga_buffer_create`, already uses the correct alignment.
-* Modify ilo (in `src/gallium/drivers/ilo/ilo_screen.c`) to return 4096 for
- `PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT`. The allocation routine, which
- ultimately calls `intel_winsys_alloc_buffer`, always gets a page-aligned
- allocation.
-* Modify the Mesa state tracker (in `src/mesa/state_tracker/st_extensions.c`)
- to unconditionally enable `ARB_map_buffer_alignment`.
-* Modify `_mesa_init_constants` to set `ctx->Const.MinMapBufferAlignment` to
- 64.
-* Modify `_mesa_buffer_data` to use `_mesa_align_malloc`. The function
- currently uses `_mesa_realloc`, but I believe this is incorrect. The
- alignment should be `ctx->Const.MinMapBufferAlignment`.
-* Modify `radeonBufferData` to pass `ctx->Const.MinMapBufferAlignment` as the
- alignment value to `radeon_bo_open`.
-* Modify `nouveau_bufferobj_data` to pass `ctx->Const.MinMapBufferAlignment`
- as the alignment value to `nouveau_bo_new`.
-* Modify i915 `intel_bufferobj_data` (in
- `src/mesa/drivers/dri/i915/intel_buffer_objects.c`) to use
- `_mesa_align_malloc` instead of `malloc`. The alignment should be
- `ctx->Const.MinMapBufferAlignment`.
-* Modify `brw_initialize_context_constants` to set
- `ctx->Const.MinMapBufferAlignment` to 4096.
-* Modify the extension table in `src/mesa/main/extensions.c` to have
- `o(dummy_true)` as the `extension::offset` field (instead of the current
- value of `o(ARB_map_buffer_alignment)`).
-* Delete `gl_extensions::ARB_map_buffer_alignment`, and clean up all of the
- places that used to use it.
-
-There are a lot patches, but none of them should be more than a couple lines
-of change. This highlights an important aspect of writing patches so that
-people can review them: small, self-contained changes are, for the most part,
-better.
-
### Implement [[`AMD_shader_trinary_minmax`|http://www.opengl.org/registry/specs/AMD/shader_trinary_minmax.txt]]
This extension adds three built-in functions (with many overloads of each):
`min3`, `max3`, and `mid3`. In many ways, this extension is similar to
-[[`EXT_shader_integer_mix`|http://www.opengl.org/registry/specs/EXT/shader_integer_mix.txt]].
-Looking at commits
-[[56fff70|http://cgit.freedesktop.org/mesa/mesa/commit/?id=56fff7063dd05232cf86aef9d2ae1c04c52a8360]]
-and
-[[d83221c|http://cgit.freedesktop.org/mesa/mesa/commit/?id=d83221c2d33dcad3e5d3f8d8fa6abddea63b8817]]
-may be helpful. One difference is that `AMD_shader_trinary_minmax` should be
-exposed on any driver that supports GLSL.
-
-* Add extension tracking to the GLSL parser. This entails:
- * Add `_warn` and `_enable` flags to `_mesa_glsl_parse_state`.
- * Add an entry to `_mesa_glsl_supported_extensions`. Since this extension
- will always be enabled, the `supported_flag` flag should ultimately be
- set to `dummy_true`. Since the extension isn't actually implemented
- yet, set it to `dummy_false` for now. A later patch will fix this.
- This highlights an important aspect of writing patches for testability:
- no patch should knowingly leave things in a broken state. This causes
- havoc later when someone needs to use `[[git-bisect|https://www.kernel.org/pub/software/scm/git/docs/git-bisect.html]]`.
- * Add the built-in `#define GL_AMD_shader_trinary_minmax` to the
- preprocessor (in `src/glsl/glcpp/glcpp-parse.y`).
-* Implement the new `min3` built-in function. All of these changes will be in
- `src/glsl/builtin_functions.cpp`.
- * Add a `shader_trinary_minmax` predicate. Note: This will not be
- repeated for the `max3` or `mid3` functions.
- * Add `builtin_builder::_min3` method. This will have a
- `builtin_available_predicate` predicate parameter like `_mix_sel`.
- However, it will have 3 `const glsl_type *` parameters.
- * Implement the `builtin_builder::_min3` method. This should be pretty
- similar to the existing `builtin_builder::_min` method... except that it
- will take the minimum of three values.
- * Add an `add_function` block that will generate the various overloads of
- `min3`. This should look fairly similar to the other `add_function`
- blocks. Be sure to add all of the overloads!
-* Repeat the previous step for `max3`.
-* Repeat the previous step for `mid3`.
-* Enable the extension!
- * Add an entry to `extension_table`. Keep the list of extensions
- alphabetized! Since the extension should always be enabled, the
- `extension::offset` field should be `o(dummy_true)`.
- * Change `_mesa_glsl_supported_extensions::supported_flag` from
- `dummy_false` to `dummy_true`.
- * Update `docs/relnotes/10.1.html`.
+[[`EXT_shader_integer_mix`|http://www.opengl.org/registry/specs/EXT/shader_integer_mix.txt]]. Code has landed, but tests are missing.
Since there are no existing test cases for this extension, tests will need to
be added _before_ the Mesa patches can land. The piglit tests should be
@@ -155,51 +46,7 @@ different.
### Implement [[`ARB_clear_buffer_object`|http://www.opengl.org/registry/specs/ARB/clear_buffer_object.txt]]
-`ARB_clear_buffer_object` is, basically, a glorified `memset` for buffer
-objects. I think this is another extension that we'll just want to enable in
-every driver.
-
-* Add basic extension infrastructure.
- * Add `src/mapi/glapi/gen/ARB_clear_buffer_object.xml`. Look at other XML
- files in the same directory for examples of how this file should be
- structured.
- * Reference `ARB_clear_buffer_object.xml` from
- `src/mapi/glapi/gen/gl_API.xml`.
- * Add stub implementations of the functions added by this extension.
- These will be called `_mesa_ClearBufferData` and
- `_mesa_ClearBufferSubData`. Since the extension is implemented yet,
- these functions should just call `_mesa_error(ctx, GL_INVALID_OPERATION,
- "glFunctionName");`.
- * Update `src/mesa/main/tests/dispatch_sanity.cpp` to expect the new
- functions added by this extension. _Before_ implementing this step,
- verify that `make check` fails. _After_ implementing this step, verify
- that `make check` succeeds.
-* Add a `ClearBufferSubData` function pointer to `dd_function_table` function
- table. It's function signature should match `glClearBufferSubData`, but it
- will have an additional `struct gl_context *ctx` parameter. Note: There
- will probably be debate on the mailing list about whether there should be
- both a `ClearBufferSubData` and a `ClearBufferData` function... be ready. :)
-* Implement a generic version of the `ClearBufferSubData` function. Call it
- `_mesa_clear_buffer_subdata`. This function should use
- `dd_function_table::MapBufferRange` to map the portion of the buffer to be
- cleared. It should then use `memcpy` (or similar) to set the requested
- region of the buffer to the specified value. Note: This will probably be
- the toughest patch in the series.
-* Modify `_mesa_init_buffer_object_functions` to set
- `driver->ClearBufferSubData` to `_mesa_clear_buffer_subdata`. This can
- probably be included in the previous patch.
-* Implement `_mesa_ClearBufferData` and `_mesa_ClearBufferSubData`. Be sure
- to get all of the error check required by the specification. The "work" of
- `_mesa_ClearBufferData` will be done by `ctx->Driver.BufferData` and
- `ctx->Driver.ClearBufferSubData`.
-* Enable the extension!
- * Add an entry to `extension_table`. Keep the list of extensions
- alphabetized! Since the extension should always be enabled, the
- `extension::offset` field should be `o(dummy_true)`.
- * Update `docs/relnotes/10.1.html`.
-
-Since there are no existing test cases for this extension, tests will need to
-be added _before_ the Mesa patches can land. The piglit tests should be
+Code has landed, but tests are missing. The piglit tests should be
fairly easy to add.
* Make a big pile of "negative" tests. Basically, everywhere in the
@@ -218,3 +65,7 @@ fairly easy to add.
* Repeat the previous test, but perform multiple overlapping and
non-overlapping clears.
* Any other mean tests that you can think of.
+
+### Driver-specific projects
+
+* [[I965Todo]]